List Data Sources (Azure Search Service REST API)

The List Data Sources operation returns a list of the data sources in your Azure Search service.

GET https://[service name].search.windows.net/datasources?api-version=[api-version]  
    api-key: [admin key]  

The api-version is required. The current version is 2019-05-06. See API versions in Azure Search for details.

The api-key must be an admin key (as opposed to a query key). Refer to the authentication section in Azure Search Service REST to learn more about keys. Create an Azure Search service in the portal explains how to get the service URL and key properties used in the request.

Response

For a successful request: 200 OK. Here is an example response body:

    {  
      "value" : [  
        {  
          "name": "datasource1",  
          "type": "azuresql",  
          ... other data source properties  
        }]  
    }  

Note that you can filter the response down to just the properties you're interested in. For example, if you want only a list of data source names, use the OData select query option:

GET /datasources?api-version=2019-05-06&$select=name  

In this case, the response from the above example would appear as follows:

    {  
      "value" : [ { "name": "datasource1" }, ... ]  
    }  

See also

Azure Search Service REST
HTTP status codes (Azure Search)
Indexer operations (Azure Search Service REST API)
Naming rules (Azure Search)
OData Expression Syntax for Azure Search
Support for OData (Azure Search)