HTTP request methods and response codes
The FortiRecorder REST API uses standard HTTP/HTTPS request methods and response status codes, including errors.
URLs are case sensitive. Valid methods vary by URL and permissions.
| Request Method | Description |
|---|---|
GET
|
Retrieve all resources or a specific resource |
POST
|
Either:
|
PUT
|
Update an existing resource |
DELETE
|
Delete a resource |
| Response Status Code | Description |
|---|---|
200 OK
|
Success |
400 Bad Request
|
Bad request For example, a wrong API URL may have this JSON in the response body: {
"errorType": 3,
"errorMsg": "Failed to retrieve object "
}
|
403 Forbidden
|
Either:
For example, a failed login attempt may have this JSON in the response body: {
"errorType": 7,
"errorMsg": "Failed: Access denied:Add object (AdminLogin) ",
"reqAction": 2,
"totalRemoteCount": 0,
"collection": "[]"
}
|
404 Not Found
|
Resource does not exist |
|
|
Resource does not allow the HTTP request method that was used |
|
|
Internal error on FortiRecorder |
JSON formatting is used for all HTTP request and response bodies unless otherwise mentioned. JSON attributes vary by URL and by the data on your FortiRecorder unless otherwise mentioned.
|
|
If the HTTP method does not agree with the JSON attribute
|