HTTP verbs and codes
Following common REST practices, we use a subset of HTTP of verbs and status codes to denote how to interact with the GeoDB API.
Verb actions
The following are the HTTP verbs —i.e., request methods— and respective main actions in the GeoDB API.
Verb | Main action |
---|---|
POST | Create a resource. |
PUT | Update a resource by replacing it. |
GET | Retrieve a single or multiple resources. |
DELETE | Delete a resource. |
PATCH | Partially update a resource (seldomly used). |
HEAD | Retrieve only header metadata of single or multiple resources. |
Status codes
The following are the main HTTP status codes used in the GeoDB API.
200 OK
The request was successful. Most commoly encountered when retrieving single or multiple resources.
201 Created
Upon a request to create a resource, this status indicates that the request was successful.
201 Created
Upon a request to create a resource, this status indicates that the request was successful.
204 No content
The request was successful but there is no content to return to the client. Encountered when deleting and updating resources.
400 Bad Request
Request failed due to a malformed request syntax or validation failure of the parameters or payload attributes.
401 Unathorized
Request failed due to lack of valid authentication credentials for the target resource.
403 Forbidden
The server understood the athenticated request but refused to process it due to insufficient permissions on the target action.
403 Not Found
The server cannot find the requested resource.
409 Conflict
Indicates a request conflict with the current state of the target resource (e.g., a violation of a database constraint).
413 Content Too Large
The request entity is larger than limits defined by the server (e.g., uploading an attachment file larger than allowed).
500 Internal Server Error
The server encountered an unexpected condition preventing it from fullfilling the request.