List tasks
The Tasking API returns the list of all tasks accessible to the current user, including active and completed tasks. This is a complete history of the tasks created using the contracts accessible to the current user.
The operation also supports pagination, to facilitate scrolling through the tasking history.
Optional parameters
Paginated results
When a cursor property appears in the response, it indicates that more results are available.
To access the next page of results, send a follow-up request that includes the cursor query parameter, setting it equal to the cursor value from the previous response.
On success, the next page of results is returned, potentially including a new cursor to continue walking the list.
You can customize the number of returned catalog items by providing a limit query parameter, which specifies the maximum number of items to return in the response.
By default, up to 10 tasks are returned in each response.
Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:
curl --location "${API_BASE_URL}/api/tasking/v2/tasks?limit=20&cursor=XXX" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Filtering by contractID
By default, Tasks from all the contracts of the customer are returned. Customers may filter Tasks belonging to a specific contract by providing a contractID query parameter on their Request
Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:
curl --location "${API_BASE_URL}/api/tasking/v2/tasks?contractID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Filtering by date-time range
When you query the tasks, you can specify a date-time range to filter the results.
Fields used by filtering are createdAfter and createdBefore, using a date-time format (2018-02-12T23:20:50Z).
You can utilize the createdAfter field independently. However, for createdBefore to function, it necessitates being used in conjunction with createdAfter.
Date and time (date-time) expressions follow RFC 3339.
Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:
curl --location "${API_BASE_URL}/api/tasking/v2/tasks?createdAfter=2018-02-12T00:00:00Z&createdBefore=2018-02-13T00:00:00Z" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Example
Request
Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:
curl --location "${API_BASE_URL}/api/tasking/v2/tasks" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Response
On success, customers will receive a 200 status code and a JSON object containing:
-
A list of Tasks
-
Optionally, a
cursorto indicate that more results are available on the next page (see Paginated Results)
{
"cursor": "XXX",
"data": [
{
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
"pointOfInterest": {
"lat": 0,
"lon": 0
},
"acquisitionWindow": {
"start": "2023-12-29T23:20:11.315Z",
"end": "2023-12-30T01:20:11.315Z"
},
"createdAt": "2023-12-20T15:04:05Z07:00",
"updatedAt": "2023-12-20T15:04:05Z07:00",
"imagingMode": "SCAN",
"contractID": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
"reference": "customer task reference 123-456",
"status": "RECEIVED",
"fulfilledAt": "2023-12-30T00:04:05Z",
"exclusivity": "PRIVATE",
"priority": "COMMERCIAL",
"sla": "SLA_8H",
"productsAvailableInSeconds": 2304,
"incidenceAngle": {
"min": 10,
"max": 45
},
"lookSide": "LEFT",
"passDirection": "ASCENDING",
"eula": "STANDARD",
"productTypes": ["GRD", "SLC", "QLK"],
"derivativeProductTypes": ["DC_AIRCRAFT"],
"imageReference": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX"
}
]
}