This is the documentation for the 22.02 version. Looking for the documentation of the latest version? Have a look here.
RESTCONF API Errors¶
The RESTCONF service may not return a response body in all error cases, but it will return a proper HTTP response code. When using scripts to interact with the API, test the return code first before inspecting the response body.
curl to interact with the API, use
curl -f to exit with a
non-zero error when the server sends back an HTTP error code. The response body
is suppressed by
curl -f when it detects an error code, however,
will print the HTTP error code and text instead. On
curl version 7.76.0 and
curl --fail-with-body which will exit with a non-zero status,
print the HTTP error, and print the response body if one is present.
The following list includes common errors and their resolutions:
- Error code 404 / Not Found
Error returned by the HTTP server when the URL does not exist. For example, if the client intended to use the API but requested a URL that did not start with
- Error code 415 / Unsupported Media Type
Error returned by the HTTP server (
nginx) when the client did not submit a proper content type with a
- api-path keys do not match data keys
Error returned by the API when a client attempted a
PATCHoperation without fully qualifying the target. For example, the client tried to
PATCHbut the submitted data did not contain enough information to uniquely identify a target.
- Instance does not exist
Error returned by the API when a client requests an entry from a valid area but where a specific entry does not exist.
- Unknown element
Error returned by the API when a client requests data from an invalid container.
- ‘<name>’: Expected prefix:name
Error returned by the API when a RESTCONF URL does not include the namespace prefix.
- No such yang module prefix
Error returned by the API when the module name (e.g.
netgate:<something>) does not exist.