List Resource Usage

List Resource Usage

GET https://api.ocamba.com/v2/ocamba/resource-usage
Returns a list of Resource Usage.

Query parameters

parameters

Response schemas

curl -X GET \
 "https://api.ocamba.com/v2/ocamba/resource-usage" \
  -H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/ocamba/resource-usage';
const options = {
  method: 'GET',
  headers: {
    Authorization: `Bearer {TOKEN}`
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/ocamba/resource-usage");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

200 OK

{
  "total": 31,
  "items": [
    {
      "id": "1998",
      "company_id": "10013213",
      "app-id": "1000163",
      "limit_name": "zones",
      "defined_limit_name": "Number of Zones",
      "description": "zones",
      "used_limit": 100,
      "defined_limit": 100,
      "usage_percentage": 70.6,
      "threshold_notified": 1,
      "threshold_notified_time": "2021-07-30 12:50:13",
      "limit_reached_notified": 1,
      "limit_reached_notified_time": "2021-07-30 12:50:13",
      "create_time": "2021-07-30 12:50:13",
      "update_time": "2021-07-30 12:50:13"
    }
  ]
}

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

{
  "code": 500,
  "title": "Internal server error.",
  "message": "Internal server error."
}
Responses
Tip

Sortable fields are: limit_name, defined_limit_name, description, used_limit, defined_limit, usage_percentage, threshold_notified, threshold_notified_time, limit_reached_notified, limit_reached_notified_time, create_time, update_time.

Searchable fields are: limit_name, defined_limit_name, description

Filterable fields are: app_id, limit_name, defined_limit_name, description, used_limit, defined_limit, usage_percentage, threshold_notified, threshold_notified_time, limit_reached_notified, limit_reached_notified_time, create_time and update_time.