Searching for Single and Repeat Tasking Requests
Overview
Existing Single and Repeat Tasking Requests can be found using our advanced search endpoints.
There are two distinct offerings for each type:
Single Tasking Requests
POST https://api.capellaspace.com/tasks/search
Repeat Tasking Requests
POST https://api.capellaspace.com/repeat-requests/search
Request and Response
Request Body
Both endpoints support the following request body structure:
Parameter | Format | Description | Default Value |
---|---|---|---|
sort | string | Key scoped inside the task or repeat request properties to sort on. For example: windowOpen or collectConstraints.imageLength . | submissionTime |
order | enum | Direction to sort the specified property. Must be one of asc or desc . | desc |
page | integer | The page of results to obtain. Search responses will indicate totalPages . | 1 |
limit | integer | The amount of records to return in each search request (e.g. page size). | 250 (Maximum: 500 ) |
query | object | Filters to apply in an AND fashion. See documentation below for more information. | {} |
Response
Response on success will have a status of 200
and results are always paginated (see default values above).
{results: [// Array of Repeat Requests or Tasking Requests. See API reference for schemas],"currentPage": 1,"totalPages": 20}
Permissions
Search results are automatically restricted to tasks viewable by the requesting user.
In most cases you can only obtain tasking requests associated with your userId
. Certain roles such as organization-manager
can view all tasks within an organization.
The Search Query
The query
parameter is an object containing keys for each property to filter against. All filters are applied in an AND
operation.
There are several definitions of operators you can provide as a filter value. The type of each field dictates which one is supported.
Each endpoint declares fields and supported operators. SearchFilterProperty
is the default unless otherwise specified.
Tasking Requests
To search single tasking requests you will use the POST /tasks/search
endpoint.
POST https://api.capellaspace.com/tasks/search
See Request and Response.
Recognized Tasking Request query
fields:
Field | Supported Value | Notes |
---|---|---|
taskingrequestName | TextSearchFilterProperty | |
taskName | TextSearchFilterProperty | alias to taskingrequestName |
taskingrequestIds | SearchFilterProperty | |
taskIds | SearchFilterProperty | alias to taskingrequestIds |
windowOpen | DateTimeFilterProperty | |
windowClose | DateTimeFilterProperty | |
lastStatusCode | SearchFilterProperty | |
lastStatusMessage | SearchFilterProperty | |
lastStatusTime | SearchFilterProperty | |
type | SearchFilterProperty | alias to collectConstraints.collectMode |
submissionTime | DateTimeFilterProperty | |
repeatrequestId | SearchFilterProperty | |
windowDuration | SearchFilterProperty | |
archiveHoldback | SearchFilterProperty | |
resellerId | SearchFilterProperty | |
includeRepeatingTasks | SearchFilterProperty | Are tasks are spawned from a Repeat Request. Defaults to false |
windowDuration | SearchFilterProperty |
All other attributes not explicitly defined can be searched using the standard SearchFilterProperty
operators, dot scoped under properties.
For example:
"query": {"collectConstraints.offNadirMin": {"gte": 15.0}}
"query": {"collectConstraints.offNadirMax": {"lte": 48.0}}
Repeat Requests
To search repeat tasking requests you will use the POST /repeat-requests/search
endpoint.
POST https://api.capellaspace.com/repeat-requests/search
See Request and Response.
Identical to single task search with exception to supported query
fields:
Field | Supported Value | Notes |
---|---|---|
repeatrequestId | SearchFilterProperty | |
repeatrequestName | TextSearchFilterProperty | |
repeatrequestDescription | TextSearchFilterProperty | |
lastStatusCode | SearchFilterProperty | |
lastStatusMessage | SearchFilterProperty | |
lastStatusTime | SearchFilterProperty | |
type | SearchFilterProperty | Alias to collectConstraints.collectMode |
submissionTime | DateTimeFilterProperty | |
windowDuration | SearchFilterProperty | |
archiveHoldback | SearchFilterProperty | |
resellerId | SearchFilterProperty | |
windowDuration | SearchFilterProperty |
All other properties not explicitly defined can be searched using the standard SearchFilterProperty
options, dot scoped under properties. For example:
"query": {"collectConstraints.offNadirMin": {"gte": 15.0}}
"query": {"collectConstraints.offNadirMax": {"lte": 48.0}}
Operators
Standard Search Operators
All fields unless superseded by a more specific set of operators support:
value | description |
---|---|
string | direct comparison |
array of strings | return records matching any value |
object with one of key pair: eq , lt , lte , gt , gte | comparison |
Examples
{"query": {"collectionTier": "background","lastStatusCode": ['accepted','submitted]}}
Text Search Operators
Certain fields are enabled for specific text search capability.
object value with key | Description |
---|---|
startsWith | Prefix of field's value must match provided |
eq | The entire value must match provided |
contains | The provided string must match anywhere inside the search field (regardless of word boundaries |
Values can also be provided as a string which is shorthand for contains
search.
All search values are case insensitive.
Examples
{"query": {"taskingrequestName": {"startsWith": "San Fran"},"taskingrequestName": {"eq": "san francisco"},"taskingrequestName": "san"}}
Date Time Search Operators
Fields representing dates with times can be search with specific operators.
Value should be a string which can represent either a date-time or an interval, open or closed. Date and time expressions adhere to RFC 3339. Open intervals are expressed using double-dots.
input value | example |
---|---|
Specific DateTime | 2018-02-12T23:20:50Z |
Closed Interval | 2018-02-12T00:00:00Z/2018-03-18T12:31:12Z |
Open Ended Interval | 2018-02-12T00:00:00Z/.. |
Open Beginning Interval | ../2018-03-18T12:31:12Z |
Examples
{"query": {"windowOpen": "2018-02-12T00:00:00Z/.."}}
Additional Information
For more information on constellation tasking requests, see the API reference for Tasking.