API Reference
tip
Refer to the Authentication Page for details on generating an authentication token (JWT)
Create Job API
POST /solutions/bayerAgPowered.gdd:create
Create Request
Request Headers
{
"Content-Type": "application/json",
"Authorization": "Bearer <TOKEN>"
}
Sample Request Body
{
"requestPath": "/v1/gdd/<User Defined Unique Job ID>", # Something like 12_04_23_1000
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"crop": "CANOLA",
"gddStartDate": "2023-07-01",
"gddEndDate": "2023-07-15",
"resourceType": "Field",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"temperatureUnit": "c", # Optional
}
Request Body Parameters
Parameter | Description |
---|---|
requestPath String | Request path containing api-version, query parameters and path route to be called for partner Example: /v1/imagery-add-on/<User Defined Unique Job ID> |
partnerRequestBody String | Object with all required body parameters to create a GDD APS job Details: See partnerRequestBody Parameters |
partnerRequestBody Parameters
Required Parameters
Parameter | Description |
---|---|
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 GDD values for. Options: "Field" |
resourceId String | The ID of the ADMA resource type (ie. "Field") used to request GDD values for. Example: "4b879eea-1c04-45c5-8669-cb608529c0f8" |
crop String | The type of crop for which to calculate GDD. Options: CANOLA , CORN , COTTON , SUGAR_BEET , SOYBEAN , WINTER_WHEAT |
gddStartDate String | The planting date of the crop. Example: "2023-07-01" |
gddEndDate String | The target date to calcuate GDD. GDD is the sum of values between the gddStartDate and gddEndDate. Example: "2023-07-15" |
Optional Parameters
Parameter | Description |
---|---|
temperatureUnit String | Unit of measurement for temperature used in the GDD calculation (Celsius or Fahrenheit). Options: "c" , "f" Default: "c" |
Response
Response Sample: 202 Accepted
{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"crop": "CORN",
"gddStartDate": "2023-01-01",
"gddEndDate": "2023-01-15",
"temperatureUnit": "C"
},
"id": "1234",
"jobCreatedDateTime": "2023-12-01T18:48:14Z",
"jobLastActionDateTime": "2023-12-01T18:48:14Z",
"message": "GDD-01001: Job queued successfully.",
"status": "WAITING",
"e2eId": "f0c7341492b61ab8921d0cab6b731355"
}
Error Response Sample
{
"error": {
"code": "Conflict",
"message": "GDD-04103: Job JobId [<ADMA Instance URL>, 1234] already exists."
},
"traceId": "7af4e84d-aac0-43a3-ba69-40a0347e9752"
}
Fetch Status API
POST /solutions/bayerAgPowered.gdd: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/gdd/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}
Request Body Parameters
Parameter | Description |
---|---|
requestPath String | Request path containing api-version, query parameters and path route to be called for partner Example: /v1/imagery-add-on/<User Defined Unique Job ID> |
Response
Response Sample
{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"crop": "CORN",
"gddStartDate": "2023-01-01",
"gddEndDate": "2023-01-15",
"temperatureUnit": "C"
},
"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": "GDD-02001: Job is completed successfully.",
"status": "SUCCEEDED",
"insightId": "2e130d6c-13ae-4e2e-875b-3a8f018f1ffd",
"e2eId": "f0c7341492b61ab8921d0cab6b731355"
}
Error Response Sample
{
"errors": [
{
"code": "HWA-04101",
"message": "HWA-04101: Job not found JobId [https://dfs-fb-dev-instance.farmbeats.azure.net/, demo-test-2344]."
}
],
"traceId": "845"
}
Cancel Job API
POST /solutions/bayerAgPowered.gdd: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/gdd/<User Defined Unique Job ID>", # Something like 12_04_23_1000
}
Request Body Parameters
Parameter | Description |
---|---|
requestPath String | Request path containing api-version, query parameters and path route to be called for partner Example: /v1/imagery-add-on/<User Defined Unique Job ID> |
Response
Response Sample
{
"partnerRequestBody": {
"partyId": "53b8f2b9-04b3-4462-ac52-9c821feb0ee2",
"resourceType": "FIELD",
"resourceId": "4b879eea-1c04-45c5-8669-cb608529c0f8",
"crop": "CORN",
"gddStartDate": "2023-01-01",
"gddEndDate": "2023-01-15",
"temperatureUnit": "C"
},
"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": "GDD-02002: Job is cancelled successfully.",
"status": "CANCELLED",
"e2eId": "55e3ae881e42087bdbec22d5f03b0978"
}
Error Response Sample
{
"error": {
"code": "GDD-04102",
"message": "Invalid job status <Job Status> for the cancel operation."
},
"traceId": "7af4e84d-aac0-43a3-ba69-40a0347e9752"
}