{
"swagger": "2.0",
"info": {
"title": "Azure AgFoodPlatform Data Plane Service",
"description": "APIs documentation for Azure AgPlatform DataPlane Service.",
"version": "2021-03-31-preview"
},
"paths": {
"/farmers/{farmerId}/application-data": {
"get": {
"tags": [
"ApplicationData"
],
"description": "Get a paginated list of application data resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "ApplicationData_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "minAvgMaterial",
"description": "Application data with average material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMaterial",
"description": "Application data with average material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalMaterial",
"description": "Application data with total material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalMaterial",
"description": "Application data with total material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Application data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the application operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the application operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Application operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Application operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Application operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Application operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Application operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Application operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Application operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Application operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of application operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of application operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Application data with only given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ApplicationDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"ApplicationData_ListByFarmerId": {
"$ref": "./examples/ApplicationData_ListByFarmerId.json"
}
}
}
},
"/application-data": {
"get": {
"tags": [
"ApplicationData"
],
"description": "Get a paginated list of application data resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "ApplicationData_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "minAvgMaterial",
"description": "Application data with average material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMaterial",
"description": " Application data with average material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalMaterial",
"description": "Application data with total material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalMaterial",
"description": "Application data with total material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Application data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the application operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the application operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Application operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Application operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Application operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Application operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Application operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Application operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Application operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Application operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of application operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of application operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Application data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ApplicationDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"ApplicationData_List": {
"$ref": "./examples/ApplicationData_List.json"
}
}
}
},
"/farmers/{farmerId}/application-data/{applicationDataId}": {
"get": {
"tags": [
"ApplicationData"
],
"description": "Get a specified application data resource for a given farmer.\n\n",
"operationId": "ApplicationData_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "applicationDataId",
"description": "Id of the application data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ApplicationData"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"ApplicationData_Get": {
"$ref": "./examples/ApplicationData_Get.json"
}
}
},
"patch": {
"tags": [
"ApplicationData"
],
"description": "Create or update an application data resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "ApplicationData_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "applicationDataId",
"description": "Id of the application data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "applicationData",
"description": "Application data resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/ApplicationData"
}
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ApplicationData"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ApplicationData"
}
}
},
"x-ms-examples": {
"ApplicationData_CreateOrUpdate": {
"$ref": "./examples/ApplicationData_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"ApplicationData"
],
"description": "Delete a specified application data resource for a given farmer.\n\n",
"operationId": "ApplicationData_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "applicationDataId",
"description": "Id of the application data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"ApplicationData_Delete": {
"$ref": "./examples/ApplicationData_Delete.json"
}
}
}
},
"/application-data/cascade-delete/{jobId}": {
"get": {
"tags": [
"ApplicationData"
],
"description": "Get details of a cascade delete job for application data resource.\n\n",
"operationId": "ApplicationData_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the application data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"ApplicationData_GetCascadeDeleteJobDetails": {
"$ref": "./examples/ApplicationData_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"ApplicationData"
],
"description": "Create cascade delete job for application data resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "ApplicationData_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the application data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "applicationDataId",
"description": "Id of the application data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"ApplicationData_CreateCascadeDeleteJob": {
"$ref": "./examples/ApplicationData_CreateCascadeDeleteJob.json"
}
}
}
},
"/farmers/{farmerId}/attachments": {
"get": {
"tags": [
"Attachments"
],
"description": "Get a paginated list of attachment resources for a given farmer and search criteria.\n\n",
"operationId": "Attachments_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "resourceIds",
"description": "Attachments belonging to the given list of resources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "resourceTypes",
"description": "Attachments belonging to the resources of the given resource types will be returned. Valid values are Farmer, Farm, Field, SeasonalField, Boundary, ApplicationData, HarvestData, TillageDat and PlantingData.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "Ids of the attachments to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of attachments to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Attachments with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Attachments created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Attachments created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Attachments last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Attachments last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/AttachmentListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Attachments_ListByFarmerId": {
"$ref": "./examples/Attachments_ListByFarmerId.json"
}
}
}
},
"/farmers/{farmerId}/attachments/{attachmentId}": {
"get": {
"tags": [
"Attachments"
],
"description": "Get a specified attachment resource for a given farmer.\n\n",
"operationId": "Attachments_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "attachmentId",
"description": "Id of the attachment.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Attachment"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Attachments_Get": {
"$ref": "./examples/Attachments_Get.json"
}
}
},
"patch": {
"tags": [
"Attachments"
],
"description": "Create or update an attachment resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "Attachments_CreateOrUpdate",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "attachmentId",
"description": "Id of the attachment. This Id is unique for a given farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "formData",
"name": "file",
"description": "File to be uploaded.",
"type": "file",
"format": "binary"
},
{
"in": "formData",
"name": "FarmerId",
"description": "Id of the associated farmer.",
"type": "string"
},
{
"in": "formData",
"name": "ResourceId",
"description": "This is the Id of the resource to which the attachment belongs. Ids of following entities are valid: Farmer, Farm, Field, Seasonal field, Boundary, Application data, Harvest data, Tillage data and Planting data.",
"type": "string"
},
{
"in": "formData",
"name": "ResourceType",
"description": "Indicates the type of resource to which this attachment belongs. Valid values are Farmer, Farm, Field, SeasonalField, Boundary, ApplicationData, HarvestData, TillageDat and PlantingData.",
"type": "string"
},
{
"in": "formData",
"name": "OriginalFileName",
"description": "Original file name of the attachment.",
"type": "string"
},
{
"in": "formData",
"name": "Id",
"description": "Unique Id of the attachment. This Id is unique for a given farmer.",
"type": "string"
},
{
"in": "formData",
"name": "Status",
"description": "User provided status of the attachment.",
"type": "string",
"maxLength": 100,
"minLength": 0
},
{
"in": "formData",
"name": "CreatedDateTime",
"description": "UTC Date-time at which the attachment was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "formData",
"name": "ModifiedDateTime",
"description": "UTC Date-time at which the attachment was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "formData",
"name": "Name",
"description": "Name of the attachment.",
"type": "string",
"maxLength": 100,
"minLength": 0
},
{
"in": "formData",
"name": "Description",
"description": "Brief description of the attachment.",
"type": "string",
"maxLength": 500,
"minLength": 0
},
{
"in": "formData",
"name": "ETag",
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string"
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Attachment"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Attachment"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Attachments_CreateOrUpdate": {
"$ref": "./examples/Attachments_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Attachments"
],
"description": "Delete a specified attachment resource for a given farmer.\n\n",
"operationId": "Attachments_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "attachmentId",
"description": "Id of the attachment.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Attachments_Delete": {
"$ref": "./examples/Attachments_Delete.json"
}
}
}
},
"/farmers/{farmerId}/attachments/{attachmentId}/file": {
"get": {
"tags": [
"Attachments"
],
"description": "Return attachment as a file stream for a given input filePath.\n\n",
"operationId": "Attachments_Download",
"produces": [
"application/octet-stream",
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "attachmentId",
"description": "Id of attachment to be downloaded.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"format": "binary",
"type": "file"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Attachments_Download": {
"$ref": "./examples/Attachments_Download.json"
}
}
}
},
"/farmers/{farmerId}/boundaries": {
"get": {
"tags": [
"Boundaries"
],
"description": "Get a paginated list of boundary resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Boundaries_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "isPrimary",
"description": "If set, only primary boundaries are returned.",
"type": "boolean"
},
{
"in": "query",
"name": "parentType",
"description": "Boundaries with given parent types are returned. VAlid values are 'Field' and 'SeasonalField'.",
"type": "string"
},
{
"in": "query",
"name": "parentIds",
"description": "Boundaries associated with the given parent Ids are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minAcreage",
"description": "Boundaries with acreage equal to or greater than the given value are returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAcreage",
"description": "Boundaries with acreage equal to or lesser than the given value are returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of boundaries to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of boundaries to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Boundaries with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/BoundaryListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Boundaries_ListByFarmerId": {
"$ref": "./examples/Boundaries_ListByFarmerId.json"
}
}
},
"post": {
"tags": [
"Boundaries"
],
"description": "Search for boundaries of a farmer intersecting with a given geometry.\nThis API is expected to be used when users want to find boundaries that intersect with a given geometry. Otherwise, this is functionally same as 'List by Farmer Id' API for boundaries.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Boundaries_SearchByFarmerId",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "query",
"description": "Query filters.",
"schema": {
"$ref": "#/definitions/SearchBoundaryQuery"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/BoundaryListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Boundaries_SearchByFarmerId": {
"$ref": "./examples/Boundaries_SearchByFarmerId.json"
}
}
}
},
"/boundaries": {
"get": {
"tags": [
"Boundaries"
],
"description": "Get a paginated list of boundary resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Boundaries_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "isPrimary",
"description": "If set, only primary boundaries are returned.",
"type": "boolean"
},
{
"in": "query",
"name": "parentType",
"description": "Boundaries with given parent types are returned. VAlid values are 'Field' and 'SeasonalField'.",
"type": "string"
},
{
"in": "query",
"name": "parentIds",
"description": "Boundaries associated with the given parent Ids are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minAcreage",
"description": "Boundaries with acreage equal to or greater than the given value are returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAcreage",
"description": "Boundaries with acreage equal to or lesser than the given value are returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of boundaries to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of boundaries to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Boundaries with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/BoundaryListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Boundaries_List": {
"$ref": "./examples/Boundaries_List.json"
}
}
},
"post": {
"tags": [
"Boundaries"
],
"description": "Search for boundaries across all the farmers intersecting with a given geometry.\nThis API is expected to be used when users want to find boundaries that intersect with a given geometry. Otherwise, this is functionally same as 'List' API for boundaries.\n\n\r\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘Search by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Boundaries_Search",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "query",
"description": "Query filters.",
"schema": {
"$ref": "#/definitions/SearchBoundaryQuery"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/BoundaryListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Boundaries_Search": {
"$ref": "./examples/Boundaries_Search.json"
}
}
}
},
"/boundaries/cascade-delete/{jobId}": {
"get": {
"tags": [
"Boundaries"
],
"description": "Get details of cascade delete job for a specified boundary.\n\n",
"operationId": "Boundaries_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the boundary cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Boundaries_GetCascadeDeleteJobDetails": {
"$ref": "./examples/Boundaries_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"Boundaries"
],
"description": "Create a cascade delete job for a specified boundary.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "Boundaries_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the boundary cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "boundaryId",
"description": "Id of the boundary to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Boundaries_CreateCascadeDeleteJob": {
"$ref": "./examples/Boundaries_CreateCascadeDeleteJob.json"
}
}
}
},
"/farmers/{farmerId}/boundaries/{boundaryId}": {
"get": {
"tags": [
"Boundaries"
],
"description": "Get a specified boundary resource for a given farmer.\n\n",
"operationId": "Boundaries_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "boundaryId",
"description": "Id of the boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Boundary"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Boundaries_Get": {
"$ref": "./examples/Boundaries_Get.json"
}
}
},
"patch": {
"tags": [
"Boundaries"
],
"description": "Create or update a boundary resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Boundaries_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "boundaryId",
"description": "Unique Id of the boundary. This Id is unique for a given farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "boundary",
"description": "Boundary resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/Boundary"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Boundary"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Boundary"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Boundaries_CreateOrUpdate": {
"$ref": "./examples/Boundaries_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Boundaries"
],
"description": "Delete a specified boundary resource for a given farmer. It can only be deleted if it has no linked attachments, satellite or weather data.\n\n",
"operationId": "Boundaries_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "boundaryId",
"description": "Id of the boundary to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Boundaries_Delete": {
"$ref": "./examples/Boundaries_Delete.json"
}
}
}
},
"/farmers/{farmerId}/boundaries/{boundaryId}/overlap": {
"get": {
"tags": [
"Boundaries"
],
"description": "Get overlapping (intersecting) acreage between two boundaries.\n\n",
"operationId": "Boundaries_GetOverlap",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the farmer associated with the given boundary.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "boundaryId",
"description": "Id of the given boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "otherFarmerId",
"description": "Id of the farmer associated with the other boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "otherBoundaryId",
"description": "Id of the other boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/BoundaryOverlapResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Boundaries_GetOverlap": {
"$ref": "./examples/Boundaries_GetOverlap.json"
}
}
}
},
"/crops": {
"get": {
"tags": [
"Crops"
],
"description": "Get a paginated list of crop resources.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Crops_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "phenotypes",
"description": "Crops with the given list of phenotypes are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of crops to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of crops to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Crops with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Crops_List": {
"$ref": "./examples/Crops_List.json"
}
}
}
},
"/crops/{cropId}": {
"get": {
"tags": [
"Crops"
],
"description": "Get a specified crop resource.\n\n",
"operationId": "Crops_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the crop.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Crop"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Crops_Get": {
"$ref": "./examples/Crops_Get.json"
}
}
},
"patch": {
"tags": [
"Crops"
],
"description": "Create or update a crop resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Crops_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the crop resource. This Id is unique for a given tenant.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "crop",
"description": "Crop resource payload to create or update.",
"schema": {
"$ref": "#/definitions/Crop"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Crop"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Crop"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Crops_CreateOrUpdate": {
"$ref": "./examples/Crops_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Crops"
],
"description": "Delete a specified crop resource.\n\n",
"operationId": "Crops_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of crop to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Crops_Delete": {
"$ref": "./examples/Crops_Delete.json"
}
}
}
},
"/crops/{cropId}/crop-varieties": {
"get": {
"tags": [
"CropVarieties"
],
"description": "Get a paginated list of crop variety resources for a given crop and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "CropVarieties_ListByCropId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the associated crop.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "cropIds",
"description": "Crop varieties associated with the given list of crop ids are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "brands",
"description": "Crop varieties associated with the given list of brands are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "products",
"description": "Crop varieties associated with the given list of products are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of crop varieties to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of crop varieties to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Crop varieties with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropVarietyListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"CropVarieties_ListByCropId": {
"$ref": "./examples/CropVarieties_ListByCropId.json"
}
}
}
},
"/crop-varieties": {
"get": {
"tags": [
"CropVarieties"
],
"description": "Get a paginated list of crop variety resources across all the crops for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the crop Id is available, it is strongly recommended to use **‘List by Crop Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "CropVarieties_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "cropIds",
"description": "Crop varieties associated with the given list of crop ids are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "brands",
"description": "Crop varieties associated with the given list of brands are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "products",
"description": "Crop varieties associated with the given list of products are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of crop varieties to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of crop varieties to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Crop varieties with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropVarietyListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"CropVarieties_List": {
"$ref": "./examples/CropVarieties_List.json"
}
}
}
},
"/crops/{cropId}/crop-varieties/{cropVarietyId}": {
"get": {
"tags": [
"CropVarieties"
],
"description": "Get a specified crop variety resource for a given crop.\n\n",
"operationId": "CropVarieties_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the associated crop.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "cropVarietyId",
"description": "Id of the crop variety.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropVariety"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"CropVarieties_Get": {
"$ref": "./examples/CropVarieties_Get.json"
}
}
},
"patch": {
"tags": [
"CropVarieties"
],
"description": "Create or update a crop variety resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "CropVarieties_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the associated crop.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "cropVarietyId",
"description": "Unique Id of the crop variety. This Is is unique for a given crop.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "cropVariety",
"description": "Crop variety resource payload to create or update.",
"schema": {
"$ref": "#/definitions/CropVariety"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropVariety"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CropVariety"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"CropVarieties_CreateOrUpdate": {
"$ref": "./examples/CropVarieties_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"CropVarieties"
],
"description": "Delete a specified crop variety resource for a given crop.\n\n",
"operationId": "CropVarieties_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "cropId",
"description": "Id of the associated crop.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "cropVarietyId",
"description": "Id of the crop variety to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"CropVarieties_Delete": {
"$ref": "./examples/CropVarieties_Delete.json"
}
}
}
},
"/farmers": {
"get": {
"tags": [
"Farmers"
],
"description": "Get a paginated list of farmer resources for a given search criteria.\n\n",
"operationId": "Farmers_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "ids",
"description": "List of Ids of farmers to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of farmers to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Farmers with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FarmerListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Farmers_List": {
"$ref": "./examples/Farmers_List.json"
}
}
}
},
"/farmers/{farmerId}": {
"get": {
"tags": [
"Farmers"
],
"description": "Get a specified farmer resource.\n\n",
"operationId": "Farmers_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "ID of the farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farmer"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farmers_Get": {
"$ref": "./examples/Farmers_Get.json"
}
}
},
"patch": {
"tags": [
"Farmers"
],
"description": "Create or update a farmer resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Farmers_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "farmer",
"description": "Farmer resource payload to create or update.",
"schema": {
"$ref": "#/definitions/Farmer"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farmer"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farmer"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farmers_CreateOrUpdate": {
"$ref": "./examples/Farmers_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Farmers"
],
"description": "Delete a specified farmer resource. It can only be deleted if it has no linked attachments or farms.\n\n",
"operationId": "Farmers_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of farmer to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farmers_Delete": {
"$ref": "./examples/Farmers_Delete.json"
}
}
}
},
"/farmers/cascade-delete/{jobId}": {
"get": {
"tags": [
"Farmers"
],
"description": "Get details of a cascade delete job for a specified farmer.\n\n",
"operationId": "Farmers_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farmer cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farmers_GetCascadeDeleteJobDetails": {
"$ref": "./examples/Farmers_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"Farmers"
],
"description": "Create a cascade delete job for a specified farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "Farmers_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farmer cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the farmer to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Farmers_CreateCascadeDeleteJob": {
"$ref": "./examples/Farmers_CreateCascadeDeleteJob.json"
}
}
}
},
"/farm-operations/ingest-data/{jobId}": {
"put": {
"tags": [
"FarmOperations"
],
"description": "Create a farm operation data ingestion job.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "FarmOperations_CreateDataIngestionJob",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farm operation data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "job",
"description": "Job parameters supplied by the user.",
"schema": {
"$ref": "#/definitions/FarmOperationDataIngestionJob"
}
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FarmOperationDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"FarmOperations_CreateDataIngestionJob": {
"$ref": "./examples/FarmOperations_CreateDataIngestionJob.json"
}
}
},
"get": {
"tags": [
"FarmOperations"
],
"description": "Get details of a farm operation data ingestion job.\n\n",
"operationId": "FarmOperations_GetDataIngestionJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farm operation data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FarmOperationDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"FarmOperations_GetDataIngestionJobDetails": {
"$ref": "./examples/FarmOperations_GetDataIngestionJobDetails.json"
}
}
}
},
"/farmers/{farmerId}/farms": {
"get": {
"tags": [
"Farms"
],
"description": "Get a paginated list of farm resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Farms_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of farms to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of farms to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Farms with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FarmListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Farms_ListByFarmerId": {
"$ref": "./examples/Farms_ListByFarmerId.json"
}
}
}
},
"/farms": {
"get": {
"tags": [
"Farms"
],
"description": "Get a paginated list of farm resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Farms_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "ids",
"description": "List of Ids of farms to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of farms to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Farms with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FarmListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Farms_List": {
"$ref": "./examples/Farms_List.json"
}
}
}
},
"/farmers/{farmerId}/farms/{farmId}": {
"get": {
"tags": [
"Farms"
],
"description": "Get a specified farm resource for a given farmer.\n\n",
"operationId": "Farms_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "farmId",
"description": "ID of the farm.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farm"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farms_Get": {
"$ref": "./examples/Farms_Get.json"
}
}
},
"patch": {
"tags": [
"Farms"
],
"description": "Create or update a farm resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Farms_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "farmId",
"description": "Unique Id of the farm. This Id is unique for a given farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "farm",
"description": "Farm resource payload to create or update.",
"schema": {
"$ref": "#/definitions/Farm"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farm"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Farm"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farms_CreateOrUpdate": {
"$ref": "./examples/Farms_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Farms"
],
"description": "Delete a specified farm resource for a given farmer. It can only be deleted if it has no linked attachments, fields or seasonal fields.\n\n",
"operationId": "Farms_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "farmId",
"description": "Id of the farm to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farms_Delete": {
"$ref": "./examples/Farms_Delete.json"
}
}
}
},
"/farms/cascade-delete/{jobId}": {
"get": {
"tags": [
"Farms"
],
"description": "Get details of cascade delete job for a specified farm.\n\n",
"operationId": "Farms_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farm cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Farms_GetCascadeDeleteJobDetails": {
"$ref": "./examples/Farms_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"Farms"
],
"description": "Create a cascade delete job for a specified farm.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "Farms_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the farm cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "ID of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmId",
"description": "ID of the farm to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Farms_CreateCascadeDeleteJob": {
"$ref": "./examples/Farms_CreateCascadeDeleteJob.json"
}
}
}
},
"/farmers/{farmerId}/fields": {
"get": {
"tags": [
"Fields"
],
"description": "Get a paginated list of field resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Fields_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmIds",
"description": "Fields associated with the given list of farms are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Fields with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FieldListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Fields_ListByFarmerId": {
"$ref": "./examples/Fields_ListByFarmerId.json"
}
}
}
},
"/fields": {
"get": {
"tags": [
"Fields"
],
"description": "Get a paginated list of field resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Fields_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "farmIds",
"description": "Fields associated with the given list of farms are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Fields with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/FieldListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Fields_List": {
"$ref": "./examples/Fields_List.json"
}
}
}
},
"/farmers/{farmerId}/fields/{fieldId}": {
"get": {
"tags": [
"Fields"
],
"description": "Get a specified field resource for a given farmer.\n\n",
"operationId": "Fields_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "fieldId",
"description": "Id of the field.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Field"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Fields_Get": {
"$ref": "./examples/Fields_Get.json"
}
}
},
"patch": {
"tags": [
"Fields"
],
"description": "Create or update a field resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Fields_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "fieldId",
"description": "Unique Id of the field. This Id is unique for a given farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "field",
"description": "Field resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/Field"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Field"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Field"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Fields_CreateOrUpdate": {
"$ref": "./examples/Fields_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Fields"
],
"description": "Delete a specified field resource for a given farmer. It can only be deleted if it has no linked attachments, boundaries or seasonal fields.\n\n",
"operationId": "Fields_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "fieldId",
"description": "Id of the field to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Fields_Delete": {
"$ref": "./examples/Fields_Delete.json"
}
}
}
},
"/fields/cascade-delete/{jobId}": {
"get": {
"tags": [
"Fields"
],
"description": "Get details of cascade delete job for a specified field.\n\n",
"operationId": "Fields_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of field cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Fields_GetCascadeDeleteJobDetails": {
"$ref": "./examples/Fields_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"Fields"
],
"description": "Create a cascade delete job for specified field.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "Fields_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of field cascade delete job. This Id is unique for a given tenant.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "fieldId",
"description": "ID of the field to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Fields_CreateCascadeDeleteJob": {
"$ref": "./examples/Fields_CreateCascadeDeleteJob.json"
}
}
}
},
"/farmers/{farmerId}/harvest-data": {
"get": {
"tags": [
"HarvestData"
],
"description": "Get a paginated list of harvest data resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "HarvestData_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "minTotalYield",
"description": "Harvest data with total yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalYield",
"description": "Harvest data with total yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgYield",
"description": "Harvest data with average yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgYield",
"description": "Harvest data with average yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalWetMass",
"description": "Harvest data with total wet mass greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalWetMass",
"description": "Harvest data with total wet mass lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgWetMass",
"description": "Harvest data with average wet mass greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgWetMass",
"description": "Harvest data with average wet mass lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgMoisture",
"description": "Harvest data with average moisture greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMoisture",
"description": "Harvest data with average moisture lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgSpeed",
"description": "Harvest data with average speed greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgSpeed",
"description": "Harvest data with average speed lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Harvest data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the harvest operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the harvest operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Harvest operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Harvest operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Harvest operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Harvest operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Harvest operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Harvest operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Harvest operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Harvest operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of harvest operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of harvest operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Harvest data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HarvestDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"HarvestData_ListByFarmerId": {
"$ref": "./examples/HarvestData_ListByFarmerId.json"
}
}
}
},
"/harvest-data": {
"get": {
"tags": [
"HarvestData"
],
"description": "Get a paginated list of harvest data resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "HarvestData_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "minTotalYield",
"description": "Harvest data with total yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalYield",
"description": "Harvest data with total yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgYield",
"description": "Harvest data with average yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgYield",
"description": "Harvest data with average yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalWetMass",
"description": "Harvest data with total wet mass greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalWetMass",
"description": "Harvest data with total wet mass lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgWetMass",
"description": "Harvest data with average wet mass greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgWetMass",
"description": "Harvest data with average wet mass lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgMoisture",
"description": "Harvest data with average moisture greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMoisture",
"description": "Harvest data with average moisture lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgSpeed",
"description": "Harvest data with average speed greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgSpeed",
"description": "Harvest data with average speed lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Harvest data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the harvest operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the harvest operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Harvest operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Harvest operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Harvest operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Harvest operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Harvest operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Harvest operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Harvest operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Harvest operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of harvest operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of harvest operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Harvest data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HarvestDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"HarvestData_List": {
"$ref": "./examples/HarvestData_List.json"
}
}
}
},
"/farmers/{farmerId}/harvest-data/{harvestDataId}": {
"get": {
"tags": [
"HarvestData"
],
"description": "Get a specified harvest data resource for a given farmer.\n\n",
"operationId": "HarvestData_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "harvestDataId",
"description": "Id of the harvest data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HarvestData"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"HarvestData_Get": {
"$ref": "./examples/HarvestData_Get.json"
}
}
},
"patch": {
"tags": [
"HarvestData"
],
"description": "Create or update harvest data resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "HarvestData_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "harvestDataId",
"description": "IDd of the harvest data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "harvestData",
"description": "Harvest data resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/HarvestData"
}
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HarvestData"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/HarvestData"
}
}
},
"x-ms-examples": {
"HarvestData_CreateOrUpdate": {
"$ref": "./examples/HarvestData_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"HarvestData"
],
"description": "Delete a specified harvest data resource for a given farmer.\n\n",
"operationId": "HarvestData_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "harvestDataId",
"description": "Id of the harvest data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"HarvestData_Delete": {
"$ref": "./examples/HarvestData_Delete.json"
}
}
}
},
"/harvest-data/cascade-delete/{jobId}": {
"get": {
"tags": [
"HarvestData"
],
"description": "Get details of a cascade delete job for harvest data resource.\n\n",
"operationId": "HarvestData_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the harvest data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"HarvestData_GetCascadeDeleteJobDetails": {
"$ref": "./examples/HarvestData_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"HarvestData"
],
"description": "Create cascade delete job for harvest data resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "HarvestData_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the harvest data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "harvestDataId",
"description": "Id of the harvest data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"HarvestData_CreateCascadeDeleteJob": {
"$ref": "./examples/HarvestData_CreateCascadeDeleteJob.json"
}
}
}
},
"/image-processing/rasterize/{jobId}": {
"put": {
"tags": [
"ImageProcessing"
],
"description": "Create a job which converts shape files into raster images.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "ImageProcessing_CreateRasterizeJob",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Unique Id of the image processing (rasterize) job. This Id must be unique for a given tenant.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "job",
"description": "Job parameters supplied by the user.",
"schema": {
"$ref": "#/definitions/ImageProcessingRasterizeJob"
}
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ImageProcessingRasterizeJob"
}
},
"default": {
"description": "Error"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"ImageProcessing_CreateRasterizeJob": {
"$ref": "./examples/ImageProcessing_CreateRasterizeJob.json"
}
}
},
"get": {
"tags": [
"ImageProcessing"
],
"description": "Get details of rasterize job. Rasterize job converts shape files into raster images.\n\n",
"operationId": "ImageProcessing_GetRasterizeJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the image processing (rasterize) job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/ImageProcessingRasterizeJob"
}
}
},
"x-ms-examples": {
"ImageProcessing_GetRasterizeJob": {
"$ref": "./examples/ImageProcessing_GetRasterizeJob.json"
}
}
}
},
"/oauth/providers": {
"get": {
"tags": [
"OAuthProviders"
],
"description": "Get a paginated list of OAuth provider resources for a given search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "OAuthProviders_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "ids",
"description": "List of Ids of OAuth providers to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of OAuth providers to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "OAuth providers with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProviderListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"OAuthProviders_List": {
"$ref": "./examples/OAuthProviders_List.json"
}
}
}
},
"/oauth/providers/{oauthProviderId}": {
"get": {
"tags": [
"OAuthProviders"
],
"description": "Get a specified OAuth provider resource.\n\n",
"operationId": "OAuthProviders_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "oauthProviderId",
"description": "Id of the OAuth provider resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProvider"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthProviders_Get": {
"$ref": "./examples/OAuthProviders_Get.json"
}
}
},
"patch": {
"tags": [
"OAuthProviders"
],
"description": "Create or update an OAuth provider resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "OAuthProviders_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "oauthProviderId",
"description": "Id of the OAuth provider resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "oauthProvider",
"description": "OauthProvider resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/OAuthProvider"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProvider"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProvider"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthProviders_CreateOrUpdate": {
"$ref": "./examples/OAuthProviders_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"OAuthProviders"
],
"description": "Delete a specified OAuth provider resource.\n\n",
"operationId": "OAuthProviders_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "oauthProviderId",
"description": "Id of the OAuth provider resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthProviders_Delete": {
"$ref": "./examples/OAuthProviders_Delete.json"
}
}
}
},
"/oauth/providers/cascade-delete/{jobId}": {
"get": {
"tags": [
"OAuthProviders"
],
"description": "Get details of cascade delete job for an OAuth provider resource.\n\n",
"operationId": "OAuthProviders_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the OAuth provider cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProviderCascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthProviders_GetCascadeDeleteJobDetails": {
"$ref": "./examples/OAuthProviders_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"OAuthProviders"
],
"description": "Create cascade delete job for an OAuth provider resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "OAuthProviders_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the OAuth provider cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "oauthProviderId",
"description": "Id of the OAuth provider resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthProviderCascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"OAuthProviders_CreateCascadeDeleteJob": {
"$ref": "./examples/OAuthProviders_CreateCascadeDeleteJob.json"
}
}
}
},
"/oauth/tokens": {
"get": {
"tags": [
"OAuthTokens"
],
"description": "Get a list of OAuthToken documents for a given search criteria.\n\n",
"operationId": "OAuthTokens_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "authProviderIds",
"description": "List of Ids of OAuth providers to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "farmerIds",
"description": "List of Ids of associated farmers.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "isValid",
"description": "If set, only valid (non expired) OAuth tokens are returned.",
"type": "boolean"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/OAuthTokenListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"OAuthTokens_List": {
"$ref": "./examples/OAuthTokens_List.json"
}
}
}
},
"/oauth/tokens/:connect": {
"post": {
"tags": [
"OAuthTokens"
],
"description": "Get connection link needed in the OAuth flow.\n\n",
"operationId": "OAuthTokens_GetOAuthConnectionLink",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "connectRequest",
"description": "OAuth Connect Request.",
"schema": {
"$ref": "#/definitions/OAuthConnectRequest"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "string"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthTokens_GetOAuthConnectionLink": {
"$ref": "./examples/OAuthTokens_GetOAuthConnectionLink.json"
}
}
}
},
"/oauth/tokens/remove/{jobId}": {
"get": {
"tags": [
"OAuthTokens"
],
"description": "Get details of OAuth token remove job.\n\n",
"operationId": "OAuthTokens_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the OAuth token removal job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"OAuthTokens_GetCascadeDeleteJobDetails": {
"$ref": "./examples/OAuthTokens_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"OAuthTokens"
],
"description": "Create job to remove OAuth token.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "OAuthTokens_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the OAuth token removal job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "oauthProviderId",
"description": "Id of the OAuth provider resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"OAuthTokens_CreateCascadeDeleteJob": {
"$ref": "./examples/OAuthTokens_CreateCascadeDeleteJob.json"
}
}
}
},
"/farmers/{farmerId}/planting-data": {
"get": {
"tags": [
"PlantingData"
],
"description": "Get a paginated list of planting data resources for a given farm and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "PlantingData_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "minAvgPlantingRate",
"description": "Planting data with average planting rate greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgPlantingRate",
"description": "Planting data with average planting rate lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalMaterial",
"description": "Planting data with total material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalMaterial",
"description": "Planting data with total material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgMaterial",
"description": "Planting data with average material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMaterial",
"description": "Planting data with total material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Planting data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the planting operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the planting operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Planting operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Planting operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Planting operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Planting operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Planting operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Planting operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Planting operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Planting operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of planting operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of planting operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Planting data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/PlantingDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"PlantingData_ListByFarmerId": {
"$ref": "./examples/PlantingData_ListByFarmerId.json"
}
}
}
},
"/planting-data": {
"get": {
"tags": [
"PlantingData"
],
"description": "Get a paginated list of planting data resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "PlantingData_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "minAvgPlantingRate",
"description": "Planting data with average planting rate greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgPlantingRate",
"description": "Planting data with average planting rate lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTotalMaterial",
"description": "Planting data with total material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTotalMaterial",
"description": "Planting data with total material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minAvgMaterial",
"description": "Planting data with average material greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgMaterial",
"description": "Planting data with average material lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Planting data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the planting operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the planting operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Planting operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Planting operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Planting operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Planting operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Planting operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Planting operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Planting operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Planting operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of planting operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of planting operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Planting data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/PlantingDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"PlantingData_List": {
"$ref": "./examples/PlantingData_List.json"
}
}
}
},
"/farmers/{farmerId}/planting-data/{plantingDataId}": {
"get": {
"tags": [
"PlantingData"
],
"description": "Get a specified planting data resource for a given farmer.\n\n",
"operationId": "PlantingData_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "plantingDataId",
"description": "Id of the planting data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/PlantingData"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"PlantingData_Get": {
"$ref": "./examples/PlantingData_Get.json"
}
}
},
"patch": {
"tags": [
"PlantingData"
],
"description": "Create or update a planting data resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "PlantingData_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "plantingDataId",
"description": "Id of the planting data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "plantingData",
"description": "Planting data resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/PlantingData"
}
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/PlantingData"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/PlantingData"
}
}
},
"x-ms-examples": {
"PlantingData_CreateOrUpdate": {
"$ref": "./examples/PlantingData_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"PlantingData"
],
"description": "Delete a specified planting data resource under a particular farmer.\n\n",
"operationId": "PlantingData_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "plantingDataId",
"description": "Id of the planting data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"PlantingData_Delete": {
"$ref": "./examples/PlantingData_Delete.json"
}
}
}
},
"/planting-data/cascade-delete/{jobId}": {
"get": {
"tags": [
"PlantingData"
],
"description": "Get details of a cascade delete job for planting data resource.\n\n",
"operationId": "PlantingData_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the planting data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"PlantingData_GetCascadeDeleteJobDetails": {
"$ref": "./examples/PlantingData_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"PlantingData"
],
"description": "Create cascade delete job for planting data resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "PlantingData_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the planting data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "plantingDataId",
"description": "Id of the planting data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"PlantingData_CreateCascadeDeleteJob": {
"$ref": "./examples/PlantingData_CreateCascadeDeleteJob.json"
}
}
}
},
"/scenes": {
"get": {
"tags": [
"Scenes"
],
"description": "Get a paginated list of scene resources for a given search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n2. This API will retrieve scenes present in the FarmBeats datastore and does not ingest new data. Example: a user has ingested satellite data from 1st of Jan 2019 to 30th of June 2019. However, using the current API, the user has asked for data from 1st of Jan 2019 to 31st of December 2019. In such a case, only data for the first 6 months is returned to the user.\n\n",
"operationId": "Scenes_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "provider",
"description": "Name of the data provider for the scene. For satellite imagery, this refers to the name of the satellite data provider.",
"required": true,
"type": "string",
"default": "Microsoft"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "boundaryId",
"description": "Id of the associated boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "source",
"description": "Source from where the scene was procured/generated. For satellite imagery, this refers to the name of the satellite constellation.",
"type": "string",
"default": "Sentinel_2_L2A"
},
{
"in": "query",
"name": "startDateTime",
"description": "Scenes that were captured/made available (at source) at or after this UTC Date-time is returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "endDateTime",
"description": "Scenes that were captured/made available (at source) at or before this UTC Date-time is returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCloudCoveragePercentage",
"description": "Scenes with cloud cover less than or equal to the given value are returned. Range [0 to 100.0].",
"type": "number",
"format": "double",
"default": 100,
"maximum": 100,
"minimum": 0
},
{
"in": "query",
"name": "maxDarkPixelCoveragePercentage",
"description": "Scenes with dark pixel cover less than or equal to the given value are returned. Range [0 to 100.0].",
"type": "number",
"format": "double",
"default": 100,
"maximum": 100,
"minimum": 0
},
{
"in": "query",
"name": "imageNames",
"description": "List of names of images to be fetched.\r\nFor Sentinel-2, allowed values are: 'B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09', 'B11', 'B12', 'AOT', 'SCL', 'SNW', 'CLD', 'NDVI', 'NDWI', 'EVI', 'LAI', 'LAIMask', 'CLP', 'CLM', 'dataMask', sunAzimuthAngles, sunZenithAngles, viewAzimuthMean and viewZenithMean.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "imageResolutions",
"description": "List of image resolutions in meters. For Sentinel-2, available values are: 10, 20, 60.",
"type": "array",
"items": {
"format": "double",
"type": "number"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "imageFormats",
"description": "Format in which the scenes are to be returned. Available value: TIF.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SceneListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Scenes_List": {
"$ref": "./examples/Scenes_List.json"
}
}
}
},
"/scenes/satellite/ingest-data/{jobId}": {
"put": {
"tags": [
"Scenes"
],
"description": "Create a satellite data ingestion job.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Scenes_CreateSatelliteDataIngestionJob",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the satellite data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "job",
"description": "Job parameters supplied by the user.",
"schema": {
"$ref": "#/definitions/SatelliteDataIngestionJob"
}
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SatelliteDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Scenes_CreateSatelliteDataIngestionJob": {
"$ref": "./examples/Scenes_CreateSatelliteDataIngestionJob.json"
}
}
},
"get": {
"tags": [
"Scenes"
],
"description": "Get details of a satellite data ingestion job.\n\n",
"operationId": "Scenes_GetSatelliteDataIngestionJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the satellite data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SatelliteDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Scenes_GetSatelliteDataIngestionJobDetails": {
"$ref": "./examples/Scenes_GetSatelliteDataIngestionJobDetails.json"
}
}
}
},
"/scenes/downloadFiles": {
"get": {
"tags": [
"Scenes"
],
"description": "Return scenes as a file stream for a given input filePath.\n\n",
"operationId": "Scenes_Download",
"produces": [
"application/octet-stream",
"application/json"
],
"parameters": [
{
"in": "query",
"name": "filePath",
"description": "Relative path where the scene is stored in cloud storage.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"format": "binary",
"type": "file"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Scenes_Download": {
"$ref": "./examples/Scenes_Download.json"
}
}
}
},
"/farmers/{farmerId}/seasonal-fields": {
"get": {
"tags": [
"SeasonalFields"
],
"description": "Get a paginated list of seasonal field resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "SeasonalFields_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmIds",
"description": "Seasonal fields associated with the given farms are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "fieldIds",
"description": "Seasonal fields associated with the given fields are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "seasonIds",
"description": "Seasonal fields associated with the given seasons are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "cropVarietyIds",
"description": "Seasonal fields associated with at least one of the given crop varieties are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "cropIds",
"description": "Seasonal fields associated with at least one of the given crops are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minAvgYieldValue",
"description": "Seasonal fields with average yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgYieldValue",
"description": "Seasonal fields with average yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "avgYieldUnit",
"description": "Unit of the average yield.",
"type": "string"
},
{
"in": "query",
"name": "minAvgSeedPopulationValue",
"description": "Seasonal fields with average seed population greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgSeedPopulationValue",
"description": "Seasonal fields with average seed population lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "avgSeedPopulationUnit",
"description": "Unit of average seed population.",
"type": "string"
},
{
"in": "query",
"name": "minPlantingDateTime",
"description": "Seasonal fields with planting date at or after the value specified will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxPlantingDateTime",
"description": "Seasonal fields with planting date at or before the value specified will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of seasonal fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of seasonal fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Seasonal fields with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonalFieldListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"SeasonalFields_ListByFarmerId": {
"$ref": "./examples/SeasonalFields_ListByFarmerId.json"
}
}
}
},
"/seasonal-fields": {
"get": {
"tags": [
"SeasonalFields"
],
"description": "Get a paginated list of seasonal field resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "SeasonalFields_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "farmIds",
"description": "Seasonal fields associated with the given farms are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "fieldIds",
"description": "Seasonal fields associated with the given fields are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "seasonIds",
"description": "Seasonal fields associated with the given seasons are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "cropVarietyIds",
"description": "Seasonal fields associated with at least one of the given crop varieties are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "cropIds",
"description": "Seasonal fields associated with at least one of the given crops are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minAvgYieldValue",
"description": "Seasonal fields with average yield greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgYieldValue",
"description": "Seasonal fields with average yield lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "avgYieldUnit",
"description": "Unit of the average yield.",
"type": "string"
},
{
"in": "query",
"name": "minAvgSeedPopulationValue",
"description": "Seasonal fields with average seed population greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxAvgSeedPopulationValue",
"description": "Seasonal fields with average seed population lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "avgSeedPopulationUnit",
"description": "Unit of average seed population.",
"type": "string"
},
{
"in": "query",
"name": "minPlantingDateTime",
"description": "Seasonal fields with planting date at or after the value specified will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxPlantingDateTime",
"description": "Seasonal fields with planting date at or before the value specified will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of seasonal fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of seasonal fields to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Seasonal fields with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonalFieldListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"SeasonalFields_List": {
"$ref": "./examples/SeasonalFields_List.json"
}
}
}
},
"/farmers/{farmerId}/seasonal-fields/{seasonalFieldId}": {
"get": {
"tags": [
"SeasonalFields"
],
"description": "Get a specified seasonal field resource for a given farmer.\n\n",
"operationId": "SeasonalFields_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "seasonalFieldId",
"description": "Id of the seasonal field.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonalField"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"SeasonalFields_Get": {
"$ref": "./examples/SeasonalFields_Get.json"
}
}
},
"patch": {
"tags": [
"SeasonalFields"
],
"description": "Create or update a seasonal field resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "SeasonalFields_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "seasonalFieldId",
"description": "Unique Id of the seasonal field. This Id is unique for a given farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "seasonalField",
"description": "Seasonal field resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/SeasonalField"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonalField"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonalField"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"SeasonalFields_CreateOrUpdate": {
"$ref": "./examples/SeasonalFields_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"SeasonalFields"
],
"description": "Delete a specified seasonal field resource for a given farmer. It can only be deleted if it has no linked attachments or boundaries.\n\n",
"operationId": "SeasonalFields_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "seasonalFieldId",
"description": "Id of the seasonal field to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"SeasonalFields_Delete": {
"$ref": "./examples/SeasonalFields_Delete.json"
}
}
}
},
"/seasonal-fields/cascade-delete/{jobId}": {
"get": {
"tags": [
"SeasonalFields"
],
"description": "Get details of cascade delete job for a specified seasonal field.\n\n",
"operationId": "SeasonalFields_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the seasonal field cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"SeasonalFields_GetCascadeDeleteJobDetails": {
"$ref": "./examples/SeasonalFields_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"SeasonalFields"
],
"description": "Create a cascade delete job for a specified seasonal field.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "SeasonalFields_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the seasonal field cascade delete job. This Id is unique for a given tenant.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "seasonalFieldId",
"description": "Id of the seasonal field to be deleted.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"SeasonalFields_CreateCascadeDeleteJob": {
"$ref": "./examples/SeasonalFields_CreateCascadeDeleteJob.json"
}
}
}
},
"/seasons": {
"get": {
"tags": [
"Seasons"
],
"description": "Get a paginated list of season resources.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "Seasons_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "minStartDateTime",
"description": "Seasons which start at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxStartDateTime",
"description": "Seasons which start at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minEndDateTime",
"description": "Seasons which end at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxEndDateTime",
"description": "Seasons which end at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "years",
"description": "Seasons with given list of years are returned.",
"type": "array",
"items": {
"format": "int32",
"type": "integer"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of seasons to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of seasons to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Seasons with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/SeasonListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Seasons_List": {
"$ref": "./examples/Seasons_List.json"
}
}
}
},
"/seasons/{seasonId}": {
"get": {
"tags": [
"Seasons"
],
"description": "Get a specified season resource.\n\n",
"operationId": "Seasons_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "seasonId",
"description": "Id of the season.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Season"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Seasons_Get": {
"$ref": "./examples/Seasons_Get.json"
}
}
},
"patch": {
"tags": [
"Seasons"
],
"description": "Create or update a season resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Seasons_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "seasonId",
"description": "Unique Id of the season. This Id is unique for a given tenant.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "season",
"description": "Season resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/Season"
}
}
],
"responses": {
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Season"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Season"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Seasons_CreateOrUpdate": {
"$ref": "./examples/Seasons_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"Seasons"
],
"description": "Delete a specified season resource.\n\n",
"operationId": "Seasons_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "seasonId",
"description": "Id of the season.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Seasons_Delete": {
"$ref": "./examples/Seasons_Delete.json"
}
}
}
},
"/farmers/{farmerId}/tillage-data": {
"get": {
"tags": [
"TillageData"
],
"description": "Get a paginated list of tillage data resources for a given farmer and search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "TillageData_ListByFarmerId",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "minTillageDepth",
"description": "Tillage data with tillage depth greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTillageDepth",
"description": "Tillage data with tillage depth lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTillagePressure",
"description": "Tillage data with tillage pressure greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTillagePressure",
"description": "Tillage data with tillage pressure lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Tillage data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the tillage operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the tillage operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Tillage operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Tillage operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Tillage operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Tillage operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Tillage operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Tillage operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Tillage operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Tillage operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of tillage operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of tillage operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Tillage data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TillageDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"TillageData_ListByFarmerId": {
"$ref": "./examples/TillageData_ListByFarmerId.json"
}
}
}
},
"/tillage-data": {
"get": {
"tags": [
"TillageData"
],
"description": "Get a paginated list of tillage data resources across all the farmers for a given search criteria.\n\n\r###### Note:\n1. This API does a serial search of the database for the given search criteria. If the farmer Id is available, it is strongly recommended to use **‘List by Farmer Id’** API as it is performant.\n2. Users will get paginated response with each page containing a link to the next page. Few pages may have **no items (zero results)**. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n\n",
"operationId": "TillageData_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "minTillageDepth",
"description": "Tillage data with tillage depth greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTillageDepth",
"description": "Tillage data with tillage depth lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "minTillagePressure",
"description": "Tillage data with tillage pressure greater than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxTillagePressure",
"description": "Tillage data with tillage pressure lesser than or equal to the value specified will be returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "sources",
"description": "Tillage data obtained from the given list of sources will be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "associatedBoundaryIds",
"description": "List of boundary Ids of the field/seasonal field on which the tillage operation was done.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "operationBoundaryIds",
"description": "List of the boundary Ids that were created using the geographical area on which the tillage operation was carried out.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minOperationStartDateTime",
"description": "Tillage operations that began at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationStartDateTime",
"description": "Tillage operations that began at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationEndDateTime",
"description": "Tillage operations that ended at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationEndDateTime",
"description": "Tillage operations that ended at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minOperationModifiedDateTime",
"description": "Tillage operations that were modified (at source) at or after the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxOperationModifiedDateTime",
"description": "Tillage operations that were modified (at source) at or before the given UTC date-time is returned.",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minArea",
"description": "Tillage operations carried over area greater than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "maxArea",
"description": "Tillage operations carried over area lesser than or equal to the given value is returned.",
"type": "number",
"format": "double"
},
{
"in": "query",
"name": "ids",
"description": "List of Ids of tillage operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "names",
"description": "List of names of tillage operations to be returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "propertyFilters",
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "statuses",
"description": "Tillage data with only the given statuses are returned.",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"in": "query",
"name": "minCreatedDateTime",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxCreatedDateTime",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "minLastModifiedDateTime",
"description": "Resources last modified at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "maxLastModifiedDateTime",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TillageDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"TillageData_List": {
"$ref": "./examples/TillageData_List.json"
}
}
}
},
"/farmers/{farmerId}/tillage-data/{tillageDataId}": {
"get": {
"tags": [
"TillageData"
],
"description": "Get a specified tillage data resource for a given farmer.\n\n",
"operationId": "TillageData_Get",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "tillageDataId",
"description": "Id of the tillage data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TillageData"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"TillageData_Get": {
"$ref": "./examples/TillageData_Get.json"
}
}
},
"patch": {
"tags": [
"TillageData"
],
"description": "Create or update a tillage data resource for a given farmer.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/merge-patch+json'**.\n2. 'Id' of a resource can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of an ‘Id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "TillageData_CreateOrUpdate",
"consumes": [
"application/merge-patch+json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "tillageDataId",
"description": "Id of the tillage data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "tillageData",
"description": "Tillage data resource payload to Create or update.",
"schema": {
"$ref": "#/definitions/TillageData"
}
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TillageData"
}
},
"201": {
"description": "Success",
"schema": {
"$ref": "#/definitions/TillageData"
}
}
},
"x-ms-examples": {
"TillageData_CreateOrUpdate": {
"$ref": "./examples/TillageData_CreateOrUpdate.json"
}
}
},
"delete": {
"tags": [
"TillageData"
],
"description": "Delete a specified tillage data resource for a given farmer.\n\n",
"operationId": "TillageData_Delete",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "path",
"name": "tillageDataId",
"description": "Id of the tillage data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "Success"
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"TillageData_Delete": {
"$ref": "./examples/TillageData_Delete.json"
}
}
}
},
"/tillage-data/cascade-delete/{jobId}": {
"get": {
"tags": [
"TillageData"
],
"description": "Get details of a cascade delete job for tillage data resource.\n\n",
"operationId": "TillageData_GetCascadeDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the tillage data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"TillageData_GetCascadeDeleteJobDetails": {
"$ref": "./examples/TillageData_GetCascadeDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"TillageData"
],
"description": "Create cascade delete job for tillage data resource.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n\n",
"operationId": "TillageData_CreateCascadeDeleteJob",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the tillage data cascade delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "tillageDataId",
"description": "Id of the tillage data resource.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CascadeDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"TillageData_CreateCascadeDeleteJob": {
"$ref": "./examples/TillageData_CreateCascadeDeleteJob.json"
}
}
}
},
"/weather": {
"get": {
"tags": [
"Weather"
],
"description": "Get a paginated list of weather data resources for a given search criteria.\n\n\r###### Note: \n1. Users will get paginated response with each page containing a link to the next page. Users are expected to iterate over all the pages using ‘nextLink’. The search comes to an end when ‘nextLink’ is null.\n2. This API will retrieve weather data present in the FarmBeats datastore and does not ingest new data. Example: a user has ingested historical weather data from 1st of Jan 2019 to 30th of June 2019. However, using the current API, the user has asked for historical data from 1st of Jan 2019 to 31st of December 2019. In such a case, only data for the first 6 months is returned to the user.\n\n",
"operationId": "Weather_List",
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "farmerId",
"description": "Id of the associated farmer.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "boundaryId",
"description": "Id of the associated boundary.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "extensionId",
"description": "Id of the weather extension. This signifies the source from where the weather data is fetched (eg. DTN.ClearAg).",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$"
},
{
"in": "query",
"name": "weatherDataType",
"description": "Type of weather data (forecast/historical).",
"required": true,
"type": "string",
"maxLength": 50,
"minLength": 0
},
{
"in": "query",
"name": "granularity",
"description": "Granularity of weather data (daily/hourly).",
"required": true,
"type": "string",
"maxLength": 50,
"minLength": 0
},
{
"in": "query",
"name": "startDateTime",
"description": "Weather data at or after the given UTC Date-time will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "endDateTime",
"description": "Weather data at or before the given UTC Date-time will be returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"format": "date-time"
},
{
"in": "query",
"name": "$maxPageSize",
"description": "Maximum number of items to be returned in a single page.",
"type": "integer",
"format": "int32",
"default": 50,
"maximum": 1000,
"minimum": 10
},
{
"in": "query",
"name": "$skipToken",
"description": "Skip token for getting next set of results.",
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/WeatherDataListResponse"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Weather_List": {
"$ref": "./examples/Weather_List.json"
}
}
}
},
"/weather/ingest-data/{jobId}": {
"get": {
"tags": [
"Weather"
],
"description": "Get details of a weather data ingestion job.\n\n",
"operationId": "Weather_GetDataIngestionJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the weather data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/WeatherDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Weather_GetDataIngestionJobDetails": {
"$ref": "./examples/Weather_GetDataIngestionJobDetails.json"
}
}
},
"put": {
"tags": [
"Weather"
],
"description": "Create a weather data ingestion job.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Weather_CreateDataIngestionJob",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the weather data ingestion job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "job",
"description": "Job parameters supplied by the user.",
"schema": {
"$ref": "#/definitions/WeatherDataIngestionJob"
}
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/WeatherDataIngestionJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Weather_CreateDataIngestionJob": {
"$ref": "./examples/Weather_CreateDataIngestionJob.json"
}
}
}
},
"/weather/delete-data/{jobId}": {
"get": {
"tags": [
"Weather"
],
"description": "Get details of a weather data delete job.\n\n",
"operationId": "Weather_GetDataDeleteJobDetails",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the weather data delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/WeatherDataDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Weather_GetDataDeleteJobDetails": {
"$ref": "./examples/Weather_GetDataDeleteJobDetails.json"
}
}
},
"put": {
"tags": [
"Weather"
],
"description": "Create a weather data delete job.\n\n\r###### Note:\n\r1. The **‘contentType’** in the request header should be **'application/json'**.\n2. ‘Job id’ can only contain alphanumeric characters, '-', '_', '~' or '.', and must begin and end with an alphanumeric character. Minimum length of a ‘Job id’ is 2 characters and maximum length is 50 characters.\n3. 'Key' and 'value' in 'Properties' can have a maximum of 50 and 150 characters respectively.\n\n",
"operationId": "Weather_CreateDataDeleteJob",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "jobId",
"description": "Id of the weather data delete job.",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "api-version",
"description": "The requested API version.",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "job",
"description": "Job parameters supplied by the user.",
"schema": {
"$ref": "#/definitions/WeatherDataDeleteJob"
}
}
],
"responses": {
"202": {
"description": "Success",
"schema": {
"$ref": "#/definitions/WeatherDataDeleteJob"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Weather_CreateDataDeleteJob": {
"$ref": "./examples/Weather_CreateDataDeleteJob.json"
}
}
}
}
},
"parameters": {
"Endpoint": {
"name": "Endpoint",
"description": "The endpoint of your FarmBeats resource (protocol and hostname, for example: https://{resourceName}.farmbeats.azure.net).",
"x-ms-parameter-location": "client",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true
}
},
"definitions": {
"Measure": {
"description": "Schema for storing measurement reading and unit.",
"type": "object",
"properties": {
"unit": {
"description": "Data unit.",
"maxLength": 50,
"minLength": 1,
"type": "string"
},
"value": {
"format": "double",
"description": "Data value.",
"type": "number"
}
}
},
"ApplicationProductDetail": {
"description": "Schema of a product used during application.",
"type": "object",
"properties": {
"productName": {
"description": "Name of a product applied.",
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"isCarrier": {
"description": "Indicates if the product is a carrier for a tank mix.",
"default": false,
"type": "boolean"
},
"avgMaterial": {
"$ref": "#/definitions/Measure"
},
"totalMaterial": {
"$ref": "#/definitions/Measure"
}
}
},
"ApplicationData": {
"description": "Schema of application data resource.",
"type": "object",
"properties": {
"applicationProductDetails": {
"description": "Application product details.",
"type": "array",
"items": {
"$ref": "#/definitions/ApplicationProductDetail"
}
},
"avgMaterial": {
"$ref": "#/definitions/Measure"
},
"totalMaterial": {
"$ref": "#/definitions/Measure"
},
"area": {
"$ref": "#/definitions/Measure"
},
"source": {
"description": "Represents the source from which the application data was obtained.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"operationModifiedDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation data was modified at the source (format: yyyy-MM-ddTHH:mm:ssZ). This will be specified by the source.",
"type": "string"
},
"operationStartDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"operationEndDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"attachmentsLink": {
"description": "Link to 'Attachments API' that can be used to find shapefiles, raster files or any other attachments associated with this operation.",
"type": "string",
"readOnly": true
},
"associatedBoundaryId": {
"description": "Id of the boundary of the field/seasonal field on which the application operation was done.",
"type": "string"
},
"operationBoundaryId": {
"description": "Id of the boundary that is created using the geographical area on which the application operation was carried out.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the operation (application). This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the application operation.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the application operation.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"ApplicationDataListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/ApplicationData"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"InnerError": {
"description": "Inner error containing list of errors.\r\nInnerError reference document.",
"type": "object",
"properties": {
"code": {
"description": "Specific error code than was provided by the containing error.",
"type": "string"
},
"innererror": {
"$ref": "#/definitions/InnerError"
}
},
"additionalProperties": {
"type": "object"
}
},
"Error": {
"description": "An error from Azure FarmBeats service.",
"type": "object",
"properties": {
"code": {
"description": "Server-defined set of error codes.",
"type": "string"
},
"message": {
"description": "Human-readable representation of the error.",
"type": "string"
},
"target": {
"description": "Target of the error.",
"type": "string"
},
"details": {
"description": "Array of details about specific errors that led to this reported error.",
"type": "array",
"items": {
"$ref": "#/definitions/Error"
}
},
"innererror": {
"$ref": "#/definitions/InnerError"
}
}
},
"ErrorResponse": {
"description": "An error response from Azure AgPlatform service.\r\nErrorResponse reference document..",
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/Error"
},
"traceId": {
"description": "Unique trace Id.",
"type": "string"
}
}
},
"CascadeDeleteJob": {
"description": "Schema of cascade delete job.",
"required": [
"farmerId",
"resourceId",
"resourceType"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Farmer Id.",
"type": "string"
},
"resourceId": {
"description": "The id of the resource which is to be deleted (along with the subtree & associated data).",
"type": "string"
},
"resourceType": {
"description": "Signifies the type of the resource that is being deleted (along with the subtree & associated data).",
"type": "string"
},
"id": {
"description": "Unique Id of the cascade delete job. This Id is unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"enum": [
"Waiting",
"Running",
"Succeeded",
"Failed",
"Cancelled"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "JobStatus",
"modelAsString": true
}
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
}
}
},
"Attachment": {
"description": "Schema of attachment resource.",
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"resourceId": {
"description": "This is the Id of the resource to which the attachment belongs. Ids of following entities are valid: Farmer, Farm, Field, Seasonal field, Boundary, Application data, Harvest data, Tillage data and Planting data.",
"type": "string"
},
"resourceType": {
"description": "Indicates the type of resource to which this attachment belongs. Valid values are Farmer, Farm, Field, SeasonalField, Boundary, ApplicationData, HarvestData, TillageDat and PlantingData.",
"type": "string"
},
"originalFileName": {
"description": "Original file name of the attachment.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the attachment. This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the attachment.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the attachment.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
}
}
},
"AttachmentListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Attachment"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"GeoJsonObjectType": {
"description": "GeoJSON object type.",
"enum": [
"Point",
"Polygon",
"MultiPolygon"
],
"type": "string",
"x-ms-enum": {
"name": "GeoJsonObjectType",
"modelAsString": true
}
},
"GeoJsonObject": {
"description": "GeoJSON abstract class.",
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/GeoJsonObjectType"
}
},
"discriminator": "type"
},
"Boundary": {
"description": "Schema of boundary resource.",
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"parentId": {
"description": "If the boundary is associated with a field or a seasonal field then the parent id refers to the id of the field/seasonal field.",
"type": "string"
},
"geometry": {
"$ref": "#/definitions/GeoJsonObject"
},
"isPrimary": {
"description": "Indicates if the boundary is a primary boundary for the associated parent (if any).",
"type": "boolean"
},
"acreage": {
"format": "double",
"description": "Area of the boundary in acres.",
"type": "number",
"readOnly": true
},
"parentType": {
"description": "Indicates if the parent is a field or a seasonal field. Permissible values are 'Field' and 'SeasonalField'.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the boundary. This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the boundary.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the boundary.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
}
}
},
"example": {
"name": "string",
"description": "string",
"parentId": "string",
"isPrimary": false,
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
73.70457172393799,
20.545385304358106
],
[
73.70457172393799,
20.545385304358106
],
[
73.70448589324951,
20.542411534243367
],
[
73.70877742767334,
20.541688176010233
],
[
73.71023654937744,
20.545083911372505
],
[
73.70663166046143,
20.546992723579137
],
[
73.70457172393799,
20.545385304358106
]
]
]
}
}
},
"BoundaryListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Boundary"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"SearchBoundaryQuery": {
"description": "SearchAllBoundaries and SearchBoundaries parameters.",
"type": "object",
"properties": {
"ids": {
"description": "List of boundary Ids to be searched.",
"type": "array",
"items": {
"type": "string"
}
},
"names": {
"description": "List of names of boundaries to be searched.",
"type": "array",
"items": {
"type": "string"
}
},
"propertyFilters": {
"description": "Filters on key-value pairs within 'Properties'.\r\neg. \"{testKey} eq {testValue}\".",
"type": "array",
"items": {
"type": "string"
}
},
"statuses": {
"description": "List of statuses of boundaries to be searched.",
"type": "array",
"items": {
"type": "string"
}
},
"minCreatedDateTime": {
"format": "date-time",
"description": "Resources created at or after the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"maxCreatedDateTime": {
"format": "date-time",
"description": "Resources created at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"minLastModifiedDateTime": {
"format": "date-time",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"maxLastModifiedDateTime": {
"format": "date-time",
"description": "Resources last modified at or before the given UTC date-time are returned (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"$maxPageSize": {
"format": "int32",
"description": "Maximum number of items to be returned in a single page.",
"default": 50,
"maximum": 1000,
"minimum": 10,
"type": "integer"
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"isPrimary": {
"description": "If set, search result will contain only primary boundaries.",
"type": "boolean"
},
"parentType": {
"description": "Used to search based on the parent type (Field/ SeasonalField).",
"type": "string"
},
"parentIds": {
"description": "List of parent Ids whose boundaries are to be retrieved.",
"type": "array",
"items": {
"type": "string"
}
},
"minAcreage": {
"format": "double",
"description": "Minimum acreage of the boundary (inclusive).",
"type": "number"
},
"maxAcreage": {
"format": "double",
"description": "Maximum acreage of the boundary (inclusive).",
"type": "number"
},
"intersectsWithGeometry": {
"$ref": "#/definitions/GeoJsonObject"
}
}
},
"BoundaryOverlapResponse": {
"description": "Schema of boundary overlap response.",
"type": "object",
"properties": {
"boundaryAcreage": {
"format": "double",
"description": "Acreage of the main boundary.",
"type": "number"
},
"otherBoundaryAcreage": {
"format": "double",
"description": "Acreage of the other boundary.",
"type": "number"
},
"intersectingAcreage": {
"format": "double",
"description": "Acreage of the intersecting area between the given boundaries.",
"type": "number"
}
}
},
"Crop": {
"description": "Schema of crop resource.",
"type": "object",
"properties": {
"phenotype": {
"description": "Phenotype of the crop.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"id": {
"description": "Unique Id of the crop.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the crop.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the crop.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"CropListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Crop"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"CropVariety": {
"description": "Schema of crop variety resource.",
"type": "object",
"properties": {
"cropId": {
"description": "Id of the associated crop.",
"type": "string",
"readOnly": true
},
"brand": {
"description": "Brand of the crop variety.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"product": {
"description": "Commercial name of the crop variety.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"id": {
"description": "Unique Id of the crop variety. This Id is unique for a given crop.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the crop variety.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the crop variety.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"CropVarietyListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/CropVariety"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"Farmer": {
"description": "Schema of farmer resource.",
"type": "object",
"properties": {
"id": {
"description": "Unique Id of the farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the farmer.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the farmer.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"FarmerListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Farmer"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"FarmOperationDataIngestionJob": {
"description": "Schema of farm operation data ingestion job.",
"required": [
"authProviderId",
"farmerId",
"startYear"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the farmer whose farm operations are to be fetched.",
"type": "string"
},
"authProviderId": {
"description": "Id of the farm operations data provider. Use 'JOHNDEERE' to fetch data from John Deere.",
"type": "string"
},
"operations": {
"description": "List of types of farm operations for which data needs to be fetched. Valid values are AllOperations, Application, Planting, Harvest and Tillage.",
"type": "array",
"items": {
"type": "string"
}
},
"startYear": {
"format": "int32",
"description": "The beginning year from when the farm operations data needs to be fetched (minimum = 2000, maximum = current year).",
"type": "integer"
},
"id": {
"description": "Unique Id of the farm operations data ingestion job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the farm operations data ingestion job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the farm operations data ingestion job.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"Farm": {
"description": "Schema of a farm resource.",
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the farm. This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the farm.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the farm.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"FarmListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Farm"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"Field": {
"description": "Schema of a field resource.",
"type": "object",
"properties": {
"farmId": {
"description": "Id of the associated farm.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"primaryBoundaryId": {
"description": "Id of the primary boundary associated with the field. At any point in time, a field can contain a maximum of one primary boundary.",
"type": "string",
"readOnly": true
},
"boundaryIds": {
"description": "List of Ids of boundaries associated with the field.",
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
},
"id": {
"description": "Unique Id of the field. This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the field.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the field.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"FieldListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Field"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"HarvestProductDetail": {
"description": "Schema of a harvested product.",
"type": "object",
"properties": {
"productName": {
"description": "Name of a harvested product.",
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"area": {
"$ref": "#/definitions/Measure"
},
"totalYield": {
"$ref": "#/definitions/Measure"
},
"avgYield": {
"$ref": "#/definitions/Measure"
},
"avgMoisture": {
"$ref": "#/definitions/Measure"
},
"totalWetMass": {
"$ref": "#/definitions/Measure"
},
"avgWetMass": {
"$ref": "#/definitions/Measure"
}
}
},
"HarvestData": {
"description": "Schema of harvest data resource.",
"type": "object",
"properties": {
"totalYield": {
"$ref": "#/definitions/Measure"
},
"avgYield": {
"$ref": "#/definitions/Measure"
},
"totalWetMass": {
"$ref": "#/definitions/Measure"
},
"avgWetMass": {
"$ref": "#/definitions/Measure"
},
"avgMoisture": {
"$ref": "#/definitions/Measure"
},
"avgSpeed": {
"$ref": "#/definitions/Measure"
},
"harvestProductDetails": {
"description": "Details of harvested products.",
"type": "array",
"items": {
"$ref": "#/definitions/HarvestProductDetail"
}
},
"area": {
"$ref": "#/definitions/Measure"
},
"source": {
"description": "Represents the source from which the harvest data was obtained.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"operationModifiedDateTime": {
"format": "date-time",
"description": "UTC date-time at which the harvest data was modified at the source (format: yyyy-MM-ddTHH:mm:ssZ). This will be specified by the source.",
"type": "string"
},
"operationStartDateTime": {
"format": "date-time",
"description": "UTC date-time at which the harvest operation started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"operationEndDateTime": {
"format": "date-time",
"description": "UTC date-time at which the harvest operation ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"attachmentsLink": {
"description": "Link to 'Attachments API' that can be used to find shapefiles, raster files or any other attachments associated with this operation.",
"type": "string",
"readOnly": true
},
"associatedBoundaryId": {
"description": "Id of the boundary of the field/seasonal field on which the harvest operation was done.",
"type": "string"
},
"operationBoundaryId": {
"description": "Id of the boundary that is created using the geographical area on which the harvest operation was carried out.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the operation (harvest). This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the harvest operation.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the harvest operation.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"HarvestDataListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/HarvestData"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"ImageProcessingRasterizeJob": {
"description": "ImageProcessingRasterizeJob.",
"required": [
"farmerId",
"shapefileAttachmentId",
"shapefileColumnNames"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string"
},
"shapefileAttachmentId": {
"description": "Attachment id of the input shapefile which must be rasterized.",
"type": "string"
},
"shapefileColumnNames": {
"description": "List of shapefile column names that must be rasterized.",
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"description": "Unique Id of the image processing (rasterize) job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the image processing (rasterize) job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the image processing (rasterize) job.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"OAuthProvider": {
"description": "Schema of OAuth provider resource.",
"type": "object",
"properties": {
"appId": {
"description": "OAuth App Id for a given OAuth Provider.",
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"appSecret": {
"description": "OAuth App secret for a given OAuth Provider.\r\nNote: The app secret will not be part of the response.",
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"apiKey": {
"description": "OAuth Api key for a given Provider.\r\nNote: The Api key will not be part of the response. This is applicable only for authenticating to Climate Corp.",
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"isProductionApp": {
"description": "An optional flag to determine if the OAuth App is ready to be used for production scenarios.\r\nNote: This is applicable only for John Deere.",
"default": false,
"type": "boolean"
},
"id": {
"description": "FarmBeats recognized unique Id for the OAuth provider. Valid value: 'JOHNDEERE.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the OAuth provider.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the OAuth provider.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"OAuthProviderListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/OAuthProvider"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"OAuthProviderCascadeDeleteJob": {
"description": "Schema of oauth provider cascade delete job.",
"required": [
"oauthProviderId"
],
"type": "object",
"properties": {
"oauthProviderId": {
"description": "FarmBeats recognized unique Id for the OAuth provider. Valid value: 'JOHNDEERE'.",
"type": "string"
},
"id": {
"description": "Unique Id of the OAuth provider delete job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the OAuth provider cascade delete job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the OAuth provider cascade delete job..",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"OAuthToken": {
"description": "Schema of OAuth token resource.",
"required": [
"authProviderId",
"farmerId"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the farmer for whom the OAuth flow is being configured.",
"type": "string"
},
"authProviderId": {
"description": "Id of the OAuth provider resource containing the app information.",
"type": "string"
},
"isValid": {
"description": "An optional flag indicating whether the token is valid or expired.",
"default": true,
"type": "boolean"
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
}
}
},
"OAuthTokenListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/OAuthToken"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"OAuthConnectRequest": {
"description": "Get OAuth config query parameters.",
"required": [
"farmerId",
"oAuthProviderId",
"userRedirectLink"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the farmer for whom the OAuth flow is being configured.",
"type": "string"
},
"oAuthProviderId": {
"description": "Id of the OAuth provider.",
"type": "string"
},
"userRedirectLink": {
"description": "Link to redirect the user to, at the end of the OAuth flow.",
"maxLength": 1000,
"minLength": 0,
"type": "string"
},
"userRedirectState": {
"description": "State to be returned when redirecting the user at the end of the oauth flow.",
"maxLength": 200,
"minLength": 0,
"type": "string"
}
}
},
"PlantingProductDetail": {
"description": "Schema of a planted product.",
"type": "object",
"properties": {
"productName": {
"description": "Name of the planted product.",
"type": "string"
},
"area": {
"$ref": "#/definitions/Measure"
},
"totalMaterial": {
"$ref": "#/definitions/Measure"
},
"avgMaterial": {
"$ref": "#/definitions/Measure"
}
}
},
"PlantingData": {
"description": "Schema of planting data resource.",
"type": "object",
"properties": {
"avgPlantingRate": {
"$ref": "#/definitions/Measure"
},
"totalMaterial": {
"$ref": "#/definitions/Measure"
},
"avgMaterial": {
"$ref": "#/definitions/Measure"
},
"plantingProductDetails": {
"description": "Details of products planted.",
"type": "array",
"items": {
"$ref": "#/definitions/PlantingProductDetail"
}
},
"area": {
"$ref": "#/definitions/Measure"
},
"source": {
"description": "Represents the source from which the planting data was obtained.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"operationModifiedDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation data was modified at the source (format: yyyy-MM-ddTHH:mm:ssZ). This will be specified by the source.",
"type": "string"
},
"operationStartDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"operationEndDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"attachmentsLink": {
"description": "Link to 'Attachments API' that can be used to find shapefiles, raster files or any other attachments associated with this operation.",
"type": "string",
"readOnly": true
},
"associatedBoundaryId": {
"description": "Id of the boundary of the field/seasonal field on which the planting operation was done.",
"type": "string"
},
"operationBoundaryId": {
"description": "Id of the boundary that is created using the geographical area on which the planting operation was carried out.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the operation (planting). This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the planting operation.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the planting operation.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"PlantingDataListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/PlantingData"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"ImageFormat": {
"description": "Supported image formats for scene resource.",
"enum": [
"TIF"
],
"type": "string",
"x-ms-enum": {
"name": "ImageFormat",
"modelAsString": true
}
},
"ImageFile": {
"description": "Schema of image file resource.",
"required": [
"name"
],
"type": "object",
"properties": {
"fileLink": {
"description": "Link to the image file.",
"type": "string"
},
"name": {
"description": "Name of the image file.",
"type": "string"
},
"imageFormat": {
"$ref": "#/definitions/ImageFormat"
},
"resolution": {
"format": "double",
"description": "Resolution of image in meters.",
"type": "number"
}
}
},
"Scene": {
"description": "Schema of scene resource.",
"type": "object",
"properties": {
"sceneDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the image was captured/made available at source (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"provider": {
"description": "Name of the data provider for the scene. For satellite imagery, this refers to the name of the satellite data provider.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"source": {
"description": "Source from where the scene was procured/generated. For satellite imagery, this refers to the name of the satellite constellation.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"imageFiles": {
"description": "Collection of image files.",
"type": "array",
"items": {
"$ref": "#/definitions/ImageFile"
}
},
"imageFormat": {
"$ref": "#/definitions/ImageFormat"
},
"cloudCoverPercentage": {
"format": "double",
"description": "Signifies the percentage of the scene covered by clouds.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"darkPixelPercentage": {
"format": "double",
"description": "Signifies the percentage of the scene covered by dark pixels.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"ndviMedianValue": {
"format": "double",
"description": "Median of NDVI values of the scene.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"boundaryId": {
"description": "Id of the associated boundary.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string"
},
"id": {
"description": "Unique Id of the scene",
"type": "string"
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
}
}
},
"SceneListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Scene"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"DataProvider": {
"description": "Provider of satellite data.",
"enum": [
"Microsoft"
],
"type": "string",
"x-ms-enum": {
"name": "DataProvider",
"modelAsString": true
}
},
"Source": {
"description": "Source of satellite data.",
"enum": [
"Sentinel_2_L2A"
],
"type": "string",
"x-ms-enum": {
"name": "Source",
"modelAsString": true
}
},
"SatelliteData": {
"description": "Data Model for SatelliteIngestionJobRequest.",
"type": "object",
"properties": {
"imageNames": {
"description": "List of names of images to be fetched.\r\nFor Sentinel-2, allowed values are: 'B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09', 'B11', 'B12', 'AOT', 'SCL', 'SNW', 'CLD', 'NDVI', 'NDWI', 'EVI', 'LAI', 'LAIMask', 'CLP', 'CLM', and 'dataMask'.",
"type": "array",
"items": {
"type": "string"
},
"example": [
"NDVI"
]
},
"imageFormats": {
"description": "List of formats in which images can be fetched. Available value: TIF.",
"type": "array",
"items": {
"type": "string"
},
"example": [
"TIF"
]
},
"imageResolutions": {
"description": "List of image resolutions in meters. For Sentinel-2, available values are: 10, 20, 60.",
"type": "array",
"items": {
"format": "double",
"type": "number"
},
"example": [
10
]
}
}
},
"SatelliteDataIngestionJob": {
"description": "Schema of satellite data ingestion job.",
"required": [
"boundaryId",
"endDateTime",
"farmerId",
"startDateTime"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string"
},
"boundaryId": {
"description": "The id of the boundary for which satellite data is being fetched.",
"type": "string"
},
"startDateTime": {
"format": "date-time",
"description": "UTC Date-time from when the satellite data has to be fetched (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"endDateTime": {
"format": "date-time",
"description": "UTC Date-time till when the satellite data has to be fetched (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"provider": {
"$ref": "#/definitions/DataProvider"
},
"source": {
"$ref": "#/definitions/Source"
},
"data": {
"$ref": "#/definitions/SatelliteData"
},
"id": {
"description": "Unique Id of the satellite data ingestion job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "DProcessing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the satellite data ingestion job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the satellite data ingestion job.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"SeasonalField": {
"description": "Schema of seasonal field resource.",
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"primaryBoundaryId": {
"description": "Id of the primary boundary associated with the seasonal field. At any point in time, a seasonal field can contain a maximum of one primary boundary.",
"type": "string",
"readOnly": true
},
"boundaryIds": {
"description": "List of Ids of boundaries associated with the seasonal field.",
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
},
"farmId": {
"description": "Id of the associated farm.",
"type": "string"
},
"fieldId": {
"description": "Id of the associated field.",
"type": "string"
},
"seasonId": {
"description": "Id of the season associated with the seasonal field.",
"type": "string"
},
"cropVarietyIds": {
"description": "List of Ids of crop varieties associated with the seasonal field. All the crop varieties must belong to the same crop.",
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
}
},
"cropId": {
"description": "Id of the crop associated with the seasonal field. Seasonal fields are mono crop entities.",
"type": "string"
},
"avgYieldValue": {
"format": "double",
"description": "Average yield generated from the seasonal field.",
"type": "number"
},
"avgYieldUnit": {
"description": "Unit to measure average yield.",
"maxLength": 32,
"minLength": 2,
"type": "string"
},
"avgSeedPopulationValue": {
"format": "double",
"description": "Average seed population planted in the seasonal field.",
"type": "number"
},
"avgSeedPopulationUnit": {
"description": "Unit to measure average seed population.",
"maxLength": 32,
"minLength": 2,
"type": "string"
},
"plantingDateTime": {
"format": "date-time",
"description": "UTC Date-time at which crops were planted (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"id": {
"description": "Unique Id of the seasonal field. This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the seasonal field.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the seasonal field.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"SeasonalFieldListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/SeasonalField"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"Season": {
"description": "Schema of season resource.",
"type": "object",
"properties": {
"startDateTime": {
"format": "date-time",
"description": "UTC date-time signifying the start of the season (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"endDateTime": {
"format": "date-time",
"description": "UTC date-time signifying the end of the season (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"year": {
"format": "int32",
"description": "Year associated with the harvest i.e. year of season end date-time.",
"type": "integer"
},
"id": {
"description": "Unique Id of the season.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the season.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the season.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"SeasonListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/Season"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"TillageData": {
"description": "Schema of tillage data resource.",
"type": "object",
"properties": {
"tillageDepth": {
"$ref": "#/definitions/Measure"
},
"tillagePressure": {
"$ref": "#/definitions/Measure"
},
"area": {
"$ref": "#/definitions/Measure"
},
"source": {
"description": "Represents the source from which the tillage data was obtained.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"operationModifiedDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation data was modified at the source (format: yyyy-MM-ddTHH:mm:ssZ). This will be specified by the source.",
"type": "string"
},
"operationStartDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"operationEndDateTime": {
"format": "date-time",
"description": "UTC date-time at which the operation ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"attachmentsLink": {
"description": "Link to 'Attachments API' that can be used to find shapefiles, raster files or any other attachments associated with this operation.",
"type": "string",
"readOnly": true
},
"associatedBoundaryId": {
"description": "Id of the boundary of the field/seasonal field on which the tillage operation was done.",
"type": "string"
},
"operationBoundaryId": {
"description": "Id of the boundary that is created using the geographical area on which the tillage operation was carried out.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string",
"readOnly": true
},
"id": {
"description": "Unique Id of the operation (tillage). This Id is unique for a given farmer.",
"type": "string",
"readOnly": true
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"status": {
"description": "User determined status of the resource.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the tillage operation.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the tillage operation.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"TillageDataListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/TillageData"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"Location": {
"description": "Location model class.",
"required": [
"latitude",
"longitude"
],
"type": "object",
"properties": {
"latitude": {
"format": "double",
"description": "Latitude of the location.",
"maximum": 90,
"minimum": -90,
"type": "number"
},
"longitude": {
"format": "double",
"description": "Longitude of the location.",
"maximum": 180,
"minimum": -180,
"type": "number"
}
}
},
"WeatherData": {
"description": "Schema of weather data.",
"required": [
"boundaryId",
"dateTime",
"extensionId",
"extensionVersion",
"farmerId",
"granularity",
"location",
"weatherDataType"
],
"type": "object",
"properties": {
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string"
},
"boundaryId": {
"description": "Id of the associated boundary.",
"type": "string"
},
"extensionId": {
"description": "Id of the weather extension. This signifies the source from where the weather data is fetched (eg. DTN.ClearAg).",
"type": "string"
},
"location": {
"$ref": "#/definitions/Location"
},
"dateTime": {
"format": "date-time",
"description": "UTC Date-time of the weather data (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"unitSystemCode": {
"description": "Unit system like US/SI etc.",
"type": "string"
},
"extensionVersion": {
"description": "Version of the weather data extension.",
"type": "string"
},
"weatherDataType": {
"description": "Type of weather data (forecast/historical).",
"type": "string"
},
"granularity": {
"description": "Granularity of weather data (daily/hourly).",
"type": "string"
},
"cloudCover": {
"$ref": "#/definitions/Measure"
},
"dewPoint": {
"$ref": "#/definitions/Measure"
},
"growingDegreeDay": {
"$ref": "#/definitions/Measure"
},
"precipitation": {
"$ref": "#/definitions/Measure"
},
"pressure": {
"$ref": "#/definitions/Measure"
},
"relativeHumidity": {
"$ref": "#/definitions/Measure"
},
"soilMoisture": {
"$ref": "#/definitions/Measure"
},
"soilTemperature": {
"$ref": "#/definitions/Measure"
},
"temperature": {
"$ref": "#/definitions/Measure"
},
"visibility": {
"$ref": "#/definitions/Measure"
},
"wetBulbTemperature": {
"$ref": "#/definitions/Measure"
},
"windChill": {
"$ref": "#/definitions/Measure"
},
"windDirection": {
"$ref": "#/definitions/Measure"
},
"windGust": {
"$ref": "#/definitions/Measure"
},
"windSpeed": {
"$ref": "#/definitions/Measure"
},
"id": {
"description": "Unique id of weather data.",
"type": "string"
},
"eTag": {
"description": "ETag value can be used to implement optimistic concurrency.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"modifiedDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the resource was last modified (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"WeatherDataListResponse": {
"description": "Paged response contains list of requested objects and a URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"description": "List of requested objects.",
"type": "array",
"items": {
"$ref": "#/definitions/WeatherData"
}
},
"$skipToken": {
"description": "Token used in retrieving the next page. If null, there are no additional pages.",
"type": "string"
},
"nextLink": {
"description": "Continuation link (absolute URI) to the next page of results in the list. If null, there are no additional pages.",
"type": "string"
}
}
},
"WeatherDataIngestionJob": {
"description": "Schema of weather ingestion job.",
"required": [
"boundaryId",
"extensionApiInput",
"extensionApiName",
"extensionId",
"farmerId"
],
"type": "object",
"properties": {
"boundaryId": {
"description": "Id of the associated boundary.",
"type": "string"
},
"farmerId": {
"description": "Id of the associated farmer.",
"type": "string"
},
"extensionId": {
"description": "Id of the weather extension. This signifies the source from where the weather data is fetched (eg. DTN.ClearAg).",
"maxLength": 100,
"minLength": 2,
"pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$",
"type": "string"
},
"extensionApiName": {
"description": "Extension api name to which the request is to be made.",
"maxLength": 100,
"minLength": 2,
"type": "string"
},
"extensionApiInput": {
"description": "Dictionary of inputs for extension api. This would be passed as part fo request to weather data provider.",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"extensionDataProviderAppId": {
"description": "App id of the weather data provider.",
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"extensionDataProviderApiKey": {
"description": "Api key of the weather data provider.",
"maxLength": 200,
"minLength": 2,
"type": "string"
},
"id": {
"description": "Unique Id of the weather data ingestion job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name to weather data ingestion job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the weather data ingestion job.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"WeatherDataDeleteJob": {
"description": "Schema of weather data delete job.",
"required": [
"boundaryId",
"extensionId",
"farmerId"
],
"type": "object",
"properties": {
"extensionId": {
"description": "Id of the weather extension. This signifies the source from where the weather data was fetched (eg. DTN.ClearAg).",
"maxLength": 100,
"minLength": 2,
"pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$",
"type": "string"
},
"farmerId": {
"description": "The Id of the associated farmer.",
"type": "string"
},
"boundaryId": {
"description": "The id of the associated boundary.",
"type": "string"
},
"weatherDataType": {
"description": "Type of weather data (forecast/historical).",
"type": "string"
},
"granularity": {
"description": "Granularity of weather data (daily/hourly).",
"type": "string"
},
"startDateTime": {
"format": "date-time",
"description": "UTC Date-time from when the weather data has to be deleted (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"endDateTime": {
"format": "date-time",
"description": "UTC Date-time till when the weather data has to be deleted (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string"
},
"id": {
"description": "Unique Id of the weather data delete job. This Id must be unique for a given tenant.",
"type": "string",
"readOnly": true
},
"status": {
"description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.",
"type": "string",
"readOnly": true
},
"durationInSeconds": {
"format": "double",
"description": "Processing duration of the job. Can be calculated as min(current time, job succeeded/failed/cancelled time) - job execution start time. This does not include the time spent waiting in the queue for the job to be picked up for processing.",
"type": "number",
"readOnly": true
},
"message": {
"description": "Brief description of the result of the job.",
"type": "string",
"readOnly": true
},
"createdDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was created (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"lastActionDateTime": {
"format": "date-time",
"description": "UTC Date-time at which the job was last acted upon (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"startTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job started (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"endTime": {
"format": "date-time",
"description": "UTC Date-time at which the processing of the job ended (format: yyyy-MM-ddTHH:mm:ssZ).",
"type": "string",
"readOnly": true
},
"name": {
"description": "Name of the weather data deletion job.",
"maxLength": 100,
"minLength": 0,
"type": "string"
},
"description": {
"description": "Brief description of the weather data deletion job.",
"maxLength": 500,
"minLength": 0,
"type": "string"
},
"properties": {
"description": "A collection of key value pairs associated with the resource. A key is a string and a value can be a numeric or a string. A maximum of 25 key value pairs can be associated with a resource.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"example": {
"key1": "value1",
"key2": 123.45
}
}
}
},
"MultiPolygon": {
"description": "MultiPolygon geometry.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeoJsonObject"
},
{
"$ref": "#/definitions/MultiPolygonCoordinates"
}
],
"x-ms-discriminator-value": "MultiPolygon"
},
"MultiPolygonCoordinates": {
"description": "Schema of multi polygon coordinates.",
"required": [
"coordinates"
],
"type": "object",
"properties": {
"coordinates": {
"description": "Gets or sets coordinates of GeoJSON Object.\r\nIt must be an array of polygons, each polygon contains list of linear rings.\r\nFor Polygons with more than one of these rings, the first MUST be the exterior ring,\r\nand any others MUST be interior rings.",
"minLength": 1,
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"format": "double",
"type": "number"
}
}
}
}
}
}
},
"Point": {
"description": "Point geometry.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeoJsonObject"
},
{
"$ref": "#/definitions/PointCoordinates"
}
],
"x-ms-discriminator-value": "Point"
},
"PointCoordinates": {
"description": "Schema of the coordinates of a point.",
"type": "object",
"required": [
"coordinates"
],
"properties": {
"coordinates": {
"description": "Gets or sets the coordinate of this point.\r\nIt must be an array of 2 or 3 elements for a 2D or 3D system respectively.",
"maximum": 3,
"minimum": 2,
"type": "array",
"items": {
"format": "double",
"type": "number"
}
}
}
},
"Polygon": {
"description": "Polygon geometry.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeoJsonObject"
},
{
"$ref": "#/definitions/PolygonCoordinates"
}
],
"x-ms-discriminator-value": "Polygon"
},
"PolygonCoordinates": {
"description": "Schema of polygon coordinates.",
"required": [
"coordinates"
],
"type": "object",
"properties": {
"coordinates": {
"description": "Gets or sets type of the GeoJSON Object.\r\nIt must be an array of linear ring coordinate arrays.\r\nFor Polygons with more than one of these rings, the first MUST be the exterior ring,\r\nand any others MUST be interior rings.",
"minLength": 1,
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"format": "double",
"type": "number"
}
}
}
}
}
}
},
"securityDefinitions": {
"Bearer": {
"type": "apiKey",
"name": "Authorization",
"in": "header",
"description": "Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before."
}
},
"security": [
{
"Bearer": []
}
]
}