swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector WeatherData API schemes: - https tags: - name: WeatherData paths: /weather-data/:fetch: post: tags: - WeatherData description: Returns a list of WeatherData. operationId: microsoftAzureWeatherdataGet consumes: - application/json produces: - application/json parameters: - in: query name: api-version description: The requested API version required: true type: string - in: body name: weatherDataProviderRequest description: Weather data provider request. required: true schema: $ref: '#/definitions/WeatherDataProviderRequest' responses: '200': description: Success schema: $ref: '#/definitions/WeatherDataProviderResponse' headers: x-ms-cache-hit: description: Indicate whether the request was cache hit or cache miss. type: boolean x-ms-response-latency-in-milliseconds: description: Time taken in milliseconds for processing the request at server side. type: integer format: int32 default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: WeatherData_Get: $ref: ./examples/WeatherData_Get.json summary: Microsoft Azure Post Weather Data :fetch /weather-data:fetch: post: tags: - WeatherData description: Returns a list of WeatherData. operationId: microsoftAzureWeatherdataGet consumes: - application/json produces: - application/json parameters: - in: query name: api-version description: The requested API version required: true type: string - in: body name: weatherDataProviderRequest description: Weather data provider request. required: true schema: $ref: '#/definitions/WeatherDataProviderRequest_2' responses: '200': description: Success schema: $ref: '#/definitions/WeatherDataProviderResponse' default: description: Error schema: $ref: '#/definitions/ErrorResponse' headers: x-ms-error-code: type: string x-ms-client-name: ErrorCode x-ms-error-response: true x-ms-examples: WeatherData_Get: $ref: ./examples/WeatherData_Get.json summary: Microsoft Azure Post Weather Data:fetch definitions: WeatherLocation: description: Schema of Location data. required: - type - value type: object properties: type: description: Location Type eg. LatLong/IataCode/IcaoCode/Placeid/PostalKey. maxLength: 25 minLength: 2 enum: - LatLong - IataCode - IcaoCode - PlaceId - PostalKey type: string x-ms-enum: name: LocationType modelAsString: true value: description: Location Value eg. "10,-25" for LocationType Type "LatLong". minLength: 1 type: string ApiKeyAuthCredentials: description: Api Key Auth Credentials class for API Key based Auth. type: object allOf: - $ref: '#/definitions/AuthCredentials' - required: - apiKey type: object properties: apiKey: $ref: '#/definitions/KeyVaultProperties' x-ms-discriminator-value: ApiKeyAuthCredentials WeatherLocationData: description: Schema of WeatherLocationData data. type: object properties: location: $ref: '#/definitions/WeatherLocation' requestCompletionTime: description: Request Completion Time in Utc of the location. type: string lastRefreshedDateTime: format: date-time description: 'Date-time when resource was last requested, sample format: yyyy-MM-ddTHH:mm:ssZ.' type: string example: 2020-12-31T11:10:21Z. data: $ref: '#/definitions/WeatherDataForPassthrough' AdditionalProviderParameters_2: description: Schema of additional parameters for weather data provider request. type: object properties: iconResolution: description: Icon Resolution (Only applicable for AzureWeatherMaps). maxLength: 100 minLength: 2 type: string details: description: Details (Only applicable for AzureWeatherMaps). default: true type: boolean WeatherDataProviderRequest_2: description: Schema of weather data provider request. required: - extensionApiName - extensionId - units type: object properties: credentials: $ref: '#/definitions/ApiKeyAuthCredentials' locations: description: List of locations for which weather data need to be fetched from the provider. type: array items: $ref: '#/definitions/WeatherLocation_2' extensionId: description: Id of the extension to be used for the providerInput. eg. DTN.ClearAg. maxLength: 100 minLength: 2 type: string extensionApiName: description: Extension api name to which request is to be made. maxLength: 100 minLength: 2 type: string language: description: 'Language (IETF BCP 47 language tag) in which search results should be returned by the data provider. Examples: ''en-US'', ''es'', ''es-MX'', ''fr-FR''.' maxLength: 100 minLength: 0 type: string startTimeHours: format: int32 description: Start of time range. Hour 0 represents the current hour. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer endTimeHours: format: int32 description: End of time range. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer duration: format: int32 description: Specifies for how many days the daily forecast responses are returned. Available values are 1, 5, 10, 25 and 45. (Only applicable for Azure Weather Maps extension.) type: integer units: description: Units for which request to data provider is to be sent. Supported values are 'e' for English units, 'm' for Metric units, 'h' for Hybrid units (UK) and 's' for Metric SI units. minLength: 1 type: string additionalParams: $ref: '#/definitions/AdditionalProviderParameters_2' KeyVaultProperties: description: Properties of the key vault. required: - keyName - keyVaultUri - keyVersion type: object properties: keyVaultUri: description: Uri of the key vault. maxLength: 100 minLength: 2 type: string keyName: description: Name of Key Vault key. maxLength: 256 minLength: 2 type: string keyVersion: description: Version of Key Vault key. maxLength: 256 minLength: 2 type: string AuthCredentialsKind: description: Enum for different types of AuthCredentials supported. enum: - OAuthClientCredentials - ApiKeyAuthCredentials type: string x-ms-enum: name: AuthCredentialsKind modelAsString: true WeatherDataForPassthrough: description: Schema of weather data. type: object properties: wetBulbTemperature: $ref: '#/definitions/Measures' cloudCover: $ref: '#/definitions/Measures' dayOfWeek: description: Day of week. type: array items: type: string dayOrNight: description: This data field indicates whether it is daytime or nighttime based on the Local Apparent Time of the location. type: array items: type: string expirationTime: description: Expiration time in Utc format. type: array items: type: string iconCode: description: This number is the key to the weather icon lookup. The data field shows the icon number that is matched to represent the observed weather conditions. type: array items: type: string iconCodeExtend: description: Code representing full set sensible weather. type: array items: type: string hasPrecipitation: description: Indicates whether there is precipitation or not. type: array items: type: boolean pressureMeanSeaLevel: $ref: '#/definitions/Measures' relativeHumidity: $ref: '#/definitions/Measures' temperature: $ref: '#/definitions/Measures' temperatureDewPoint: $ref: '#/definitions/Measures' temperatureFeelsLike: $ref: '#/definitions/Measures' temperatureHeatIndex: $ref: '#/definitions/Measures' temperatureWindChill: $ref: '#/definitions/Measures' uvDescription: description: The UV Index Description which complements the UV Index value by providing an associated level of risk of skin damage due to exposure (-2 = Not Available, -1 = No Report, 0 to 2 = Low, 3 to 5 = Moderate, 6 to 7 = High, 8 to 10 = Very High, 11 to 16 = Extreme). type: array items: type: string uvIndex: description: Hourly maximum UV index. type: array items: type: string validTimeLocal: description: Time forecast is valid in local apparent time. type: array items: type: string validTime: description: Time forecast is valid in Utc format. type: array items: type: string visibility: $ref: '#/definitions/Measures' windDirection: $ref: '#/definitions/Measures' windGust: $ref: '#/definitions/Measures' windSpeed: $ref: '#/definitions/Measures' wxPhraseLong: description: Hourly sensible weather phrase containing longer description. type: array items: type: string wxPhraseShort: description: Hourly sensible weather phrase containing short description. type: array items: type: string additionalAttributes: description: 'A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 250 characters. Note: A maximum of 100 key value pairs can be provided for a resource and only string and numeral values are supported.' type: object additionalProperties: {} WeatherDataErrors: description: Model for errors encountered for all failed locations. type: object properties: locations: description: List of errors encountered for all failed locations. type: array items: $ref: '#/definitions/ErrorForLocation' WeatherDataProviderRequest: description: Schema of weather data provider request. required: - extensionApiName - extensionId - providerApiKey - units type: object properties: locations: description: List of locations for which weather data need to be fetched from the provider. type: array items: $ref: '#/definitions/WeatherLocation' providerAppId: description: App id of the weather data provider. maxLength: 200 minLength: 2 type: string providerApiKey: description: Api key of the weather data provider. maxLength: 200 minLength: 2 type: string extensionId: description: Id of the extension to be used for the providerInput. eg. DTN.ClearAg. minLength: 1 type: string extensionApiName: description: Extension api name to which request is to be made. minLength: 1 type: string language: description: 'Language (IETF BCP 47 language tag) in which search results should be returned by the data provider. Examples: ''en-US'', ''es'', ''es-MX'', ''fr-FR''.' type: string startTimeHours: format: int32 description: Start of time range. Hour 0 represents the current hour. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer endTimeHours: format: int32 description: End of time range. Supported ranges are from 0 to 240. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer duration: format: int32 description: Specifies for how many days the daily forecast responses are returned. Available values are 1, 5, 10, 25 and 45. (Only applicable for Azure Weather Maps extension.) type: integer units: description: Units for which request to data provider is to be sent. Supported values are 'e' for English units, 'm' for Metric units, 'h' for Hybrid units (UK) and 's' for Metric SI units. minLength: 1 type: string additionalParams: $ref: '#/definitions/AdditionalProviderParameters' WeatherMetadata: description: Schema of Weather Metadata. required: - extensionApiName - extensionId - extensionVersion - units - weatherDataType type: object properties: extensionVersion: description: Version of the weather data extension. minLength: 1 type: string weatherDataType: description: Type of weather data (forecast/historical). minLength: 1 type: string extensionId: description: Id of the extension to be used for the providerInput. eg. DTN.ClearAg. minLength: 1 type: string extensionApiName: description: Extension api name to which request is to be made. minLength: 1 type: string language: description: 'Language (IETF BCP 47 language tag) in which search results should be returned by the data provider. Examples: ''en-US'', ''es'', ''es-MX'', ''fr-FR''.' type: string startTimeHours: format: int32 description: Start of time range. Hour 0 represents the current hour. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer endTimeHours: format: int32 description: End of time range. (Only applicable for DTN.ClearAg extension.) maximum: 240 minimum: 0 type: integer duration: format: int32 description: Specifies for how many days the daily forecast responses are returned. Available values are 1, 5, 10, 25 and 45. (Only applicable for Azure Weather Maps extension.) type: integer units: description: Units for which request to data provider is to be sent. Supported values are 'e' for English units, 'm' for Metric units, 'h' for Hybrid units (UK) and 's' for Metric SI units. minLength: 1 type: string additionalParams: $ref: '#/definitions/AdditionalProviderParameters' ErrorForLocation: description: Model for error information for a failed location. type: object properties: location: $ref: '#/definitions/WeatherLocation' code: format: int32 description: Status code returned by data provider. type: integer description: description: Description of the error. type: string retryable: description: Flag suggesting if retry attempt with same request body should be made to fetch required data. type: boolean Error: description: An error from the Azure AgPlatform service. required: - code - message type: object properties: code: description: Server-defined set of error codes. minLength: 1 type: string message: description: Human-readable representation of the error. minLength: 1 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' AuthCredentials: description: AuthCredentials abstract base class for Auth Purpose. required: - kind type: object properties: kind: $ref: '#/definitions/AuthCredentialsKind' discriminator: kind ErrorResponse: description: An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document. type: object properties: error: $ref: '#/definitions/Error' traceId: description: Unique trace Id. type: string WeatherDataProviderResponse: description: Schema of Weather Data Provider Response. required: - weatherMetadata type: object properties: weatherMetadata: $ref: '#/definitions/WeatherMetadata' status: description: Indicates a Succeeded, Failed, or PartiallySucceeded response. enum: - Succeeded - Failed - PartiallySucceeded type: string x-ms-enum: name: Status modelAsString: true locations: description: List of weather data for all the weather locations. type: array items: $ref: '#/definitions/WeatherLocationData' errors: $ref: '#/definitions/WeatherDataErrors' Measures: description: Schema for storing measurement readings and unit. type: object properties: unit: description: Data unit. maxLength: 50 minLength: 1 type: string values: description: Data values. type: array items: format: double type: number InnerError: description: Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. type: object properties: code: description: Specific error code than was provided by the containing error. type: string innererror: $ref: '#/definitions/InnerError' AdditionalProviderParameters: description: Schema of additional parameters for weather data provider request. type: object properties: iconResolution: description: Icon Resolution (Only applicable for AzureWeatherMaps). type: string details: description: Details (Only applicable for AzureWeatherMaps). default: true type: boolean WeatherLocation_2: description: Schema of Location data. required: - type - value type: object properties: type: description: Location Type eg. LatLong/IataCode/IcaoCode/Placeid/PostalKey. maxLength: 25 minLength: 2 enum: - LatLong - IataCode - IcaoCode - PlaceId - PostalKey type: string x-ms-enum: name: LocationType modelAsString: true value: description: Location Value eg. "10,-25" for LocationType Type "LatLong". maxLength: 100 minLength: 2 type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'