How can I troubleshoot API call errors?
All versions of xMatters
To effectively troubleshoot API call errors, you need to capture the response payload. For example, a 400 HTTP response code means that you had a bad request, which likely means your payload had some issues (malformed data, unsupported characters, bad JSON format, etc.). However, to fully understand why the API returned the error code, you need to capture the payload sent, as well as the full response payload.
In the example below, you can see the data that was sent in and what was returned. The response states what type of error it is, and provides a specific message and details. In this case, the value for the "test" property that we sent had too many characters, based on how the property is defined in that workflow.
"test": "Testing 1.. 2.. 3.."
"targetName": "testuser1|Work Email"
"message": "There are data validation errors in the form.",
"details": "Exceeded the specified maximum number of characters"
If you need further assistance with troubleshooting API requests, please contact our support team.