Layer7 API Management

  • 1.  Default case management in WS: What http status code?

    Broadcom Employee
    Posted Aug 22, 2016 07:59 AM

    Dear community,

     

    Today I need your feedback about a RESTful service design question I have.

    I focus here on the locale management.

     

    Here is my generic locale management implemented in my services :

    • lang provided in query parameter
    • fallback on « Accept-Language»  header
    • If header is not provided, left empty or ressource does not exist for this locale: we apply a default existing locale.

     

    In bold the subject of my question. Functionally, we want to manage a default case. At the API level, I do not see what http code is closest to this scenario ... Nothing that fit into the family of 20X http codes, maybe a 303 ...

    I'm annoyed with 200 http code because when a client specifies that it wants the resource in a given language, I respond to him in another locale ...

    Looking forward for your expert feedbacks



  • 2.  Re: Default case management in WS: What http status code?

    Broadcom Employee
    Posted Sep 04, 2016 12:00 AM

    Nicolas,

     

    Good evening. Does the language header get past to the back end and the response is from there or is the expectation to control language of the response from the Gateway? If it is the latter of the 2 then the Gateway does not respect the language header and only responds with English. If this is the scenario you are looking for then please post an Idea to our community with all the required outcome of this use case.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: Default case management in WS: What http status code?

    Broadcom Employee
    Posted Sep 04, 2016 10:09 PM

    Not sure if I understand your question properly, but you may find some discussions here,

    php - HTTP Status code for language redirect - Stack Overflow 

     

    As it mentioned, it seems Google uses 302



  • 4.  Re: Default case management in WS: What http status code?

    Broadcom Employee
    Posted Sep 16, 2016 11:49 AM

    Nicolas,

     

    Did either of the responses address your question?

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support