API Connect

 View Only
  • 1.  how to restrict specific content-types in API Connect

    Posted 11 days ago

    Hi All,

    here we are trying to restrict the API to allow request with content-type as "application/xml" and should reject all other request formats or content-type, we should set the status code as '415 Unsupported Media Type' when other than application/xml is received.

    how to achieve this without coding efforts, by default it is accepting all the request formats even when API have produces and consumes as "application/xml" and not generating 415 status code.

    Kindly help us to achieve this.



    ------------------------------
    Manasa G
    ------------------------------


  • 2.  RE: how to restrict specific content-types in API Connect

    Posted 10 days ago

    Produces and consumes in the openapi document are for documentation purposes - they don't have any functional impact.
    If you want to reject other content types you would need to do so in your API assembly.



    ------------------------------
    Chris Dudley
    ------------------------------