I'm designing a REST API. I'd like to provide to API caller optional debugging information in responses (e.g. execution times of some activities and internal details).
Let me give you an example of response:
{
"result": "XYZ",
"details": [{
"step": "FIRST_STEP",
"executionTime": "12 ms"
}, {
"step": "SECONT_STEP",
"executionTime": "12 ms"
}, ...
]
}
Given that I want that the API caller explicitly asks for debugging information, I'm thinking that it may add an additional query parameter like debug=true to the call. BUT I don't know if there are common conventions. If you know some API guidelines and/or best practices that solve my doubt, any suggestion will be appreciated.