List saved searches
const url = 'http://api.disclosebot.localdev:3000/v1/saved_searches';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://api.disclosebot.localdev:3000/v1/saved_searches \ --header 'Authorization: Bearer <token>'Saved searches of the organisation, filterable with ransack predicates on name and created_at, paginated, ordered by name.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Name contains
Sort, e.g. “created_at desc”
Responses
Section titled “ Responses ”Filtered by name, paginated
object
object
object
A report query in two parts. q: ransack predicates over title_or_description, title, description (cont, not_cont, eq, not_eq), submitted_through_id (the brief, an array of brief ids; in, not_in), created_at (gteq, lteq), encrypted (eq). results: result key (severity, validity, scope, duplicate, summary, or any key an integration wrote) to predicate (eq, not_eq, cont, not_cont, gteq, lteq) to value. A channel keeps results conditions but ignores them at evaluation, and applies a brief condition to its briefs instead of storing it. A flat object of ransack predicates is accepted and stored as q.
object
object
object
object
The query as conditions: part (q or results), attribute, label, predicate, predicate_label, value, value_label
object
The value as shown: brief names for a brief condition
The user who saved it from the app; null when created over the API
object
object
The channels whose pre-filter references this search
object
Example
{ "data": [ { "type": "saved_search", "attributes": { "conditions": [ { "part": "q" } ] } } ]}Unauthorized