How to call REST API through postman to create ind

2020-04-28 07:07发布

问题:

I am creating an application where I need to call REST API related to create data source as mentioned here: https://docs.microsoft.com/en-us/azure/search/search-howto-indexing-azure-blob-storage

Here is how I am making my request :

I am getting following error :

{
    "error": {
        "code": "",
        "message": "The request is invalid. Details: index : The property 'type' does not exist on type 'Microsoft.Azure.Search.V2016_09_01.IndexDefinition'. Make sure to only use property names that are defined by the type.\r\n"
    }
}

What should I do so that 'type' can be set correctly?

回答1:

You're posting to the wrong URL try the following

https://[service name].search.windows.net/datasources?api-version=2016-09-01