General
Authentication
Each user can issue API tokens / personal access tokens that may be used to authenticate API requests. When making requests using API tokens, the token should be included in the Authorization header as a Bearer token.
$ curl --header "Authorization: Bearer LGA1RDb35UPdGwUXumOrZZlEW3kRWvl9zS1dtfQr" \
--header "Accept: application/json" \
https://cp.elovade.cloud/api/v1/tenants?page=1
Rate Limit
Requests made to the API are rate limited per minute.
The overall limit and remaining requests for the current minute are returned in the HTTP headers.
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 03 Feb 2022 14:25:14 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
When the limit was reached, a temporary error is returned, until the limit is reset.
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Date: Mon, 15 Nov 2021 09:28:55 GMT
{"message":"Too Many Attempts."}HTTP Methods
The API supports 4 HTTP methods for interacting with resources:
GET
Make a GET request to retrieve data.
GET requests will never cause an update or change to your data.
POST
Use a POST request to create new resources.
For example, make a POST request to a collection endpoint (like /api/v1/tenants) where the body of your request JSON is a new tenant.
PUT
Use a PUT request to update a specific resource.
DELETE
Make a DELETE request to remove a resource.
Status Codes
200 OK: This informs the client about the successful response.
201 Created: This is returned for POST requests, stating that the resource is created successfully on the server.
202 Accepted: This informs the client that the request has been successfully received, but the processing is not yet finished.
204 No Content: This informs the client that the request has been successfully processed, but no content will be returned.
400 Bad Request: There is something wrong in the request from the client, hence the server cannot or will not process it.
HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Thu, 03 Feb 2022 14:44:43 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
{"message":"Validation errors","data":{"page":["The page must be a number.","The page must
be greater than or equal 1."]}}
401 Unauthorized: The client needs to authorize themselves to make this request.
HTTP/1.1 401 Unauthorized
Content-Type: application/json
Date: Thu, 03 Feb 2022 14:57:15 GMT
{"message":"Unauthenticated."}
403 Forbidden: This status code is used when the client request is correct but the server refuses to process the request. The client might not have required permissions.
HTTP/1.1 403 Forbidden
Content-Type: application/json
Date: Mon, 14 Feb 2022 14:23:09 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
Access-Control-Allow-Origin: *
{"message":"Invalid ability provided."}
404 Not Found: The resource which the client is requesting for doesn't exist.
HTTP/1.1 404 Not Found
Content-Type: application/json
Date: Mon, 15 Nov 2021 09:29:14 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
{"message":"Record not found."}500 Internal Server Error: This is a generic status code returned when an unexpected condition is encountered on the server, while processing the request.
503 Service Unavailable: When the server is not available due to excessive load or may be down for maintenance, this status code is returned to the client.
Last updated