New with this release is the response body for all GET requests on the /{tenant}/{client}/indexes/{type}/{name} and /{tenant}/{client}/indexes/{type} endpoints.
The new format of the response body helps meet the highest standards of consistency between different types of requests, as shown in this example:

{
  "keys" : {
    "some_field" : "1",
    "another_field" : "-1"
  },

  "options" : {
    "unique" : true,
    "name" : "myIndex"
  }
}

Response body format changes

These changes appear in the new response body format:

  • The keys keyword is now added to meet the convention required for POST requests. This new keyword will completely replace the key keyword in next three months.
  • Unnecessary attributes, such as v, background, and ns are removed.
  • The values for the options parameter are included in the subdocument in exactly the same way they are required for write requests.

Do I have any time to adjust?

Because some implementations still expect the previous version of the response body format, response bodies will contain both formats for the next three months. This is to ensure backward compatibility and allow you to check and adjust before old deprecated format is removed from the response body.
The format that includes the old and new versions of the response body looks like the example shown:

{
  "keys" : {
    "some_field" : "1",
    "another_field" : "-1"
  },

  "options" : {
    "unique" : true,
    "name" : "myIndex"
  },
  "unique" : true,
  "name" : "myIndex",
  "key" : {
    "some_field" : "1",
    "another_field" : "-1"
  }
}
Please note that deprecated fields: key and options on the document level will be completely removed after March 22nd, 2017.
  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.