List contracts
The listContracts
operation enables you to access all your contracts as a paginated list. This operation returns all of the contracts associated with the current user’s company (authenticated using the bearer token). You can use this endpoint to identify which contractID
to use while tasking.
Example
Request
Enter the following curl
command, remembering to replace the ${VARNAME}
variables with the appropriate values:
curl --location "${API_BASE_URL}/api/company/v1/contracts" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"
Response
On success, returns a 200
status code and a JSON object containing.
-
A list of Contracts
-
Optionally, a
cursor
to indicate that more results are available on the next page (see Paginated Results)
{
"data": [
{
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
"name": "string",
"start": "2019-08-24T14:15:22Z",
"end": "2019-09-24T14:15:22Z",
"deliveryLocations": [
{
"method": "sftp",
"path": "string"
}
],
"imagingModes": {
"allowed": [
[
"SPOTLIGHT",
"SCAN",
"STRIPMAP"
]
]
},
"priority": {
"allowed": [
"BACKGROUND"
],
"default": "BACKGROUND"
},
"exclusivity": {
"allowed": [
"PUBLIC"
],
"default": "PUBLIC"
}
}
],
"cursor": "string"
}
More options
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 contracts 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/company/v1/contracts?limit=20&cursor=XXX" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}"