Reputation: 6170
The preview version of batch search previously used the following URL and body:
https://atlas.microsoft.com/search/fuzzy/batch/json?subscription-key=[subscription_key]&api-version=1.0
{
"queries": [
"?query=One, Microsoft Way, Redmond, WA 98052&limit=1",
"?query=350 5th Ave, New York, NY 10118&limit=1",
"?query=400 Broad St, Seattle, WA 98109"
]
}
However as per an email from Azure the body has to be in a new format by the 29th March 2019:
{
"batchItems": [
{"query": "?query=One, Microsoft Way, Redmond, WA 98052&limit=1" },
{"query": "?query=350 5th Ave, New York, NY 10118&limit=1" },
{"query": "?query=400 Broad St, Seattle, WA 98109" }
]
}
(also, why aren't these proper JSON objects instead of raw strings?)
Calling the URL above with the old structure works. However calling it with the new structure results in a 400 Bad Request.
{
"error": {
"code": "400 BadRequest",
"message": "Request body is invalid or empty"
}
}
The documentation makes no reference to the breaking changes mentioned in the email.
What is the new structure of the body? Will there be any changes to the URL? When will the documentation be updated?
Upvotes: 0
Views: 339
Reputation: 91
The change will become effective on March 29th. We will also add the details from the email to our public documentation.
The Post Route Matrix API URL will change as follows:
Old URL format: /route/matrix/json?subscription-key=[your_key]&api-version=1.0&matrixRequestId=[matrixRequestID]
New URL format: /route/matrix/[matrixRequestID]?subscription-key=[your_key]&api-version=1.0
Upvotes: 1