Not allowed query parameter recurrence

Status

400

Meaning

The API responds with ‘Not allowed query parameter recurrence’ if you’ve executed a GET request against the route …

  • /hybrid-core/v1/sites
  • /hybrid-core/v1/sites/:site_id/assets

with any query parameters recurring, which aren’t designed to occur twice.

Finally, you get that response, if the frequency of occurrence of the query parameter(s) you’ve used to request respective routes isn’t defined for that route. With regard to both GET endpoints listed above, pagination and sort query parameters aren’t allowed to reoccur in your request’s query. Subject to context at an API’s GET endpoint also occurence of one or the other filter query parameters may be restricted, but for now at the Hybrid Core API it isn’t the case at any GET endpoint.

Semantically the response status code is equivalent to the HTTP 400 Bad Request response status code. It indicates that the server can’t process your request as well as that a part of the request you’ve send doesn’t fit the defined format in any manner.

On the one hand the 400 error is an error which is interpreted as a server-side problem. On the other hand, from the technical view the error belongs to a client-side issue, because at the moment when the request is fired by the client he should be aware about the frequency of occurrence of the query parameters he is using for GET request against given route. This is the reason why this type of error is categorized within the scope of client-side (4xx) responses.

Request

GET https://api.gridscale.io/hybrid-core/v1/sites/xx01/assets?sort[id]=-&sort[memory_usage]=-&sort[id]=+

Response

Header:

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
...

Body:

{
  "errors": [
    {
      "type": "https://my.gridscale.io/docs/apis/problems/hybrid-core/v1/not-allowed-query-parameter-recurrence",
      "title": "Not allowed query parameter recurrence",
      "status": 400,
      "detail": "Request query parameter 'sort[id]' isn't designed to occur twice."
      "DocURL": "https://my.gridscale.io/docs/apis/hybrid-core/v1/introduction",
    }
  ]
}
Top