Skip to main content

API Reference

tip

Refer to the Authentication Page for details on generating an authentication token (JWT)

Create Job API

 POST /solutions/bayerAgPowered.imagery:create

SentinelHub License Required

The Imagery Insights Create Job API requires a valid SentinelHub License clientId and ClientSecret Stored in your local ADMA Key Vault. Please follow the Install Instructions if those are not already configured.

Create Request

Request Headers

{
"Content-Type": "application/json",
"Authorization": "Bearer <TOKEN>"
}

Sample Request Body

{
"requestPath": "/v1/imagery-add-on/<User Defined Unique Job ID>", # Something like 12_04_23_1000
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceId": "dfa70d7c-5132-4949-bc2d-92906c838d22",
"resourceType": "Field",
"collection": "sentinel-2-l2a",
"layer": "SCOUTING_MAP",
"sceneStartDateTime": "2023-01-01T00:00:00",
"sceneEndDateTime": "2023-01-15T23:59:59"
}
}

Request Body Parameters

ParameterDescription
requestPath
String
The APS API path to be called with a unique ID for the job provided by the client
Example: /v1/imagery-add-on/<User Defined Unique Job ID>
partnerRequestBody
String
Object with all required body parameters to create an APS job
Details: See partnerRequestBody Parameters

partnerRequestBody Parameters

Required Parameters
ParameterDescription
partyId
String
The ID of the ADMA Party resource associated with the Field Resource used in the request
Example: "53b8f2b9-04b3-4462-ac52-9c821feb0ee2"
resourceType
String
The type of ADMA resource being used to request imagery.
Options: "Field"
resourceId
String
The ID of the ADMA resource type (ie. "Field") used to request imagery.
Example: "4b879eea-1c04-45c5-8669-cb608529c0f8"
collection
String
The STAC collection to source imagery from SentinelHub.
Options: sentinel-2-l2a, sentinel-2-l1c
layer
String
The imagery insight to be generated by the job.
Options: SCOUTING_MAP, VEGETATION_MAP, TRUE_COLOR
sceneStartDateTime
String
Start datetime (inclusive) for ADMA scene search.
Example: "2023-01-01T00:00:00"
sceneEndDateTime
String
End datetime (inclusive) for ADMA scene seach. Cannot be more than 2 weeks after sceneStartDateTime
Example: "2023-01-10T00:00:00"

Response

Response Sample: 202 Accepted

{
"id": "1234",
"message": "IMG-01001: Job queued successfully.",
"status": "WAITING",
"jobCreatedDateTime": "2023-04-28T00:00:00Z",
"jobLastActionDateTime": "2023-04-28T00:27:00Z",
"e2eid": "a1853978d9ae412ccd55923ca41891c7",
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceId": "dfa70d7c-5132-4949-bc2d-92906c838d22",
"resourceType": "Field",
"collection": "sentinel-2-l2a",
"layer": "SCOUTING_MAP",
"sceneStartDateTime": "2023-01-01T00:00:00",
"sceneEndDateTime": "2023-01-15T23:59:59"
}
}

Error Response Sample

{
"error": {
"code": "IMG-04103",
"message": "Job JobId [<ADMA Instance URL>, 1234] already exists"
},
"traceId": "7af4e84d-aac0-43a3-ba69-40a0347e9752"
}

Fetch Status API

 POST /solutions/bayerAgPowered.imagery:fetch

Fetch Request

Request Headers

{
"Content-Type": "application/json",
"Authorization": "Bearer <TOKEN>"
}

See Authorization Documentation for details on generating a JWT Token

Sample Request Body

{
"requestPath":"/v1/imagery-add-on/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}

Request Body Parameters

ParameterDescription
requestPath
String
The APS API path to be called with an existing Job ID provided by the client
Example: /v1/imagery-add-on/<User Defined Unique Job ID>

Response

Response Sample

{
"id": "1234",
"message": "IMG-02001: Job is completed successfully",
"status": "SUCCEEDED",
"jobCreatedDateTime": "2023-04-28T00:00:00Z",
"jobProcessingStartDateTime": "2023-04-28T00:05:00Z",
"jobProcessingEndDateTime": "2023-04-28T00:27:00Z",
"jobLastActionDateTime": "2023-04-28T00:27:00Z",
"jobProcessingDurationInSeconds": 22,
"e2eid": "a1853978d9ae412ccd55923ca41891c7",
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"collection": "sentinel-2-l2a",
"layer": "SCOUTING_MAP",
"sceneStartDateTime": "2023-01-01T00:00:00",
"sceneEndDateTime": "2023-01-15T23:59:59",
"resourceId": "dfa70d7c-5132-4949-bc2d-92906c838d22",
"resourceType": "Field"
}
}

Error Response Sample

{
"error": {
"code": "IMG-04101",
"message": "Job not found JobId [<ADMA Instance URL>, 1234], "
},
"traceId": "7af4e84d-aac0-43a3-ba69-40a0347e9752"
}

Cancel Job API

 POST /solutions/bayerAgPowered.imagery:cancel

Cancel Request

Request Headers

{
"Content-Type": "application/json",
"Authorization": "Bearer <TOKEN>"
}

See Authorization Documentation for details on generating a JWT Token

Sample Request Body

{
"requestPath":"/v1/imagery-add-on/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}

Request Body Parameters

ParameterDescription
requestPath
String
The APS API path to be called with an existing Job ID provided by the client
Example: /v1/imagery-add-on/<User Defined Unique Job ID>

Response

Response Sample

{
"id": "1234",
"message": "IMG-02002: Job is cancelled successfully.",
"status": "CANCELLED",
"jobCreatedDateTime": "2023-04-28T00:00:00Z",
"jobLastActionDateTime": "2023-04-28T00:27:00Z",
"jobProcessingStartDateTime": "2023-04-28T00:05:00Z",
"jobProcessingEndDateTime": "2023-04-28T00:27:00Z",
"jobProcessingDurationInSeconds": 22,
"e2eid": "a1853978d9ae412ccd55923ca41891c7",
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"collection": "sentinel-2-l2a",
"layer": "SCOUTING_MAP",
"sceneStartDateTime": "2023-01-01T00:00:00",
"sceneEndDateTime": "2023-01-15T23:59:59",
"resourceId": "dfa70d7c-5132-4949-bc2d-92906c838d22",
"resourceType": "Field"
}
}

Error Response Sample

{
"error": {
"code": "IMG-04102",
"message": "Invalid job status <Job Status> for the cancel operation."
},
"traceId": "7af4e84d-aac0-43a3-ba69-40a0347e9752"
}