Microsoft Azure Cognitive Services Management Client

Microsoft Azure Cognitive Services Management Client is a powerful tool that allows users to easily manage and monitor their cognitive services resources on the Azure platform. With this client, users can create, delete, update, and view details of their cognitive services resources like Vision, Speech, Language, and Search. Users can also access usage and billing information, set up alerts for resource limits, and configure authentication and authorization settings for their cognitive services.

OpenAPI Specification

cognitiveservicesmanagementclient-openapi-original.yml Raw ↑
swagger: '2.0'
info:
  title: Microsoft Azure CognitiveServicesManagementClient
  description: Cognitive Services Management Client
  version: 2016-02-01-preview
host: management.azure.com
schemes:
  - https
consumes:
  - application/json
  - text/json
produces:
  - application/json
  - text/json
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}
  : put:
      tags:
        - CognitiveServicesAccounts
      description: >-
        Create Cognitive Services Account. Accounts is a resource group wide
        resource type. It holds the keys for developer to access intelligent
        APIs. It's also the resource type for billing.
      operationId: microsoftAzureCognitiveservicesaccountsCreate
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - name: parameters
          in: body
          required: true
          schema:
            $ref: '#/definitions/CognitiveServicesAccountCreateParameters'
          description: The parameters to provide for the created account.
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: >-
            If resource is created successfully or already existed, the service
            should return 200 (OK).
          schema:
            $ref: '#/definitions/CognitiveServicesAccount'
        '201':
          description: >-
            If resource is created successfully, the service should return 201
            (OK).
          schema:
            $ref: '#/definitions/CognitiveServicesAccount'
        default:
          description: Error response describing why the operation failed
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname
    patch:
      tags:
        - CognitiveServicesAccounts
      description: Updates a Cognitive Services account
      operationId: microsoftAzureCognitiveservicesaccountsUpdate
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - name: body
          in: body
          required: true
          x-ms-client-flatten: true
          schema:
            $ref: '#/definitions/CognitiveServicesAccountUpdateParameters'
          description: The parameters to provide for the created account.
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: >-
            The resource provider should return 200 (OK) to indicate that the
            operation completed successfully. 
          schema:
            $ref: '#/definitions/CognitiveServicesAccount'
        default:
          description: >-
            Error response describing why the operation failed. If the resource
            group *or* resource does not exist, 404 (NotFound) should be
            returned.
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname
    delete:
      tags:
        - CognitiveServicesAccounts
      description: 'Deletes a Cognitive Services account from the resource group. '
      operationId: microsoftAzureCognitiveservicesaccountsDelete
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: >-
            A 200 (OK) should be returned if the object exists and was deleted
            successfully;
        '204':
          description: >-
            a 204 (NoContent) should be used if the resource does not exist and
            the request is well formed.
        default:
          description: Error response describing why the operation failed
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname
    get:
      tags:
        - CognitiveServicesAccounts
      description: Returns a Cognitive Services account specified by the parameters.
      operationId: microsoftAzureCognitiveservicesaccountsGetproperties
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: "The resource provider should return 200 (OK) to indicate that the operation completed successfully.\nFor a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section. The only GET specific properties are \"name,\" \"type\" and \"id.\"\nField\tDescription\nKind\trequired.  String.\n\tThe API set for this API account. It can be \n\t· a single API, for example: Face API, Vision API, Speech API. \n\ta bundle of APIs:  Face + Speech, Vision + Emotion, etc.\nsku.name\tRequired.\n\tThe pricing tier/plan of this API. Could be: \n\tF0 - Free\n\tB0 - Basic\n\tS0 - Standard\n\tP0 - Premium\n"
          schema:
            $ref: '#/definitions/CognitiveServicesAccount'
          examples:
            application/json: "{\n  \"id\": \"/subscriptions/{id}/resourceGroups/{group}/providers/{rpns}/{type}/{name}\",\n  \"name\": \"{name}\",\n  \"type\": \"Microsoft.CognitiveServices/accounts\",\n  \"location\": \"North US\",\n  \"tags\": {\n    \"key1\": \"value 1\",\n    \"key2\": \"value 2\"\n   },\n  \"kind\" : \"resource kind\",\n   \"sku\": {\n\t    \"name\": \"sku code\"\n\t} \n  \"etag\": \"00000000-0000-0000-0000-000000000000\",\n  \"properties\": { }\n}"
        default:
          description: >-
            Error response describing why the operation failed. If the resource
            does not exist, 404 (NotFound) should be returned.
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts:
    get:
      tags:
        - CognitiveServicesAccounts
      description: >-
        Returns all the resources of a particular type belonging to a resource
        group
      operationId: microsoftAzureCognitiveservicesaccountsListbyresourcegroup
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - $ref: '#/parameters/subscriptionIdParameter'
        - $ref: '#/parameters/apiVersionParameter'
      responses:
        '200':
          description: >-
            The resource provider should return 200 (OK) to indicate that the
            operation completed successfully. For other errors (e.g. internal
            errors) use the appropriate HTTP error code.

            The nextLink field is expected to point to the URL the client should
            use to fetch the next page (per server side paging). This matches
            the OData guidelines for paged responses here. If a resource
            provider does not support paging, it should return the same body
            (JSON object with "value" property) but omit nextLink entirely (or
            set to null, *not* empty string) for future compatibility.

            The nextLink should be implemented using following query parameters:

            · skipToken: opaque token that allows the resource provider to skip
            resources already enumerated. This value is defined and returned by
            the RP after first request via nextLink.

            · top: the optional client query parameter which defines the maximum
            number of records to be returned by the server.

            Implementation details:

            · NextLink may include all the query parameters (specifically OData
            $filter) used by the client in the first query. 

            · Server may return less records than requested with nextLink.
            Returning zero records with NextLink is an acceptable response. 

            Clients must fetch records until the nextLink is not returned back /
            null. Clients should never rely on number of returned records to
            determinate if pagination is completed.
          schema:
            $ref: '#/definitions/CognitiveServicesAccountListResult'
          examples:
            application/json: "{\n  \"value\": [\n    {\n        \"id\": \"{url to resource 1}\",\n        \"name\": \"Name1\",\n        \"type\": \"Microsoft.CognitiveServices/accounts\",\n        \"location\": \"North US\"    \n        \"kind\" : \"resource kind\",\n        \"sku\": {\n\t        \"name\": \"sku code\"\n\t  }, \n        \"etag\": \"00000000-0000-0000-0000-000000000000\",\n        \"properties\": { }\n    },\n    {\n        \"id\": \"{url to resource 2}\",\n        \"name\": \"Name2\",\n        \"type\": \"Microsoft.CognitiveServices/accounts\",\n        \"location\": \"North US\",\n        \"kind\" : \"resource kind\",\n        \"sku\": {\n\t        \"name\": \"sku code\"\n\t  }, \n        \"etag\": \"00000000-0000-0000-0000-000000000000\",\n        \"properties\": { }\n    }\n  ],\n  \"nextLink\": \"{originalRequestUrl}?$skipToken={opaqueString}\"\n}"
        default:
          description: >-
            Error response describing why the operation failed. If the resource
            group does not exist, 404 (NotFound) will be returned.
          schema:
            $ref: '#/definitions/Error'
      x-ms-pageable:
        nextLinkName:
      summary: >-
        Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts
  /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts:
    get:
      tags:
        - CognitiveServicesAccounts
      description: >-
        Returns all the resources of a particular type belonging to a
        subscription.
      operationId: microsoftAzureCognitiveservicesaccountsList
      parameters:
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: >-
            The resource provider should return 200 (OK) to indicate that the
            operation completed successfully. For other errors (e.g. internal
            errors) use the appropriate HTTP error code.

            The nextLink field is expected to point to the URL the client should
            use to fetch the next page (per server side paging). This matches
            the OData guidelines for paged responses. If a resource provider
            does not support paging, it should return the same body but leave
            nextLink empty for future compatibility.

            For a detailed explanation of each field in the response body,
            please refer to the request body description in the PUT resource
            section. 
          schema:
            $ref: '#/definitions/CognitiveServicesAccountListResult'
          examples:
            application/json: |
              {
                "value": [
                  {
                      "id": "{url to resource 1}",
                      "name": "Name1",
                      "type": "Microsoft.CognitiveServices/accounts",
                      "location": "North US"    
                      "kind" : "resource kind",
                          "sku": {
                          "name": "sku code"
                      }, 
                     "etag": "00000000-0000-0000-0000-000000000000",
                      "properties": { }
                  },
                  {
                      "id": "{url to resource 2}",
                      "name": "Name2",
                      "type": "Microsoft.CognitiveServices/accounts",
                      "location": "North US",
                      "kind" : "resource kind",
                          "sku": {
                          "name": "sku code"
                      }, 
                     "etag": "00000000-0000-0000-0000-000000000000",
                      "properties": { }
                  }
                ],
                "nextLink": "{originalRequestUrl}?$skipToken={opaqueString}"
              }
        default:
          description: Error response describing why the operation failed
          schema:
            $ref: '#/definitions/Error'
      x-ms-pageable:
        nextLinkName:
      summary: >-
        Microsoft Azure Get Subscriptions Subscriptionid Providers Microsoft Cognitiveservices Accounts
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys
  : post:
      tags:
        - CognitiveServicesAccounts
      operationId: microsoftAzureCognitiveservicesaccountsListkeys
      description: Lists the account keys for the specified Cognitive Services account.
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.  
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: >-
            Returns with a response body containing the subscription keys for
            the resource: key1

            The first API key for authentication when client calls the API
            endpoint.


            key2

            The second API key for authentication when client calls the API
            endpoint.
          schema:
            $ref: '#/definitions/CognitiveServicesAccountKeys'
          examples:
            application/json:
              key1: xxxx
              key2: xxxxx
        default:
          description: Error response describing why the operation failed
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname Listkeys
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey
  : post:
      tags:
        - CognitiveServicesAccounts
      operationId: microsoftAzureCognitiveservicesaccountsRegeneratekey
      description: >-
        Regenerates the specified account key for the specified Cognitive
        Services account.
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.  
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - name: body
          in: body
          required: true
          x-ms-client-flatten: true
          schema:
            $ref: '#/definitions/RegenerateKeyParameters'
          description: regenerate key parameters.
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CognitiveServicesAccountKeys'
        default:
          description: Error response describing why the operation failed
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname Regeneratekey
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus
  : get:
      tags:
        - CognitiveServicesAccounts
      description: List available SKUs for the requested Cognitive Services account
      operationId: microsoftAzureCognitiveservicesaccountsListskus
      parameters:
        - name: resourceGroupName
          in: path
          required: true
          type: string
          description: The name of the resource group within the user's subscription.
        - name: accountName
          in: path
          required: true
          type: string
          description: >-
            The name of the cognitive services account within the specified
            resource group. Cognitive Services account names must be between 3
            and 24 characters in length and use numbers and lower-case letters
            only.  
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
        - $ref: '#/parameters/apiVersionParameter'
        - $ref: '#/parameters/subscriptionIdParameter'
      responses:
        '200':
          description: "The resource provider should return 200 (OK) to indicate that the operation completed successfully.\nFor a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section. The only GET specific properties are \"name,\" \"type\" and \"id.\"\nField\tDescription\nsku\tRequired, object\n\tThe exact set of keys that define this sku. This matches the fields on the respective resource.\nsku.name\tRequired, string\n\tThe name of the SKU. This is typically a letter + number code, such as A0 or P3\nsku.tier\tRequired, string\n\tThe tier of this particular SKU. Typically one of:\n\t· Free\n\t· Basic\n\t· Standard\n\t· Premium\n"
          schema:
            $ref: '#/definitions/CognitiveServicesAccountEnumerateSkusResult'
          examples:
            application/json: |-
              {
                  "value": [
                      {
                          "resourceType": "Microsoft.CognitiveServices/accounts"
                          "sku": {
                              "name": "sku name",
                              "tier": "sku tier"
                          }
                      },
                      {
                          "resourceType": "Microsoft.CognitiveServices/accounts"
                          "sku": {
                              "name": "sku name",
                              "tier": "sku tier"
                          }
                      }
                  ]
              }
        default:
          description: >-
            Error response describing why the operation failed. If the resource
            does not exist, 404 (NotFound) will be returned.
          schema:
            $ref: '#/definitions/Error'
      summary: >-
        Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Cognitiveservices Accounts Accountname Skus
