Making an API request
HTTP Requests
Use these components to construct HTTP requests to the Cloudmore API.
|
Parameter |
Description |
|---|---|
|
HTTP Method |
GET – Request data from the API
|
|
Base API URL |
https://api.cloudmore.com |
|
Path Parameters |
A Broker or a Seller unique identifier needs to be provided as a path parameter: Other IDs are also provided as path parameters. |
|
Query Parameters |
Some API calls allow for query parameters to filter or limit the request data. For example:
Each endpoint supports different query parameters. |
|
Request Headers |
Each API request needs to include the following headers:
In curl, you specify headers with the -h command. |
|
Request Body |
The request body is the data to submit with the API request. Some API endpoints require you to include JSON data in the request body. In curl, you specify the data to submit with the -d command. |
Example Requests:
Retrieving API responses
Some Cloudmore API calls return data in JSON format within the response body.
For instance, when you send a GET request to the endpoint /api/resellers/{{resellerId}}/Organizations, the response includes detailed information about the organizations managed by the broker. This data can be used for integration, reporting, or synchronization with other systems.
Status and error codes
Cloudmore API uses HTTP status codes to indicate the success or failure of a request:
|
Status Code |
Description |
|---|---|
|
200 Success |
The request succeeded. |
|
201 Created |
The request succeeded, and the resource was created. |
|
204 No Content |
The server processed the request successfully but did not return a response. |
|
400 Bad Request |
The API does not understand the request because of bad syntax. This could be because:
|
|
401 Unauthorized |
Authentication failed because credentials were missing or invalid. |
|
403 Forbidden |
The request failed because you did not have permission to perform the action or access the resource. |
|
404 Not Found |
The resource specified in the request does not exist. To resolve this error, make sure that the request
|
|
405 Method Not Allowed |
The method is not allowed for the resource specified in the request. |
|
500 Server Error |
An error occurred on the server. |