swagger: '2.0' info: version: 2020-08-01-preview title: 'Microsoft Azure AccessControlClient AccessConnector Custom Speech Web Hooks: API' schemes: - https tags: - name: 'Custom Speech Web Hooks:' paths: /webhooks: get: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Gets The List Of Web Hooks For The Authenticated Subscription operationId: microsoftAzureGethooks produces: - application/json parameters: - $ref: '#/parameters/skipQueryParameter' - $ref: '#/parameters/topQueryParameter' responses: '200': description: OK schema: $ref: '#/definitions/PaginatedWebHooks' headers: Retry-After: description: The minimum number of seconds to wait for a non terminal operation to complete. type: integer default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-pageable: itemName: values nextLinkName: '@nextLink' x-ms-examples: Get all web hooks: $ref: ./examples/get_web_hooks.json description: Needs a more full description created. post: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Creates A New Web Hook description: If the property secret in the configuration is present and contains a non-empty string, it will be used to create a SHA256 hash of the payload with
the secret as HMAC key. This hash will be set as X-MicrosoftSpeechServices-Signature header when calling back into the registered URL.

When calling back into the registered URL, the request will contain a X-MicrosoftSpeechServices-Event header containing one of the registered event
types. There will be one request per registered event type.

After successfully registering the web hook, it will not be usable until a challenge/response is completed. To do this, a request with the event type
challenge will be made with a query parameter called validationToken. Respond to the challenge with a 200 OK containing the value of the validationToken
query parameter as the response body. When the challenge/response is successfully completed, the web hook will begin receiving events. operationId: microsoftAzureCreatehook consumes: - application/json produces: - application/json parameters: - in: body name: webHook description: The details of the new web hook. required: true schema: $ref: '#/definitions/WebHook' responses: '201': description: The response contains information about the entity as payload and its location as header. schema: $ref: '#/definitions/WebHook' headers: Location: description: The location of the created resource. type: string format: uri default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Create a web hook: $ref: ./examples/create_web_hook.json /webhooks/{id}: get: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Gets The Web Hook Identified By The Given Id operationId: microsoftAzureGethook produces: - application/json parameters: - in: path name: id description: The identifier of the web hook. required: true type: string format: uuid responses: '200': description: OK schema: $ref: '#/definitions/WebHook' headers: Retry-After: description: The minimum number of seconds to wait for a non terminal operation to complete. type: integer default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Get a web hook: $ref: ./examples/get_web_hook.json description: Needs a more full description created. patch: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Updates The Web Hook Identified By The Given Id description: If the property secret in the configuration is omitted or contains an empty string, future callbacks won't contain X-MicrosoftSpeechServices-Signature
headers. If the property contains a non-empty string, it will be used to create a SHA256 hash of the payload with the secret as HMAC key. This hash
will be set as X-MicrosoftSpeechServices-Signature header when calling back into the registered URL.

If the URL changes, the web hook will stop receiving events until a
challenge/response is completed. To do this, a request with the event type challenge will be made with a query parameter called validationToken.
Respond to the challenge with a 200 OK containing the value of the validationToken query parameter as the response body. When the challenge/response
is successfully completed, the web hook will begin receiving events. operationId: microsoftAzureUpdatehook consumes: - application/json - application/merge-patch+json produces: - application/json parameters: - in: path name: id description: The identifier of the web hook. required: true type: string format: uuid - in: body name: webHookUpdate description: The updated values for the web hook. required: true schema: $ref: '#/definitions/WebHookUpdate' responses: '200': description: OK schema: $ref: '#/definitions/WebHook' headers: Retry-After: description: The minimum number of seconds to wait for a non terminal operation to complete. type: integer default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Update a web hook: $ref: ./examples/update_web_hook.json delete: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Deletes The Web Hook Identified By The Given Id operationId: microsoftAzureDeletehook produces: - application/json parameters: - in: path name: id description: The identifier of the web hook. required: true type: string format: uuid responses: '204': description: The web hook was successfully deleted. default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Delete a web hook: $ref: ./examples/delete_web_hook.json description: Needs a more full description created. /webhooks/{id}/ping: post: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Sends A Ping Event To The Registered Url description: The request body of the POST request sent to the registered web hook URL is of the same shape as in the GET request for a specific hook.
The Swagger Schema ID of the model is WebHookV3.

