swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Consent API schemes: - https tags: - name: Consent paths: /consents: get: tags: - Consent description: Gets a list of consents for the authenticated Speech service resource. operationId: microsoftAzureConsentsList produces: - application/json parameters: - $ref: '#/parameters/QuerySkip' - $ref: '#/parameters/QueryMaxPageSize' - $ref: '#/parameters/QueryFilter' - $ref: '#/parameters/QueryApiVersion' responses: '200': description: Success schema: $ref: '#/definitions/PaginatedConsents' default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-pageable: nextLinkName: nextLink itemName: value x-ms-examples: Get all consents: $ref: ./examples/get_consents.json summary: Microsoft Azure Get Consents /consents/{id}: get: tags: - Consent description: Gets the consent identified by the given ID. operationId: microsoftAzureConsentsGet produces: - application/json parameters: - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' responses: '200': description: Success schema: $ref: '#/definitions/Consent' default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Get a consent: $ref: ./examples/get_consent.json summary: Microsoft Azure Get Consents Id delete: tags: - Consent description: Deletes the consent identified by the given ID. operationId: microsoftAzureConsentsDelete produces: - application/json parameters: - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' responses: '204': description: No Content default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-examples: Delete a consent: $ref: ./examples/delete_consent.json summary: Microsoft Azure Delete Consents Id put: tags: - Consent description: Creates a new voice talent consent with the provided audio URL. operationId: microsoftAzureConsentsCreate consumes: - application/json produces: - application/json parameters: - $ref: '#/parameters/HeaderOperationId' - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' - in: body name: consent description: consent definition required: true schema: $ref: '#/definitions/Consent' responses: '201': description: Created schema: $ref: '#/definitions/Consent' headers: Operation-Id: type: string description: ID of the operation. Operation-Location: description: The location of the operation job. Use this URL to monitor operation status. type: string format: uri default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-long-running-operation: true x-ms-examples: Create a consent: $ref: ./examples/create_consent.json summary: Microsoft Azure Put Consents Id post: tags: - Consent description: Creates a new voice talent consent with the provided audio file. operationId: microsoftAzureConsentsPost consumes: - multipart/form-data produces: - application/json parameters: - $ref: '#/parameters/HeaderOperationId' - $ref: '#/parameters/PathId' - $ref: '#/parameters/QueryApiVersion' - in: formData name: projectId description: The project ID. required: true type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 - in: formData name: displayName description: The display name of this consent. type: string - in: formData name: description description: Optional description of this consent. type: string - in: formData name: voiceTalentName description: The name of voice talent. required: true type: string - in: formData name: companyName description: The name of company. required: true type: string - in: formData name: audiodata description: An audio file containing the audio data. required: true type: file - in: formData name: locale description: The locale of this consent. Locale code follows BCP-47. You can find the text to speech locale list here https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts. required: true type: string - in: formData name: properties description: properties. type: string responses: '201': description: Created schema: $ref: '#/definitions/Consent' headers: Operation-Id: type: string description: ID of the operation. Operation-Location: description: The location of the operation job. Use this URL to monitor operation status. type: string format: uri default: description: An error occurred. schema: $ref: '#/definitions/ErrorResponse' x-ms-long-running-operation: true x-ms-long-running-operation-options: final-state-via: operation-location x-ms-examples: Create a consent: $ref: ./examples/create_consent_with_multipart_form.json summary: Microsoft Azure Post Consents Id /operatorconnect/consents: get: tags: - Consent x-ms-examples: GetConsents: $ref: ./examples/GetConsents.json x-ms-pageable: nextLinkName: nextLink itemName: value description: This endpoint gets a list of all Consents with Operators for the current user summary: Microsoft Azure Get A List Of All Consents With Operators For Current User produces: - application/json operationId: microsoftAzureGetconsents parameters: - in: query name: skip description: An optional parameter for how many entries to skip, for pagination purposes. The default value is 0. type: integer format: int32 default: 0 - in: query name: top description: An optional parameter for how many entries to return, for pagination purposes. The default will return the entire list. type: integer format: int32 - in: query name: api-version description: Version of API required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/ListOfConsents' headers: x-ms-request-id: type: string description: Microsoft request id used for tracing requests. default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse headers: x-ms-error-code: type: string description: Error code /operatorconnect/consents/{operatorId}: get: tags: - Consent x-ms-examples: GetConsents: $ref: ./examples/GetConsent.json description: This endpoint gets single Consent with Operator for current user summary: Microsoft Azure Get Single Consent With Operator For Current User produces: - application/json operationId: microsoftAzureGetconsent parameters: - in: path name: operatorId description: The id of Operator with who user has signed consent required: true type: string - in: query name: api-version description: Version of API required: true type: string responses: '200': description: Success schema: $ref: '#/definitions/Consent_2' headers: x-ms-request-id: type: string description: Microsoft request id used for tracing requests. default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse headers: x-ms-error-code: type: string description: Error code patch: tags: - Consent x-ms-examples: CreateConsent: $ref: ./examples/CreateConsent.json UpdateConsent: $ref: ./examples/UpdateConsent.json consumes: - application/merge-patch+json produces: - application/json operationId: microsoftAzureCreateorupdateconsent description: This endpoint creates new or updates the existing Consent with Operator summary: Microsoft Azure Create New Or Update Existing Consent With Operator For Current User parameters: - in: query name: api-version description: Version of API required: true type: string - in: path name: operatorId description: The id of the Operator with who user wants to create new or update existing consent required: true type: string - in: body name: body description: The request to send to create new or update existing consent with an operator required: true schema: $ref: '#/definitions/CreateOrUpdateConsentRequest' responses: '200': description: Consent Updated schema: $ref: '#/definitions/Consent_2' headers: x-ms-request-id: type: string description: Microsoft request id used for tracing requests. '201': description: Consent Created schema: $ref: '#/definitions/Consent_2' headers: x-ms-request-id: type: string description: Microsoft request id used for tracing requests. default: description: Failure schema: $ref: ../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse headers: x-ms-error-code: type: string description: Error code definitions: Consent: description: Consent object required: - voiceTalentName - companyName - locale - projectId type: object properties: id: $ref: '#/definitions/ResourceId' displayName: description: Name of consent. minLength: 1 type: string description: description: Description of consent. type: string voiceTalentName: description: Voice talent name. Must match the voice talent name in the consent audio file. minLength: 1 type: string companyName: description: Company name. Must match the company name in the consent audio file. minLength: 1 type: string audioUrl: description: The public accessible URL of the consent audio file. It's recommended to be an Azure blob URL with [SAS](https://learn.microsoft.com/azure/storage/common/storage-sas-overview). This property is only available in request. type: string format: uri locale: description: The locale of this consent. Locale code follows BCP-47. You can find the text to speech locale list here https://learn.microsoft.com/azure/ai-services/speech-service/language-support?tabs=tts. type: string example: en-US projectId: $ref: '#/definitions/ResourceId' status: $ref: '#/definitions/Status' createdDateTime: description: The timestamp when the object was created. The timestamp is encoded as ISO 8601 date and time format ("YYYY-MM-DDThh:mm:ssZ", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format: date-time type: string readOnly: true lastActionDateTime: description: The timestamp when the current status was entered. The timestamp is encoded as ISO 8601 date and time format ("YYYY-MM-DDThh:mm:ssZ", see https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations). format: date-time type: string readOnly: true ListOfConsents: type: object properties: value: type: array items: $ref: '#/definitions/Consent_2' nextLink: type: string description: Represents the URL link to the next page of consents. required: - value Consent_2: type: object properties: operatorId: type: string description: Unique GUID that represents the operator record status: $ref: '#/definitions/ConsentStatus' consentedBy: $ref: '#/definitions/Contact' description: Contact information of user that granted the consent to operator consentedOn: type: string description: Date/Time when the consent was provided format: date-time lastModifiedBy: $ref: '#/definitions/Contact' description: Contact information of user that last modified the consent lastModifiedOn: type: string description: Date/Time when the consent was last updated format: date-time consentedCountries: type: array description: List of 2 character codes of available countries in ISO 3166-1 format items: type: string contacts: type: array items: $ref: '#/definitions/Contact' description: List of contact information companyName: type: string description: User company name additionalProperties: false Contact: type: object properties: fullName: type: string description: Full name of the contact email: type: string description: Email address of the contact phoneNumber: type: string description: Phone number of the contact with a leading + and country code additionalProperties: false PaginatedConsents: description: Paginated consent list required: - value type: object properties: value: description: Consent list type: array items: $ref: '#/definitions/Consent' nextLink: description: Link to next page. format: uri type: string ResourceId: description: Resource id type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 ConsentStatus: type: string description: Status of the consent enum: - Active - Suspended - Removed Status: description: Status of a resource. enum: - NotStarted - Running - Succeeded - Failed - Disabling - Disabled type: string x-ms-enum: name: Status modelAsString: true CreateOrUpdateConsentRequest: type: object properties: status: $ref: '#/definitions/ConsentStatus' consentedBy: $ref: '#/definitions/Contact' lastModifiedBy: $ref: '#/definitions/Contact' consentedCountries: type: array description: List of 2 character codes of available countries in ISO 3166-1 format items: type: string contacts: type: array items: $ref: '#/definitions/Contact' companyName: type: string additionalProperties: false Error: description: Top-level error follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. This contains an top-level error with error code, message, details, target and an inner error with more descriptive details. required: - code - message type: object properties: code: $ref: '#/definitions/ErrorCode' target: description: The source of the error. For example it would be "model" or "model id" in case of invalid model. type: string message: description: Top-level error message. type: string details: description: Additional supportive details regarding the error and/or expected policies. type: array items: $ref: '#/definitions/Error' innererror: $ref: '#/definitions/InnerError' ErrorResponse: description: Error response follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. required: - error type: object properties: error: $ref: '#/definitions/Error' ErrorCode: description: Top-level error code enum: - BadRequest - BadArgument - Unauthorized - Forbidden - NotFound - UnsupportedMediaType - TooManyRequests - InternalServerError - ServiceUnavailable type: string x-ms-enum: name: ErrorCode modelAsString: true InnerError: description: Inner error follows Microsoft Azure REST API Guidelines which is available at https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. This contains required properties error code, message and optional properties target, inner error(this can be nested). type: object properties: code: description: Detailed error code to help diagnostic. type: string target: description: The source of the error. For example it would be "model" or "model id" in case of invalid model. type: string message: description: Detailed error message. type: string innererror: $ref: '#/definitions/InnerError' parameters: QueryMaxPageSize: name: maxpagesize in: query description: The maximum number of items to include in a single response. required: false type: integer format: int32 default: 100 x-ms-parameter-location: method HeaderOperationId: name: Operation-Id in: header description: ID of the status monitor for the operation. If the Operation-Id header matches an existing operation and the request is not identical to the prior request, it will fail with a 400 Bad Request. required: false type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 x-ms-parameter-location: method QueryFilter: name: filter in: query description: "Filter condition.\r\n - **Supported properties:** projectId, createdDateTime, locale, kind\r\n - **Operators:**\r\n - eq, ne are supported for all properties.\r\n - gt, ge, lt, le are supported for createdDateTime.\r\n - **Example:**\r\n - ```filter=projectId eq 'Jessica'``` (filter by project ID)\r\n - ```filter=kind eq 'ProfessionalVoice'``` (filter project by kind)\r\n - ```filter=locale eq 'en-US'``` (filter training set and model by locale)\r\n - ```filter=createdDateTime gt 2022-12-30T23:59:59.99Z``` (filter resource created time after 2023-11-01)" required: false type: string x-ms-parameter-location: method PathId: name: id in: path description: The ID of the resource. required: true type: string pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$ minLength: 3 maxLength: 64 x-ms-parameter-location: method QueryApiVersion: name: api-version in: query description: The API version to use for this operation. required: true type: string minLength: 1 x-ms-parameter-location: method x-ms-client-name: apiVersion QuerySkip: name: skip in: query description: The number of result items to skip. required: false type: integer format: int32 default: 0 x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'