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.cropid:create`

Create Request

Request Headers

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

Sample Request Body

{
"requestPath": "/v1/crop-id/<User Defined Unique Job ID>", # Something like 12_04_23_1000
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"startYear": "2021",
"endYear": "2023",
"resourceType": "Field",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8"
}

Request Body Parameters

ParameterDescription
requestPath
String
Request path containing api-version, query parameters and path route to be called for partner
Example: /v1/crop-id/<User Defined Unique Job ID>
partnerRequestBody
String
Object with all required body parameters to create a Crop ID 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 Crop ID values for.
Options: "Field"
resourceId
String
The ID of the ADMA resource type (ie. "Field") used to request Crop ID values for.
Example: "4b879eea-1c04-45c5-8669-cb608529c0f8"
startYear
String
The first year in which to get a Crop ID prediction.
Example: "2021"
endYear
String
The last year (inclusive) in which to get a Crop ID prediction.
Example: "2023""

Response

Response Sample: 202 Accepted

{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"startYear": "2021",
"endYear": "2023"
},
"id": "1234",
"jobCreatedDateTime": "2023-12-01T18:48:14Z",
"jobLastActionDateTime": "2023-12-01T18:48:14Z",
"message": "MSIMAGE-01001: Job queued successfully.",
"status": "WAITING",
"e2eId": "f0c7341492b61ab8921d0cab6b731355"
}

Error Response Sample

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

Fetch Status API

POST `/solutions/bayerAgPowered.cropid: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/crop-id/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}

Request Body Parameters

ParameterDescription
requestPath
String
Request path containing api-version, query parameters and path route to be called for partner
Example: /v1/crop-id/<User Defined Unique Job ID>

Response

Response Sample

{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"startYear": "2021",
"endYear": "2023"
},
"id": "1234",
"jobCreatedDateTime": "2023-04-28T00:00:00Z",
"jobProcessingStartDateTime": "2023-04-28T00:05:00Z",
"jobProcessingEndDateTime": "2023-04-28T00:09:00Z",
"jobLastActionDateTime": "2023-04-28T00:09:00Z",
"jobProcessingDurationInSeconds": 4,
"message": "MSIMAGE-02001: Job is completed successfully.",
"status": "SUCCEEDED",
"e2eId": "f0c7341492b61ab8921d0cab6b731355"
}

Error Response Sample

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

Cancel Job API

POST `/solutions/bayerAgPowered.cropid: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/crop-id/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}

Request Body Parameters

ParameterDescription
requestPath
String
Request path containing api-version, query parameters and path route to be called for partner
Example: /v1/crop-id/<User Defined Unique Job ID>

Response

Response Sample

{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"startYear": "2021",
"endYear": "2023"
},
"id": "1234",
"jobCreatedDateTime": "2023-04-28T00:00:00Z",
"jobProcessingStartDateTime": "2023-04-28T00:05:00Z",
"jobProcessingEndDateTime": "2023-04-28T00:07:00Z",
"jobLastActionDateTime": "2023-04-28T00:07:00Z",
"jobProcessingDurationInSeconds": 2,
"message": "MSIMAGE-02002: Job is cancelled successfully.",
"status": "CANCELLED",
"e2eId": "55e3ae881e42087bdbec22d5f03b0978"
}

Error Response Sample

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