The request will contain a X-MicrosoftSpeechServices-Event header with the value ping. If the web hook was registered with
a secret it will contain a X-MicrosoftSpeechServices-Signature header with an SHA256 hash of the payload with
the secret as HMAC key. The hash is base64 encoded. operationId: microsoftAzurePinghook produces: - application/json parameters: - in: path name: id description: The identifier of the web hook to ping. required: true type: string format: uuid responses: '202': description: Started trying to send a ping request to the web hook. headers: Retry-After: description: The minimum number of seconds to wait before accessing the resource created in this operation. type: integer default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Ping a web hook: $ref: ./examples/ping_web_hook.json /webhooks/{id}/test: post: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Sends A Request For Each Registered Event Type To The Registered Url description: The payload will be generated from the last entity that would have invoked the web hook. If no entity is present for none of the registered event types,
the POST will respond with 204. If a test request can be made, it will respond with 200.
The request will contain a X-MicrosoftSpeechServices-Event header with the respective registered event type.
If the web hook was registered with a secret it will contain a X-MicrosoftSpeechServices-Signature header with an SHA256 hash of the payload with
the secret as HMAC key. The hash is base64 encoded. operationId: microsoftAzureTesthook produces: - application/json parameters: - in: path name: id description: The identifier of the web hook to ping. required: true type: string format: uuid responses: '202': description: A test request with the last entity is sent to the registered web hook. headers: Retry-After: description: The minimum number of seconds to wait before accessing the resource created in this operation. type: integer '204': description: No entity could be found for any event type, so no test request is sent to the registered web hook. default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Test a web hook: $ref: ./examples/test_web_hook.json /webhooks/{id}:ping: post: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Sends A Ping Event To The Registered Url description: The request body of the POST request sent to the registered web hook URL is of the same shape as in the GET request for a specific hook.
The Swagger Schema ID of the model is WebHookV3.

