Fortinet white logo
Fortinet white logo

HTTP request methods and response codes

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.

HTTP request methods
Request Method Description
GET Retrieve all resources or a specific resource
POST

Either:

  • Create a new resource

  • Perform an action

PUT Update an existing resource
DELETE Delete a resource
HTTP response status codes
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:

  • No permissions for the resource

  • Authentication token was missing from the request

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

405 Method Not Allowed

Resource does not allow the HTTP request method that was used

500 Server Error

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.

Tooltip

If the HTTP method does not agree with the JSON attribute reqAction in the request body, then reqAction overrides the HTTP method.

  • "reqAction": 1 is like HTTP GET

  • "reqAction": 2 is like HTTP POST

  • "reqAction": 3 is like HTTP DELETE

  • "reqAction": 5 is like HTTP PUT

  • "reqAction": 14 has no HTTP method equivalent; it moves the item

HTTP request methods and response codes

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.

HTTP request methods
Request Method Description
GET Retrieve all resources or a specific resource
POST

Either:

  • Create a new resource

  • Perform an action

PUT Update an existing resource
DELETE Delete a resource
HTTP response status codes
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:

  • No permissions for the resource

  • Authentication token was missing from the request

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

405 Method Not Allowed

Resource does not allow the HTTP request method that was used

500 Server Error

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.

Tooltip

If the HTTP method does not agree with the JSON attribute reqAction in the request body, then reqAction overrides the HTTP method.

  • "reqAction": 1 is like HTTP GET

  • "reqAction": 2 is like HTTP POST

  • "reqAction": 3 is like HTTP DELETE

  • "reqAction": 5 is like HTTP PUT

  • "reqAction": 14 has no HTTP method equivalent; it moves the item