Create a new scheduled search
POST/scheduled-searches
Creates a new scheduled search.
Request
- application/json
Body
required
The scheduled search to persist.
Array [
]
The name of the scheduled search.
The description of the scheduled search.
The ID of the saved search that will be executed.
schedule
object
required
The schedule information.
Possible values: [DAILY
, WEEKLY
, MONTHLY
, CALENDAR
, ANNUALLY
]
Enum representing the currently supported schedule types.
Additional values may be added in the future without notice.
months
object
nullable
The months to execute the search. This only applies to schedules with a type of ANNUALLY
.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
days
object
nullable
The days to execute the search.
If type
is WEEKLY
, the values will be MON
, TUE
, WED
, THU
, FRI
, SAT
, and SUN
.
If type
is MONTHLY
or ANNUALLY
, the values will be a number in double quotes, like "1"
, "10"
, or "28"
. Optionally, the value "L"
can be used to refer to the last day of the month.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
hours
object
required
The hours selected.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
A date-time in ISO-8601 format
The canonical TZ identifier the schedule will run in (ex. America/New_York). If no timezone is specified, the org's default timezone is used.
recipients
object[]
required
A list of identities that should receive the scheduled search report via email.
Possible values: [IDENTITY
]
The type of object being referenced
The ID of the referenced object
Indicates if the scheduled search is enabled.
Indicates if email generation should occur when search returns no results.
Indicates if the generated email should include the query and search results preview (which could include PII).
Responses
- 201
- 400
- 401
- 403
- 404
- 429
- 500
The persisted scheduled search.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The scheduled search ID.
owner
object
The owner of the scheduled search
Possible values: [IDENTITY
]
The type of object being referenced
The ID of the referenced object
The ID of the scheduled search owner.
Please use the id
in the owner
object instead.
The name of the scheduled search.
The description of the scheduled search.
The ID of the saved search that will be executed.
The date the scheduled search was initially created.
The last date the scheduled search was modified.
schedule
object
required
The schedule information.
Possible values: [DAILY
, WEEKLY
, MONTHLY
, CALENDAR
, ANNUALLY
]
Enum representing the currently supported schedule types.
Additional values may be added in the future without notice.
months
object
nullable
The months to execute the search. This only applies to schedules with a type of ANNUALLY
.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
days
object
nullable
The days to execute the search.
If type
is WEEKLY
, the values will be MON
, TUE
, WED
, THU
, FRI
, SAT
, and SUN
.
If type
is MONTHLY
or ANNUALLY
, the values will be a number in double quotes, like "1"
, "10"
, or "28"
. Optionally, the value "L"
can be used to refer to the last day of the month.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
hours
object
required
The hours selected.
Possible values: [LIST
, RANGE
]
Enum representing the currently supported selector types.
LIST - the values array contains one or more distinct values.
RANGE - the values array contains two values: the start and end of the range, inclusive.
Additional values may be added in the future without notice.
The selected values.
The selected interval for RANGE selectors.
A date-time in ISO-8601 format
The canonical TZ identifier the schedule will run in (ex. America/New_York). If no timezone is specified, the org's default timezone is used.
recipients
object[]
required
A list of identities that should receive the scheduled search report via email.
Possible values: [IDENTITY
]
The type of object being referenced
The ID of the referenced object
Indicates if the scheduled search is enabled.
Indicates if email generation should occur when search returns no results.
Indicates if the generated email should include the query and search results preview (which could include PII).
{
"id": "0de46054-fe90-434a-b84e-c6b3359d0c64",
"owner": {
"type": "IDENTITY",
"id": "2c9180867624cbd7017642d8c8c81f67"
},
"name": "Daily disabled accounts",
"description": "Daily disabled accounts",
"savedSearchId": "554f1511-f0a1-4744-ab14-599514d3e57c",
"created": "2018-06-25T20:22:28.104Z",
"modified": "2018-06-25T20:22:28.104Z",
"schedule": {
"type": "WEEKLY",
"months": {
"type": "LIST",
"values": [
"3",
"6",
"9",
"12"
]
},
"days": {
"type": "LIST",
"values": [
"MON",
"WED",
"FRI"
]
},
"hours": {
"type": "RANGE",
"values": [
"9",
"18"
],
"interval": 3
},
"expiration": "2018-06-25T20:22:28.104Z",
"timeZoneId": "America/Chicago"
},
"recipients": [
{
"type": "IDENTITY",
"id": "2c9180867624cbd7017642d8c8c81f67"
}
],
"enabled": false,
"emailEmptyResults": false,
"displayQueryDetails": false
}
Client Error - Returned if the request body is invalid.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the error
{
"error": "JWT validation failed: JWT is expired"
}
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
- application/json
- Schema
- Example (from schema)
- 403
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 403 response object
{
"detailCode": "403 Forbidden",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server understood the request but refuses to authorize it."
}
]
}
Not Found - returned if the request URL refers to a resource or object that does not exist
- application/json
- Schema
- Example (from schema)
- 404
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 404 response object
{
"detailCode": "404 Not found",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server did not find a current representation for the target resource."
}
]
}
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
- application/json
- Schema
- Example (from schema)
Schema
A message describing the error
{
"message": " Rate Limit Exceeded "
}
Internal Server Error - Returned if there is an unexpected error.
- application/json
- Schema
- Example (from schema)
- 500
Schema
Array [
]
Array [
]
Fine-grained error code providing more detail of the error.
Unique tracking id for the error.
messages
object[]
Generic localized reason for error
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
causes
object[]
Plain-text descriptive reasons to provide additional detail to the text provided in the messages field
The locale for the message text, a BCP 47 language tag.
Possible values: [DEFAULT
, REQUEST
, null
]
An indicator of how the locale was selected. DEFAULT means the locale is the system default. REQUEST means the locale was selected from the request context (i.e., best match based on the Accept-Language header). Additional values may be added in the future without notice.
Actual text of the error message in the indicated locale.
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 500 response object
{
"detailCode": "500.0 Internal Fault",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "An internal fault occurred."
}
]
}