The request will contain a X-MicrosoftSpeechServices-Event header with the value ping. If the web hook was registered with
a secret it will contain a X-MicrosoftSpeechServices-Signature header with an SHA256 hash of the payload with
the secret as HMAC key. The hash is base64 encoded. operationId: microsoftAzureWebhooksPing produces: - application/json parameters: - in: path name: id description: The identifier of the web hook to ping. required: true type: string format: uuid responses: '202': description: Started trying to send a ping request to the web hook. headers: Retry-After: description: The minimum number of seconds to wait before accessing the resource created in this operation. type: integer format: int32 default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Ping a web hook: $ref: ./examples/ping_web_hook.json /webhooks/{id}:test: post: tags: - 'Custom Speech Web Hooks:' summary: Microsoft Azure Sends A Request For Each Registered Event Type To The Registered Url description: The payload will be generated from the last entity that would have invoked the web hook. If no entity is present for none of the registered event types,
the POST will respond with 204. If a test request can be made, it will respond with 200.
The request will contain a X-MicrosoftSpeechServices-Event header with the respective registered event type.
If the web hook was registered with a secret it will contain a X-MicrosoftSpeechServices-Signature header with an SHA256 hash of the payload with
the secret as HMAC key. The hash is base64 encoded. operationId: microsoftAzureWebhooksTest produces: - application/json parameters: - in: path name: id description: The identifier of the web hook to ping. required: true type: string format: uuid responses: '202': description: A test request with the last entity is sent to the registered web hook. headers: Retry-After: description: The minimum number of seconds to wait before accessing the resource created in this operation. type: integer format: int32 '204': description: No entity could be found for any event type, so no test request is sent to the registered web hook. default: description: An error occurred. schema: $ref: '#/definitions/Error' x-ms-examples: Test a web hook: $ref: ./examples/test_web_hook.json definitions: ErrorCode: title: ErrorCode description: High level error codes. enum: - InvalidRequest - InvalidArgument - InternalServerError - ServiceUnavailable - NotFound - PipelineError - Conflict - InternalCommunicationFailed - Forbidden - NotAllowed - Unauthorized - UnsupportedMediaType - TooManyRequests - UnprocessableEntity type: string x-ms-enum: name: ErrorCode modelAsString: true values: - value: InvalidRequest description: Representing the invalid request error code. - value: InvalidArgument description: Representing the invalid argument error code. - value: InternalServerError description: Representing the internal server error error code. - value: ServiceUnavailable description: Representing the service unavailable error code. - value: NotFound description: Representing the not found error code. - value: PipelineError description: Representing the pipeline error error code. - value: Conflict description: Representing the conflict error code. - value: InternalCommunicationFailed description: Representing the internal communication failed error code. - value: Forbidden description: Representing the forbidden error code. - value: NotAllowed description: Representing the not allowed error code. - value: Unauthorized description: Representing the unauthorized error code. - value: UnsupportedMediaType description: Representing the unsupported media type error code. - value: TooManyRequests description: Representing the too many requests error code. - value: UnprocessableEntity description: Representing the unprocessable entity error code. PaginatedWebHooks: title: PaginatedWebHooks type: object properties: values: description: "A list of entities limited by either the passed query parameters 'skip' and 'top' or their default values.\r\n \r\nWhen iterating through a list using pagination and deleting entities in parallel, some entities will be skipped in the results.\r\nIt's recommended to build a list on the client and delete after the fetching of the complete list." type: array items: $ref: '#/definitions/WebHook' readOnly: true '@nextLink': format: uri description: A link to the next set of paginated results if there are more entities available; otherwise null. type: string readOnly: true EntityError: title: EntityError type: object properties: code: description: The code of this error. type: string readOnly: true message: description: The message for this error. type: string readOnly: true WebHookUpdate: title: WebHookUpdate type: object properties: webUrl: format: uri description: The registered URL that will be used to send the POST requests for the registered events to. type: string properties: $ref: '#/definitions/WebHookPropertiesUpdate' events: $ref: '#/definitions/WebHookEvents' displayName: description: The name of the object. type: string description: description: The description of the object. type: string customProperties: description: "The custom properties of this entity. The maximum allowed key length is 64 characters, the maximum\r\nallowed value length is 256 characters and the count of allowed entries is 10." type: object additionalProperties: type: string DetailedErrorCode: title: DetailedErrorCode description: Detailed error code enum. enum: - InvalidParameterValue - InvalidRequestBodyFormat - EmptyRequest - MissingInputRecords - InvalidDocument - ModelVersionIncorrect - InvalidDocumentBatch - UnsupportedLanguageCode - DataImportFailed - InUseViolation - InvalidLocale - InvalidBaseModel - InvalidAdaptationMapping - InvalidDataset - InvalidTest - FailedDataset - InvalidModel - InvalidTranscription - InvalidPayload - InvalidParameter - EndpointWithoutLogging - InvalidPermissions - InvalidPrerequisite - InvalidProductId - InvalidSubscription - InvalidProject - InvalidProjectKind - InvalidRecordingsUri - OnlyOneOfUrlsOrContainerOrDataset - ExceededNumberOfRecordingsUris - ModelMismatch - ProjectGenderMismatch - ModelDeprecated - ModelExists - ModelNotDeployable - EndpointNotUpdatable - SingleDefaultEndpoint - EndpointCannotBeDefault - InvalidModelUri - SubscriptionNotFound - QuotaViolation - UnsupportedDelta - UnsupportedFilter - UnsupportedPagination - UnsupportedDynamicConfiguration - UnsupportedOrderBy - NoUtf8WithBom - ModelDeploymentNotCompleteState - SkuLimitsExist - DeployingFailedModel - UnsupportedTimeRange - InvalidLogDate - InvalidLogId - InvalidLogStartTime - InvalidLogEndTime - InvalidTopForLogs - InvalidSkipTokenForLogs - DeleteNotAllowed - Forbidden - DeployNotAllowed - UnexpectedError - InvalidCollection - InvalidCallbackUri - InvalidSasValidityDuration - InaccessibleCustomerStorage - UnsupportedClassBasedAdaptation - InvalidWebHookEventKind - InvalidTimeToLive type: string x-ms-enum: name: DetailedErrorCode modelAsString: true values: - value: InvalidParameterValue description: Invalid parameter value. - value: InvalidRequestBodyFormat description: Invalid request body format. - value: EmptyRequest description: Empty Request. - value: MissingInputRecords description: Missing Input Records. - value: InvalidDocument description: Invalid Document. - value: ModelVersionIncorrect description: Model Version Incorrect. - value: InvalidDocumentBatch description: Invalid Document Batch. - value: UnsupportedLanguageCode description: Unsupported language code. - value: DataImportFailed description: Data import failed. - value: InUseViolation description: In use violation. - value: InvalidLocale description: Invalid locale. - value: InvalidBaseModel description: Invalid base model. - value: InvalidAdaptationMapping description: Invalid adaptation mapping. - value: InvalidDataset description: Invalid dataset. - value: InvalidTest description: Invalid test. - value: FailedDataset description: Failed dataset. - value: InvalidModel description: Invalid model. - value: InvalidTranscription description: Invalid transcription. - value: InvalidPayload description: Invalid payload. - value: InvalidParameter description: Invalid parameter. - value: EndpointWithoutLogging description: Endpoint without logging. - value: InvalidPermissions description: Invalid permissions. - value: InvalidPrerequisite description: Invalid prerequisite. - value: InvalidProductId description: Invalid product id. - value: InvalidSubscription description: Invalid subscription. - value: InvalidProject description: Invalid project. - value: InvalidProjectKind description: Invalid project kind. - value: InvalidRecordingsUri description: Invalid recordings uri. - value: OnlyOneOfUrlsOrContainerOrDataset description: Only one of urls or container or dataset. - value: ExceededNumberOfRecordingsUris description: Exceeded number of recordings uris. - value: ModelMismatch description: Model mismatch. - value: ProjectGenderMismatch description: Project gender mismatch. - value: ModelDeprecated description: Model deprecated. - value: ModelExists description: Model exists. - value: ModelNotDeployable description: Model not deployable. - value: EndpointNotUpdatable description: Endpoint not updatable. - value: SingleDefaultEndpoint description: Single default endpoint. - value: EndpointCannotBeDefault description: Endpoint cannot be default. - value: InvalidModelUri description: Invalid model uri. - value: SubscriptionNotFound description: Subscription not found. - value: QuotaViolation description: Quota violation. - value: UnsupportedDelta description: Unsupported delta. - value: UnsupportedFilter description: Unsupported filter. - value: UnsupportedPagination description: Unsupported pagination. - value: UnsupportedDynamicConfiguration description: Unsupported dynamic configuration. - value: UnsupportedOrderBy description: Unsupported order by. - value: NoUtf8WithBom description: No utf8 with bom. - value: ModelDeploymentNotCompleteState description: Model deployment not complete state. - value: SkuLimitsExist description: Sku limits exist. - value: DeployingFailedModel description: Deploying failed model. - value: UnsupportedTimeRange description: Unsupported time range. - value: InvalidLogDate description: Invalid log date. - value: InvalidLogId description: Invalid log id. - value: InvalidLogStartTime description: Invalid log start time. - value: InvalidLogEndTime description: Invalid log end time. - value: InvalidTopForLogs description: Invalid top for logs. - value: InvalidSkipTokenForLogs description: Invalid skip token for logs. - value: DeleteNotAllowed description: Delete not allowed. - value: Forbidden description: Forbidden. - value: DeployNotAllowed description: Deploy not allowed. - value: UnexpectedError description: Unexpected error. - value: InvalidCollection description: Invalid collection. - value: InvalidCallbackUri description: Invalid callback uri. - value: InvalidSasValidityDuration description: Invalid sas validity duration. - value: InaccessibleCustomerStorage description: Inaccessible customer storage. - value: UnsupportedClassBasedAdaptation description: Unsupported class based adaptation. - value: InvalidWebHookEventKind description: Invalid web hook event kind. - value: InvalidTimeToLive description: Invalid time to live. WebHookProperties: title: WebHookProperties type: object properties: error: $ref: '#/definitions/EntityError' apiVersion: description: "The API version the web hook was created in. This defines the shape of the payload in the callbacks.\r\nIf the payload type is not supported anymore, because the shape changed and the API version using it is removed (after deprecation),\r\nthe web hook will be disabled." type: string readOnly: true secret: description: "A secret that will be used to create a SHA256 hash of the payload with the secret as HMAC key.\r\nThis hash will be set as X-MicrosoftSpeechServices-Signature header when calling back into the registered URL." type: string WebHook: title: WebHook required: - displayName - events - webUrl type: object properties: webUrl: format: uri description: The registered URL that will be used to send the POST requests for the registered events to. type: string links: $ref: '#/definitions/WebHookLinks' properties: $ref: '#/definitions/WebHookProperties' self: format: uri description: The location of this entity. type: string readOnly: true displayName: description: The display name of the object. type: string description: description: The description of the object. type: string events: $ref: '#/definitions/WebHookEvents' createdDateTime: format: date-time description: "The time-stamp when the object was created.\r\nThe time stamp is encoded as ISO 8601 date and time format\r\n(\"YYYY-MM-DDThh:mm:ssZ\", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)." type: string readOnly: true lastActionDateTime: format: date-time description: "The time-stamp when the current status was entered.\r\nThe time stamp is encoded as ISO 8601 date and time format\r\n(\"YYYY-MM-DDThh:mm:ssZ\", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)." type: string readOnly: true status: $ref: '#/definitions/Status' customProperties: description: "The custom properties of this entity. The maximum allowed key length is 64 characters, the maximum\r\nallowed value length is 256 characters and the count of allowed entries is 10." type: object additionalProperties: type: string WebHookEvents: title: WebHookEvents type: object properties: datasetCreation: type: boolean datasetProcessing: type: boolean datasetCompletion: type: boolean datasetDeletion: type: boolean modelCreation: type: boolean modelProcessing: type: boolean modelCompletion: type: boolean modelDeletion: type: boolean evaluationCreation: type: boolean evaluationProcessing: type: boolean evaluationCompletion: type: boolean evaluationDeletion: type: boolean transcriptionCreation: type: boolean transcriptionProcessing: type: boolean transcriptionCompletion: type: boolean transcriptionDeletion: type: boolean endpointCreation: type: boolean endpointProcessing: type: boolean endpointCompletion: type: boolean endpointDeletion: type: boolean ping: type: boolean challenge: type: boolean Status: title: Status description: Describe the current state of the API enum: - NotStarted - Running - Succeeded - Failed type: string readOnly: true x-ms-enum: name: Status modelAsString: false values: - value: NotStarted description: The long running operation has not yet started. - value: Running description: The long running operation is currently processing. - value: Succeeded description: The long running operation has successfully completed. - value: Failed description: The long running operation has failed. WebHookLinks: title: WebHookLinks type: object properties: ping: format: uri description: The URL that can be used to trigger the sending of a ping event to the registered URL of a web hook registration. type: string readOnly: true test: format: uri description: The URL that can be used sending test events to the registered URL of a web hook registration. type: string readOnly: true InnerError: title: InnerError description: "New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow.\r\nThis contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested)." type: object properties: code: $ref: '#/definitions/DetailedErrorCode' details: description: Additional supportive details regarding the error and/or expected policies. type: object additionalProperties: type: string message: description: High level error message. type: string target: description: "The source of the error.\r\nFor example it would be \"documents\" or \"document id\" in case of invalid document." type: string innerError: $ref: '#/definitions/InnerError' WebHookPropertiesUpdate: title: WebHookPropertiesUpdate type: object properties: secret: description: "A secret that will be used to create a SHA256 hash of the payload with the secret as HMAC key.\r\nThis hash will be set as X-MicrosoftSpeechServices-Signature header when calling back into the registered URL." type: string Error: title: Error description: "New format which conforms to the new Cognitive Services API guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow.\r\nThis contains an outer error with error code, message, details, target and an inner error with more descriptive details." type: object properties: code: $ref: '#/definitions/ErrorCode' details: description: Additional supportive details regarding the error and/or expected policies. type: array items: $ref: '#/definitions/Error' message: description: High level error message. type: string target: description: "The source of the error.\r\nFor example it would be \"documents\" or \"document id\" in case of invalid document." type: string innerError: $ref: '#/definitions/InnerError' parameters: skipQueryParameter: in: query name: skip description: Number of datasets that will be skipped. type: integer format: int32 x-ms-parameter-location: method topQueryParameter: in: query name: top description: Number of datasets that will be included after skipping. type: integer format: int32 x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'