Layer7 API Management

 View Only
  • 1.  Request ID to UUID

    Posted Jun 10, 2019 11:09 AM

    Is there a way to change the requestID on the API gateway 9.4 to be in a UUID format?

    We would like to standardise our error messages to RFC7807 format (https://tools.ietf.org/html/rfc7807). We also send the requestID and uuid to syslog but the "generate UUID" is executed quite late during the request flow.
    If we could utilize the requestID but in a uuid format we could just use this instead. This will also allow us to use the same id when the gateway generates an error prior to routing. 

    Example error from backend. 

    {
    "type": "http://api.gateway.com/error/types/403",
    "status": 400,
    "title": "Bad Request",
    "detail": "More details about the error here",
    "instance": "urn:uuid:7673868d-231e-490d-9c4f-19288e7e668d"
    }

    We do a JSON Schema validation of the returned error. If the error complies we pass it on and accept the developer handled the error correctly else the gateway generates an error response on the gateway level.
    .....
    "instance": {
    "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
    "type": "string",
    "format": "uri"
    },
    ...



  • 2.  RE: Request ID to UUID
    Best Answer

    Broadcom Employee
    Posted Jul 18, 2019 01:36 PM
    Unfortunately I do not think this is possible. If it is, we don't have documentation for it since it would not be a tested change, so this would all be "at your own risk". Hopefully if other customers have been able to make such a change in their environment then they will be able to offer their input here for you too.