diff --git a/custom-words.txt b/custom-words.txt index c23a1eab80ab..dc135c7f1690 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2642,4 +2642,5 @@ wayfinding dryruns Dryrun dryrun +Discoverability Precheck diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/agfood.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/agfood.json index 96d4e3c5b558..86adb2372e32 100644 --- a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/agfood.json +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/agfood.json @@ -1201,6 +1201,418 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/solutions/{solutionId}": { + "put": { + "tags": [ + "Solutions" + ], + "description": "Install Or Update Solution.", + "operationId": "Solutions_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FarmBeatsResourceNameParameter" + }, + { + "$ref": "#/parameters/SolutionId" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "Solution resource request body.", + "schema": { + "$ref": "#/definitions/SolutionInstallationRequest" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_CreateOrUpdate": { + "$ref": "./examples/Solutions_CreateOrUpdate.json" + } + } + }, + "get": { + "tags": [ + "Solutions" + ], + "description": "Get installed Solution details by Solution id.", + "operationId": "Solutions_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FarmBeatsResourceNameParameter" + }, + { + "$ref": "#/parameters/SolutionId" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_Get": { + "$ref": "./examples/Solutions_Get.json" + } + } + }, + "delete": { + "tags": [ + "Solutions" + ], + "description": "Uninstall Solution.", + "operationId": "Solutions_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FarmBeatsResourceNameParameter" + }, + { + "$ref": "#/parameters/SolutionId" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_Delete": { + "$ref": "./examples/Solutions_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{farmBeatsResourceName}/solutions": { + "get": { + "tags": [ + "Solutions" + ], + "description": "Get installed Solutions details.", + "operationId": "Solutions_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FarmBeatsResourceNameParameter" + }, + { + "in": "query", + "name": "solutionIds", + "description": "Installed Solution ids.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "ids", + "description": "Ids of the resource.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "names", + "description": "Names of the resource.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "propertyFilters", + "description": "Filters on key-value pairs within the Properties object.\r\neg. \"{testKey} eq {testValue}\".", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "statuses", + "description": "Statuses of the resource.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "minCreatedDateTime", + "description": "Minimum creation date of resource (inclusive).", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "maxCreatedDateTime", + "description": "Maximum creation date of resource (inclusive).", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "minLastModifiedDateTime", + "description": "Minimum last modified date of resource (inclusive).", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "maxLastModifiedDateTime", + "description": "Maximum last modified date of resource (inclusive).", + "type": "string", + "format": "date-time" + }, + { + "in": "query", + "name": "$maxPageSize", + "description": "Maximum number of items needed (inclusive).\r\nMinimum = 10, Maximum = 1000, Default value = 50.", + "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" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/SolutionListResponse" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Solutions_List": { + "$ref": "./examples/Solutions_List.json" + } + } + } + }, + "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions": { + "get": { + "tags": [ + "SolutionsDiscoverability" + ], + "description": "Get list of farmBeats solutions.", + "operationId": "SolutionsDiscoverability_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "farmBeatsSolutionIds", + "description": "Ids of FarmBeats Solutions which the customer requests to fetch.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "farmBeatsSolutionNames", + "description": "Names of FarmBeats Solutions which the customer requests to fetch.", + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "in": "query", + "name": "$maxPageSize", + "description": "Maximum number of items needed (inclusive).\r\nMinimum = 10, Maximum = 1000, Default value = 50.", + "type": "integer", + "format": "int32", + "default": 50, + "maximum": 1000, + "minimum": 10 + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FarmBeatsSolutionListResponse" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "SolutionsDiscoverability_List": { + "$ref": "./examples/SolutionsDiscoverability_List.json" + } + } + } + }, + "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/{farmBeatsSolutionId}": { + "get": { + "tags": [ + "SolutionsDiscoverability" + ], + "description": "Get farmBeats solution by id.", + "operationId": "SolutionsDiscoverability_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "farmBeatsSolutionId", + "description": "farmBeatsSolutionId to be queried.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FarmBeatsSolution" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SolutionsDiscoverability_Get": { + "$ref": "./examples/SolutionsDiscoverability_Get.json" + } + } + } } }, "definitions": { @@ -1647,6 +2059,381 @@ "type": "string" } } + }, + "SolutionProperties": { + "description": "Solution resource properties.", + "required": [ + "offerId", + "planId", + "marketplacePublisherId", + "saasSubscriptionId", + "saasSubscriptionName", + "termId" + ], + "type": "object", + "properties": { + "solutionId": { + "description": "Solution Id.", + "type": "string", + "readOnly": true + }, + "partnerId": { + "description": "Partner Id of the Solution.", + "type": "string", + "readOnly": true + }, + "saasSubscriptionId": { + "description": "SaaS subscriptionId of the installed SaaS application.", + "minLength": 1, + "type": "string" + }, + "saasSubscriptionName": { + "description": "SaaS subscription name of the installed SaaS application.", + "minLength": 1, + "type": "string" + }, + "marketplacePublisherId": { + "description": "SaaS application Publisher Id.", + "minLength": 1, + "type": "string" + }, + "planId": { + "description": "SaaS application Plan Id.", + "minLength": 1, + "type": "string" + }, + "offerId": { + "description": "SaaS application Offer Id.", + "minLength": 1, + "type": "string" + }, + "termId": { + "description": "SaaS application Term Id.", + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": {} + }, + "SolutionInstallationRequest": { + "description": "Solution Installation Request Body.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/SolutionProperties" + } + } + }, + "Solution": { + "description": "Solution resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/SolutionProperties" + }, + "eTag": { + "description": "The ETag value to implement optimistic concurrency.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "SolutionListResponse": { + "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/Solution" + } + }, + "$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.", + "type": "string" + } + } + }, + "Measure": { + "type": "object", + "properties": { + "unit": { + "type": "string" + }, + "value": { + "format": "double", + "type": "number" + } + } + }, + "ResourceParameter": { + "type": "object", + "properties": { + "resourceIdName": { + "type": "string" + }, + "resourceType": { + "type": "string" + } + } + }, + "Insight": { + "type": "object", + "properties": { + "farmerId": { + "type": "string" + }, + "modelId": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "resourceId": { + "type": "string" + }, + "modelVersion": { + "type": "string" + }, + "insightStartDateTime": { + "format": "date-time", + "type": "string" + }, + "insightEndDateTime": { + "format": "date-time", + "type": "string" + }, + "measures": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Measure" + } + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "createdDateTime": { + "format": "date-time", + "type": "string" + }, + "modifiedDateTime": { + "format": "date-time", + "type": "string" + }, + "eTag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "properties": { + "type": "object", + "additionalProperties": {} + } + } + }, + "InsightAttachment": { + "type": "object", + "properties": { + "insightId": { + "type": "string" + }, + "modelId": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "resourceId": { + "type": "string" + }, + "fileLink": { + "type": "string" + }, + "originalFileName": { + "type": "string" + }, + "farmerId": { + "type": "string" + }, + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "createdDateTime": { + "format": "date-time", + "type": "string" + }, + "modifiedDateTime": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "eTag": { + "type": "string" + } + } + }, + "SolutionEvaluatedOutput": { + "type": "object", + "properties": { + "insightResponse": { + "$ref": "#/definitions/Insight" + }, + "insightAttachmentResponse": { + "$ref": "#/definitions/InsightAttachment" + } + } + }, + "FarmBeatsSolutionProperties": { + "description": "FarmBeatsSolution properties.", + "type": "object", + "properties": { + "partnerId": { + "description": "Solution Partner Id.", + "type": "string", + "readOnly": true + }, + "partnerTenantId": { + "description": "Solution Partner Tenant Id.", + "type": "string", + "readOnly": true + }, + "dataAccessScopes": { + "description": "Gets scope of the FarmBeats data access that's required for processing solution request to partner.\r\nExample: For gdd they might need weatherScope and satelliteScope.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "marketplaceOfferDetails": { + "$ref": "#/definitions/MarketplaceOfferDetails" + }, + "inputParametersValidationScopes": { + "description": "Gets scope of the FarmBeats related parameters that need to be validated in apiInputParameters.\r\nExample: For if 'FarmHierarchy' is the input scope for 'WeatherScope' data access\r\nFor working with WeatherScope we need FarmHierarchy info implies 'farmerId', 'resourceId', 'resourceType' in request body.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceParameter" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "openApiSpecsDictionary": { + "description": "Gets apiVersion: Swagger Document Dictionary to capture all api versions of swagger exposed by partner to farmbeats.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "readOnly": true + }, + "evaluatedOutputsDictionary": { + "description": "Gets example name: insight sample response Dictionary to capture all variations of computed results ingested by partner.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SolutionEvaluatedOutput" + }, + "readOnly": true + }, + "accessFBApplicationId": { + "format": "uuid", + "description": "Application id of the multi tenant application to be used by partner to access FarmBeats data.", + "type": "string", + "readOnly": true + }, + "roleId": { + "description": "Role Id of the SaaS multi tenant application to access relevant fb data.", + "type": "string", + "readOnly": true + }, + "roleName": { + "description": "Role Name of the SaaS multi tenant application to access relevant fb data.", + "type": "string", + "readOnly": true + }, + "accessFBApplicationName": { + "description": "Application name of the multi tenant application to be used by partner to access FarmBeatsData.", + "type": "string", + "readOnly": true + } + } + }, + "FarmBeatsSolution": { + "description": "FarmBeats solution resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/systemData" + }, + "properties": { + "$ref": "#/definitions/FarmBeatsSolutionProperties" + } + }, + "x-ms-azure-resource": true + }, + "MarketplaceOfferDetails": { + "type": "object", + "properties": { + "saasOfferId": { + "type": "string" + }, + "publisherId": { + "type": "string" + } + } + }, + "FarmBeatsSolutionListResponse": { + "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/FarmBeatsSolution" + } + }, + "$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.", + "type": "string" + } + } } }, "parameters": { @@ -1665,6 +2452,14 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "SolutionId": { + "in": "path", + "name": "solutionId", + "description": "Solution Id of the solution.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" } }, "securityDefinitions": { diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_Get.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_Get.json new file mode 100644 index 000000000000..def678787c60 --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_Get.json @@ -0,0 +1,830 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "farmBeatsSolutionId": "bayerAgPowered.gdu" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + }, + "properties": { + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "marketplaceOfferDetails": { + "saasOfferId": "saasOfferId", + "publisherId": "publisherId" + }, + "dataAccessScopes": [ + "Weather", + "Scenes" + ], + "inputParametersValidationScopes": [ + { + "resourceIdName": "partyId", + "resourceType": "Party" + } + ], + "openApiSpecsDictionary": { + "v1": { + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "tags": [ + "Weather" + ], + "description": "Get weather ingestion job.", + "operationId": "Weather_GetDataIngestionJobDetails", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "resourceId", + "description": "Id of the job.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "api-version", + "description": "The requested API version", + "required": true, + "type": "string", + "default": "2021-07-31-preview" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + }, + "default": { + "description": "Error", + "schema": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "type": "string" + } + } + } + } + } + }, + "put": { + "tags": [ + "Weather" + ], + "description": "Create a weather data ingestion job.", + "operationId": "Weather_CreateDataIngestionJob", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "resourceId", + "description": "Job id supplied by user.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "api-version", + "description": "The requested API version", + "required": true, + "type": "string", + "default": "2021-07-31-preview" + }, + { + "in": "body", + "name": "body", + "description": "Job parameters supplied by user.", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + }, + "default": { + "description": "Error", + "schema": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "type": "string" + } + } + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + } + }, + "basePath": "/", + "definitions": { + "WeatherDataIngestionJob": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + }, + "ErrorResponse": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "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\r\ncontaining error.", + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "Error": { + "description": "An error from the Azure AgPlatform 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" + } + } + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "info": { + "contact": { + "email": "apiteam@swagger.io" + }, + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "evaluatedOutputsDictionary": { + "additionalProp1": { + "insightResponse": { + "farmerId": "farmerId", + "modelId": "solutionId", + "resourceType": "Boundary", + "resourceId": "boundaryId", + "modelVersion": "1.0", + "insightStartDateTime": "2022-07-19T05:15:31.824Z", + "insightEndDateTime": "2022-07-19T05:15:31.824Z", + "measures": { + "corn": { + "unit": "starting-date", + "value": 2022 + }, + "wheat": { + "unit": "starting-date", + "value": 2022 + }, + "rice": { + "unit": "starting-date", + "value": 2022 + } + }, + "id": "seedRecomenderFor6MonthsDataInsight1", + "status": "Recommended", + "createdDateTime": "2022-07-19T05:15:31.824Z", + "modifiedDateTime": "2022-07-19T05:15:31.824Z", + "eTag": "\"00000000-0000-0000-0000-000000000000\"", + "name": "seed RecomenderFor6MonthsDataInsight1", + "description": "Recommendation from Solution Provider.", + "properties": { + "key1": "value1", + "key2": 123.45 + } + }, + "insightAttachmentResponse": { + "insightId": "seedRecomenderFor6MonthsDataInsight1", + "modelId": "solutionId", + "resourceType": "Boundary", + "resourceId": "boundaryId", + "fileLink": "https://storageaccount.blob.core.windows.net/solutionId/seedRecomenderFor6MonthsDataInsight1.png", + "originalFileName": "seedRecomenderFor6MonthsDataInsight1.png", + "farmerId": "farmerId", + "id": "seedRecomenderFor6MonthsDataInsightAttachment1", + "status": "Recommended", + "createdDateTime": "2022-07-19T05:15:31.824Z", + "modifiedDateTime": "2022-07-19T05:15:31.824Z", + "name": "seed RecomenderFor6MonthsDataInsightAttachment1", + "description": "Recommendation from Solution Provider.", + "eTag": "\"00000000-0000-0000-0000-000000000000\"" + } + } + }, + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "roleId": "role1", + "roleName": "roleName1" + }, + "name": "bayerAgPowered.gdu" + } + } + } +} diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_List.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_List.json new file mode 100644 index 000000000000..f8759eba24fa --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/SolutionsDiscoverability_List.json @@ -0,0 +1,832 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + }, + "properties": { + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "dataAccessScopes": [ + "string" + ], + "inputParametersValidationScopes": [ + { + "resourceIdName": "partyId", + "resourceType": "Party" + } + ], + "marketplaceOfferDetails": { + "saasOfferId": "saasOfferId", + "publisherId": "publisherId" + }, + "openApiSpecsDictionary": { + "v1": { + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "tags": [ + "Weather" + ], + "description": "Get weather ingestion job.", + "operationId": "Weather_GetDataIngestionJobDetails", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "resourceId", + "description": "Id of the job.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "api-version", + "description": "The requested API version", + "required": true, + "type": "string", + "default": "2021-07-31-preview" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + }, + "default": { + "description": "Error", + "schema": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "type": "string" + } + } + } + } + } + }, + "put": { + "tags": [ + "Weather" + ], + "description": "Create a weather data ingestion job.", + "operationId": "Weather_CreateDataIngestionJob", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "resourceId", + "description": "Job id supplied by user.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "api-version", + "description": "The requested API version", + "required": true, + "type": "string", + "default": "2021-07-31-preview" + }, + { + "in": "body", + "name": "body", + "description": "Job parameters supplied by user.", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + } + ], + "responses": { + "202": { + "description": "Success", + "schema": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + } + }, + "default": { + "description": "Error", + "schema": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "type": "string" + } + } + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + } + }, + "basePath": "/", + "definitions": { + "WeatherDataIngestionJob": { + "description": "Schema of weather ingestion job.", + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ], + "type": "object", + "properties": { + "boundaryId": { + "description": "The id of the boundary object for which weather data is being fetched.", + "type": "string" + }, + "farmerId": { + "description": "The id of the farmer object for which weather data is being fetched.", + "type": "string" + }, + "extensionId": { + "description": "Id of the extension to be used for the providerInput. 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 request is to be made.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "extensionApiInput": { + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "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 job id.", + "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": "Duration of the job in seconds.", + "type": "number", + "readOnly": true + }, + "message": { + "description": "Status message to capture more details of the job.", + "type": "string", + "readOnly": true + }, + "createdDateTime": { + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "lastActionDateTime": { + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0, + "type": "string" + }, + "description": { + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "properties": { + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + } + }, + "additionalProperties": {} + }, + "ErrorResponse": { + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "type": "object", + "properties": { + "error": { + "description": "An error from the Azure AgPlatform 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" + } + } + }, + "traceId": { + "description": "Unique trace Id.", + "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\r\ncontaining error.", + "type": "string" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "Error": { + "description": "An error from the Azure AgPlatform 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" + } + } + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "info": { + "contact": { + "email": "apiteam@swagger.io" + }, + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "evaluatedOutputsDictionary": { + "additionalProp1": { + "insightResponse": { + "farmerId": "farmerId", + "modelId": "solutionId", + "resourceType": "Boundary", + "resourceId": "boundaryId", + "modelVersion": "1.0", + "insightStartDateTime": "2022-07-19T05:15:31.824Z", + "insightEndDateTime": "2022-07-19T05:15:31.824Z", + "measures": { + "corn": { + "unit": "starting-date", + "value": 2022 + }, + "wheat": { + "unit": "starting-date", + "value": 2022 + }, + "rice": { + "unit": "starting-date", + "value": 2022 + } + }, + "id": "seedRecomenderFor6MonthsDataInsight1", + "status": "Recommended", + "createdDateTime": "2022-07-19T05:15:31.824Z", + "modifiedDateTime": "2022-07-19T05:15:31.824Z", + "eTag": "\"00000000-0000-0000-0000-000000000000\"", + "name": "seed RecomenderFor6MonthsDataInsight1", + "description": "Recommendation from Solution Provider.", + "properties": { + "key1": "value1", + "key2": 123.45 + } + }, + "insightAttachmentResponse": { + "insightId": "seedRecomenderFor6MonthsDataInsight1", + "modelId": "solutionId", + "resourceType": "Boundary", + "resourceId": "boundaryId", + "fileLink": "https://storageaccount.blob.core.windows.net/solutionId/seedRecomenderFor6MonthsDataInsight1.png", + "originalFileName": "seedRecomenderFor6MonthsDataInsight1.png", + "farmerId": "farmerId", + "id": "seedRecomenderFor6MonthsDataInsightAttachment1", + "status": "Recommended", + "createdDateTime": "2022-07-19T05:15:31.824Z", + "modifiedDateTime": "2022-07-19T05:15:31.824Z", + "name": "seed RecomenderFor6MonthsDataInsightAttachment1", + "description": "Recommendation from Solution Provider.", + "eTag": "\"00000000-0000-0000-0000-000000000000\"" + } + } + }, + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "roleId": "role1", + "roleName": "roleName1" + }, + "name": "bayerAgPowered.gdu" + } + ] + } + } + } +} diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_CreateOrUpdate.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_CreateOrUpdate.json new file mode 100644 index 000000000000..f88080e6041b --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_CreateOrUpdate.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "solutionId": "abc.partner", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "examples-rg", + "farmBeatsResourceName": "examples-farmbeatsResourceName", + "body": { + "properties": { + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "marketplacePublisherId": "publisherId", + "planId": "planId", + "offerId": "offerId", + "termId": "termId" + } + } + }, + "responses": { + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "systemData": { + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "createdAt": "2022-09-29T10:26:29Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z" + }, + "properties": { + "solutionId": "abc.intbugbashfour", + "partnerId": "abc", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "marketplacePublisherId": "publisherId", + "planId": "planId", + "offerId": "offerId", + "termId": "termId" + }, + "eTag": "19002383-0000-0700-0000-633572de0000", + "name": "string" + } + }, + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "systemData": { + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "createdAt": "2022-09-29T10:26:29Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z" + }, + "properties": { + "solutionId": "abc.intbugbashfour", + "partnerId": "abc", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "marketplacePublisherId": "publisherId", + "planId": "planId", + "offerId": "offerId", + "termId": "termId" + }, + "eTag": "19002383-0000-0700-0000-633572de0000", + "name": "string" + } + } + } +} diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Delete.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Delete.json new file mode 100644 index 000000000000..2503846f48b0 --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "examples-rg", + "farmBeatsResourceName": "examples-farmbeatsResourceName", + "solutionId": "provider.solution" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Get.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Get.json new file mode 100644 index 000000000000..26314480e8a7 --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "examples-rg", + "farmBeatsResourceName": "examples-farmbeatsResourceName", + "solutionId": "provider.solution" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "systemData": { + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "createdAt": "2022-09-29T10:26:29Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z" + }, + "properties": { + "solutionId": "abc.intbugbashfour", + "partnerId": "abc", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "marketplacePublisherId": "publisherId", + "planId": "planId", + "offerId": "offerId", + "termId": "termId" + }, + "eTag": "19002383-0000-0700-0000-633572de0000", + "name": "string" + } + } + } +} diff --git a/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_List.json b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_List.json new file mode 100644 index 000000000000..f0a76e9c6c4b --- /dev/null +++ b/specification/agrifood/resource-manager/Microsoft.AgFoodPlatform/preview/2021-09-01-preview/examples/Solutions_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "examples-rg", + "farmBeatsResourceName": "examples-farmbeatsResourceName" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "systemData": { + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "createdAt": "2022-09-29T10:26:29Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z" + }, + "properties": { + "solutionId": "abc.intbugbashfour", + "partnerId": "abc", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "marketplacePublisherId": "publisherId", + "planId": "planId", + "offerId": "offerId", + "termId": "termId" + }, + "eTag": "19002383-0000-0700-0000-633572de0000", + "name": "string" + } + ] + } + } + } +}