{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Client that can be used to manage Azure Search services and API keys.",
    "title": "SearchManagementClient",
    "version": "2015-02-28",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/search/resource-manager/Microsoft.Search/stable/2015-02-28/search.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "search",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json",
    "text/json"
  ],
  "produces": [
    "application/json",
    "text/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices": {
      "get": {
        "description": "Returns a list of all Search services in the given resource group.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn832688.aspx"
        },
        "operationId": "Services_List",
        "parameters": [
          {
            "description": "The name of the resource group within the current subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/SearchServiceListResult"
            }
          }
        },
        "tags": [
          "Services"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}": {
      "delete": {
        "description": "Deletes a Search service in the given resource group, along with its associated resources.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn832692.aspx"
        },
        "operationId": "Services_Delete",
        "parameters": [
          {
            "description": "The name of the resource group within the current subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Search service to delete.",
            "in": "path",
            "name": "serviceName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": ""
          },
          "204": {
            "description": ""
          },
          "404": {
            "description": ""
          }
        },
        "tags": [
          "Services"
        ]
      },
      "put": {
        "description": "Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn832687.aspx"
        },
        "operationId": "Services_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group within the current subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Search service to create or update.",
            "in": "path",
            "name": "serviceName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The properties to set or update on the Search service.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SearchServiceCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/SearchServiceResource"
            }
          },
          "201": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/SearchServiceResource"
            }
          }
        },
        "tags": [
          "Services"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listAdminKeys": {
      "post": {
        "description": "Returns the primary and secondary API keys for the given Azure Search service.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn832685.aspx"
        },
        "operationId": "AdminKeys_List",
        "parameters": [
          {
            "description": "The name of the resource group within the current subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Search service for which to list admin keys.",
            "in": "path",
            "name": "serviceName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/AdminKeyResult"
            }
          }
        },
        "tags": [
          "AdminKeys"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listQueryKeys": {
      "get": {
        "description": "Returns the list of query API keys for the given Azure Search service.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/library/azure/dn832701.aspx"
        },
        "operationId": "QueryKeys_List",
        "parameters": [
          {
            "description": "The name of the resource group within the current subscription.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the Search service for which to list query keys.",
            "in": "path",
            "name": "serviceName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/ListQueryKeysResult"
            }
          }
        },
        "tags": [
          "QueryKeys"
        ]
      }
    }
  },
  "definitions": {
    "AdminKeyResult": {
      "description": "Response containing the primary and secondary API keys for a given Azure Search service.",
      "properties": {
        "primaryKey": {
          "description": "The primary API key of the Search service.",
          "readOnly": true,
          "type": "string"
        },
        "secondaryKey": {
          "description": "The secondary API key of the Search service.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "ListQueryKeysResult": {
      "description": "Response containing the query API keys for a given Azure Search service.",
      "properties": {
        "value": {
          "description": "The query keys for the Azure Search service.",
          "items": {
            "$ref": "#/definitions/QueryKey"
          },
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "QueryKey": {
      "description": "Describes an API key for a given Azure Search service that has permissions for query operations only.",
      "properties": {
        "key": {
          "description": "The value of the query API key.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "The name of the query API key; may be empty.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "Resource": {
      "properties": {
        "id": {
          "description": "Resource Id",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "Resource location",
          "type": "string"
        },
        "name": {
          "description": "Resource name",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags",
          "type": "object"
        },
        "type": {
          "description": "Resource type",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "location"
      ],
      "x-ms-external": true
    },
    "SearchServiceCreateOrUpdateParameters": {
      "description": "Properties that describe an Azure Search service.",
      "properties": {
        "location": {
          "description": "The geographic location of the Search service.",
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/SearchServiceProperties",
          "description": "Properties of the Search service."
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags to help categorize the Search service in the Azure Portal.",
          "type": "object"
        }
      }
    },
    "SearchServiceListResult": {
      "description": "Response containing a list of Azure Search services for a given resource group.",
      "properties": {
        "value": {
          "description": "The Search services in the resource group.",
          "items": {
            "$ref": "#/definitions/SearchServiceResource"
          },
          "readOnly": true,
          "type": "array"
        }
      }
    },
    "SearchServiceProperties": {
      "description": "Defines properties of an Azure Search service that can be modified.",
      "properties": {
        "partitionCount": {
          "description": "The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12.",
          "format": "int32",
          "type": "integer"
        },
        "replicaCount": {
          "description": "The number of replicas in the Search service. If specified, it must be a value between 1 and 6 inclusive.",
          "format": "int32",
          "type": "integer"
        },
        "sku": {
          "$ref": "#/definitions/Sku",
          "description": "The SKU of the Search Service, which determines price tier and capacity limits."
        }
      }
    },
    "SearchServiceReadableProperties": {
      "description": "Defines all the properties of an Azure Search service.",
      "properties": {
        "partitionCount": {
          "description": "The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12.",
          "format": "int32",
          "type": "integer"
        },
        "provisioningState": {
          "description": "The state of the last provisioning operation performed on the Search service.",
          "enum": [
            "succeeded",
            "provisioning",
            "failed"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "name": "ProvisioningState"
          }
        },
        "replicaCount": {
          "description": "The number of replicas in the Search service. If specified, it must be a value between 1 and 6 inclusive.",
          "format": "int32",
          "type": "integer"
        },
        "sku": {
          "$ref": "#/definitions/Sku",
          "description": "The SKU of the Search Service, which determines price tier and capacity limits."
        },
        "status": {
          "description": "The status of the Search service.",
          "enum": [
            "running",
            "provisioning",
            "deleting",
            "degraded",
            "disabled",
            "error"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "name": "SearchServiceStatus"
          }
        },
        "statusDetails": {
          "description": "The details of the Search service status.",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "SearchServiceResource": {
      "description": "Describes an Azure Search service and its current state.",
      "properties": {
        "id": {
          "description": "The resource Id of the Azure Search service.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The geographic location of the Search service.",
          "type": "string"
        },
        "name": {
          "description": "The name of the Search service.",
          "externalDocs": {
            "url": "https://msdn.microsoft.com/library/azure/dn857353.aspx"
          },
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/SearchServiceReadableProperties",
          "description": "Properties of the Search service.",
          "readOnly": true
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags to help categorize the Search service in the Azure Portal.",
          "type": "object"
        }
      }
    },
    "Sku": {
      "description": "Defines the SKU of an Azure Search Service, which determines price tier and capacity limits.",
      "properties": {
        "name": {
          "description": "The SKU of the Search service.",
          "enum": [
            "free",
            "standard",
            "standard2"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "SkuType"
          }
        }
      }
    },
    "SubResource": {
      "properties": {
        "id": {
          "description": "Resource Id",
          "type": "string"
        }
      },
      "x-ms-external": true
    }
  }
}