openapi: 3.2.0 info: title: Microsoft Azure SearchManagementClient Admin Keys API description: Client that can be used to manage Azure Cognitive Search services and API keys. version: 2021-04-01-preview servers: - url: https://management.azure.com security: - azure_auth: - user_impersonation tags: - name: Admin Keys paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys : post: tags: - Admin Keys operationId: microsoftAzureAdminkeysGet x-ms-examples: SearchGetAdminKeys: $ref: ./examples/SearchGetAdminKeys.json description: Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. externalDocs: url: https://aka.ms/search-manage parameters: - $ref: '#/components/parameters/ResourceGroupNameParameter' - $ref: '#/components/parameters/SearchServiceNameParameter' - $ref: '#/components/parameters/ClientRequestIdParameter' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/SubscriptionIdParameter' responses: '200': description: The admin keys were successfully retrieved and are in the response. You can use either the primary or secondary key as the value of the 'api-key' parameter in the Azure Cognitive Search Service REST API or SDK to perform any operations on your search service, including privileged operations. Privileged operations include managing resources like indexes and data sources as well as uploading, modifying, or deleting data in your indexes. content: application/json: schema: $ref: '#/components/schemas/AdminKeyResult' default: description: 'HTTP 404 (Not Found): The subscription, resource group, or search service could not be found. HTTP 409 (Conflict): The specified subscription is disabled.' content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind} : post: tags: - Admin Keys operationId: microsoftAzureAdminkeysRegenerate x-ms-examples: SearchRegenerateAdminKey: $ref: ./examples/SearchRegenerateAdminKey.json description: Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. externalDocs: url: https://aka.ms/search-manage parameters: - $ref: '#/components/parameters/ResourceGroupNameParameter' - $ref: '#/components/parameters/SearchServiceNameParameter' - name: keyKind in: path required: true x-ms-enum: name: AdminKeyKind modelAsString: false values: - value: primary name: Primary description: The primary API key for the search service. - value: secondary name: Secondary description: The secondary API key for the search service. description: Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. schema: type: string enum: - primary - secondary - $ref: '#/components/parameters/ClientRequestIdParameter' - $ref: '#/components/parameters/ApiVersionParameter' - $ref: '#/components/parameters/SubscriptionIdParameter' responses: '200': description: The specified admin key was successfully regenerated. Both admin keys are included in the response, including the newly-regenerated key. content: application/json: schema: $ref: '#/components/schemas/AdminKeyResult' default: description: 'HTTP 404 (Not Found): The subscription, resource group, or search service could not be found. HTTP 409 (Conflict): The specified subscription is disabled.' content: application/json: schema: $ref: '#/components/schemas/CloudError' summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… components: parameters: ApiVersionParameter: name: api-version in: query required: true description: The API version to use for each request. schema: type: string ClientRequestIdParameter: name: x-ms-client-request-id x-ms-client-name: clientRequestId in: header required: false description: A client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request. x-ms-client-request-id: true x-ms-parameter-grouping: name: search-management-request-options x-ms-parameter-location: method schema: type: string format: uuid SearchServiceNameParameter: name: searchServiceName in: path required: true description: The name of the Azure Cognitive Search service associated with the specified resource group. x-ms-parameter-location: method schema: type: string ResourceGroupNameParameter: name: resourceGroupName in: path required: true description: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. x-ms-parameter-location: method schema: type: string SubscriptionIdParameter: name: subscriptionId in: path required: true description: The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. schema: type: string schemas: CloudError: type: object properties: error: $ref: '#/components/schemas/CloudErrorBody' description: Describes a particular API error with an error code and a message. message: type: string description: A brief description of the error that hints at what went wrong (for details/debugging information refer to the 'error.message' property). description: Contains information about an API error. x-ms-external: true CloudErrorBody: type: object description: Describes a particular API error with an error code and a message. properties: code: type: string description: An error code that describes the error condition more precisely than an HTTP status code. Can be used to programmatically handle specific error cases. message: type: string description: A message that describes the error in detail and provides debugging information. target: type: string description: The target of the particular error (for example, the name of the property in error). details: type: array items: $ref: '#/components/schemas/CloudErrorBody' description: Contains nested errors that are related to this error. x-ms-external: true AdminKeyResult: properties: primaryKey: readOnly: true type: string description: The primary admin API key of the search service. secondaryKey: readOnly: true type: string description: The secondary admin API key of the search service. description: Response containing the primary and secondary admin API keys for a given Azure Cognitive Search service. securitySchemes: azure_auth: type: oauth2 flows: implicit: scopes: user_impersonation: impersonate your user account authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: Azure Active Directory OAuth2 Flow