Java 如何通过postman调用RESTAPI在Azure中创建索引?

Java 如何通过postman调用RESTAPI在Azure中创建索引?,java,rest,azure,logic,Java,Rest,Azure,Logic,我正在创建一个应用程序,需要在其中调用与创建数据源相关的REST API,如下所述: 以下是我提出请求的方式: 我遇到以下错误: { "error": { "code": "", "message": "The request is invalid. Details: index : The property 'type' does not exist on type 'Microsoft.Azure.Search.V2016_09_01.IndexD

我正在创建一个应用程序,需要在其中调用与创建数据源相关的REST API,如下所述:

以下是我提出请求的方式:

我遇到以下错误:

{
    "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"
    }
}

我应该怎么做才能正确设置“类型”?

您发布到错误的URL请尝试以下操作

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

您正在尝试创建数据源或索引吗?您的请求正文用于创建数据源。另外,请停止在其他问题中标记我。如果您试图“创建数据源”,那么您的帖子将发送到错误的URL。https://[service name].search.windows.net/datasources?api版本=2016-09-01@GauravMantri好的,我不会在其他地方给你贴标签。谢谢,刚刚得到错误的解决方案。@JoshuaDuxbury,谢谢你的建议。