definitions:
  CognitiveServicesAccountCreateParameters:
    properties:
      sku:
        $ref: '#/definitions/Sku'
      kind:
        type: string
        description: Required. Indicates the type of cognitive service account.
        enum:
          - Academic
          - Bing.Autosuggest
          - Bing.Search
          - Bing.Speech
          - Bing.SpellCheck
          - ComputerVision
          - ContentModerator
          - Emotion
          - Face
          - LUIS
          - Recommendations
          - SpeakerRecognition
          - Speech
          - SpeechTranslation
          - TextAnalytics
          - TextTranslation
          - WebLM
        x-ms-enum:
          name: Kind
          modelAsString: true
      location:
        type: string
        description: >-
          Required. Gets or sets the location of the resource. This will be one
          of the supported and registered Azure Geo Regions (e.g. West US, East
          US, Southeast Asia, etc.). The geo region of a resource cannot be
          changed once it is created, but if an identical geo region is
          specified on update the request will succeed.
      tags:
        type: object
        additionalProperties:
          type: string
        description: >-
          Gets or sets a list of key value pairs that describe the resource.
          These tags can be used in viewing and grouping this resource (across
          resource groups). A maximum of 15 tags can be provided for a resource.
          Each tag must have a key no greater than 128 characters and value no
          greater than 256 characters.
      properties:
        x-ms-client-flatten: true
        $ref: '#/definitions/CognitiveServicesAccountPropertiesCreateParameters'
        description: Must exist in the request. Must not be null.
    required:
      - sku
      - kind
      - location
      - properties
    description: The parameters to provide for the account.
  CognitiveServicesAccountUpdateParameters:
    properties:
      sku:
        $ref: '#/definitions/Sku'
      tags:
        type: object
        additionalProperties:
          type: string
        description: >-
          Gets or sets a list of key value pairs that describe the resource.
          These tags can be used in viewing and grouping this resource (across
          resource groups). A maximum of 15 tags can be provided for a resource.
          Each tag must have a key no greater than 128 characters and value no
          greater than 256 characters.
    description: The parameters to provide for the account.
  Sku:
    properties:
      name:
        type: string
        description: >-
          Gets or sets the sku name. Required for account creation, optional for
          update.
        enum:
          - F0
          - P0
          - P1
          - P2
          - S0
          - S1
          - S2
          - S3
          - S4
          - S5
          - S6
        x-ms-enum:
          name: SkuName
          modelAsString: true
      tier:
        readOnly: true
        type: string
        description: Gets the sku tier. This is based on the SKU name.
        enum:
          - Free
          - Standard
          - Premium
        x-ms-enum:
          name: SkuTier
          modelAsString: false
    required:
      - name
    description: The SKU of the cognitive services account.
  CognitiveServicesAccountPropertiesCreateParameters:
    description: >-
      required empty properties object. Must be an empty object, and must exist
      in the request.
  CognitiveServicesAccount:
    description: >-
      Cognitive Services Account is an Azure resource representing the
      provisioned account, its type, location and SKU.
    type: object
    properties:
      etag:
        type: string
        description: Entity Tag
      id:
        type: string
        description: The id of the created account
      kind:
        type: string
        description: Type of cognitive service account.
      location:
        type: string
        description: The location of the resource
      name:
        type: string
        description: The name of the created account
      properties:
        x-ms-client-flatten: true
        $ref: '#/definitions/CognitiveServicesAccountProperties'
      sku:
        $ref: '#/definitions/Sku'
      tags:
        type: object
        additionalProperties:
          type: string
        description: >-
          Gets or sets a list of key value pairs that describe the resource.
          These tags can be used in viewing and grouping this resource (across
          resource groups). A maximum of 15 tags can be provided for a resource.
          Each tag must have a key no greater than 128 characters and value no
          greater than 256 characters.
      type:
        type: string
        description: Resource type
    x-ms-azure-resource: true
  CognitiveServicesAccountListResult:
    properties:
      value:
        readOnly: true
        type: array
        items:
          $ref: '#/definitions/CognitiveServicesAccount'
        description: Gets the list of Cognitive Services accounts and their properties.
    description: The list of cognitive services accounts operation response.
  CognitiveServicesAccountProperties:
    properties:
      provisioningState:
        readOnly: true
        type: string
        description: >-
          Gets the status of the cognitive services account at the time the
          operation was called.
        enum:
          - Creating
          - ResolvingDNS
          - Succeeded
          - Failed
        x-ms-enum:
          name: ProvisioningState
          modelAsString: false
      endpoint:
        type: string
        description: Endpoint of the created account
  CognitiveServicesAccountKeys:
    properties:
      key1:
        type: string
        description: Gets the value of key 1.
      key2:
        type: string
        description: Gets the value of key 2.
    description: The access keys for the cognitive services account.
  RegenerateKeyParameters:
    properties:
      keyName:
        type: string
        description: key name to generate (Key1|Key2)
        enum:
          - Key1
          - Key2
        x-ms-enum:
          name: KeyName
          modelAsString: false
    description: Regenerate key parameters.
  CognitiveServicesAccountEnumerateSkusResult:
    properties:
      value:
        readOnly: true
        type: array
        items:
          $ref: '#/definitions/CognitiveServicesResourceAndSku'
        description: Gets the list of Cognitive Services accounts and their properties.
    description: The list of cognitive services accounts operation response.
  CognitiveServicesResourceAndSku:
    properties:
      resourceType:
        type: string
        description: Resource Namespace and Type
      sku:
        $ref: '#/definitions/Sku'
  Error:
    properties:
      error:
        $ref: '#/definitions/ErrorBody'
  ErrorBody:
    properties:
      code:
        type: string
        description: error code
      message:
        type: string
        description: error message
    required:
      - code
      - message
parameters:
  subscriptionIdParameter:
    name: subscriptionId
    in: path
    description: Azure Subscription ID.
    required: true
    type: string
  apiVersionParameter:
    name: api-version
    in: query
    required: true
    type: string
    description: >-
      Version of the API to be used with the client request. Current version is
      2016-02-01-preview
tags:
  - name: CognitiveServicesAccounts