Skip to content

List saved searches

GET
/v1/saved_searches
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.

page[number]
integer
page[size]
integer
q[name_cont]
string

Name contains

q[s]
string

Sort, e.g. “created_at desc”

Filtered by name, paginated

Media type application/json
object
data
required
Array<object>
object
id
required
string format: uuid
type
required
string
Allowed values: saved_search
attributes
required
object
name
required
string
query
required

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
q
object
key
additional properties
One of:
string
results
object
key
additional properties
object
key
additional properties
string
conditions
required

The query as conditions: part (q or results), attribute, label, predicate, predicate_label, value, value_label

Array<object>
object
part
string
Allowed values: q results
attribute
string
label
string
predicate
string
predicate_label
string
value
One of:
string
value_label

The value as shown: brief names for a brief condition

string
created_by_id

The user who saved it from the app; null when created over the API

string format: uuid
nullable
created_at
required
string format: date-time
updated_at
required
string format: date-time
relationships
object
organization
object
channels

The channels whose pre-filter references this search

object
Example
{
"data": [
{
"type": "saved_search",
"attributes": {
"conditions": [
{
"part": "q"
}
]
}
}
]
}

Unauthorized