List Resource Usage


                https://api.ocamba.com/v2/ocamba/resource-usage
            

Returns a list of Resource Usage.


Name
Description
fieldsstring
The client can request more efficient filtered representation of the resource showing only specific field(s), using the “fields” query parameter. Note that the “fields” parameter has precedence over the “view” parameter.

Example GET /v2/ocamba/RESOURCE_NAME?fields=id,name

See "Tips" for the list of filterable parameters.


Example: fields=field1,field2,field3

pagestring
The page number indicates which set of items will be returned in the response. The format of request is "page=N,M" where 'N' (required) represents page number and 'M' (optional) is number of items per page.

Examples:
N=1, M=20 → returns page 1 with 20 items
N=2, M=20 → returns page 2 with 20 items (items 21-40)
N=3 → returns page 3. The number of objects returned depends on the resource settings.


Example: page=1,10

sortstring
Sorts the response by specified field(s) with the option to specify sorting order (ascending by default, add prefix "-" for descending).

Examples:
GET /v2/ocamba/RESOURCE_NAME?sort=name → sorts per name, ascending
GET /v2/ocamba/RESOURCE_NAME?sort=-id → sorts per id descending
GET /v2/ocamba/RESOURCE_NAME?sort=id,-name → sorts per id ascending, then name descending

See tips for the list of sortable fields.


Example: sort=-field1,filed2

q_fieldsstring
Use the q_fields parameter to list all fields you want to include in the search using q parameter. Note that not all fields are searchable on a specific object. If parameter q_fields is not specified, search is performed on a default search field.

Examples:
GET /v2/ocamba/members?q=sou&q_fields=lname → API retuns members whose lname contains string 'sou'.
GET /v2/ocamba/members?q=sou&q_fields=fname,lname,email → API returns members that contain string 'sou' in any of the specified fields.

See tips for the list of searchable parameters.


qstring
Set the q parameter value to search for a keyword or search term.

Example:
GET /v2/ocamba/members?q=sou → returns members that contain string 'sou'

See tips for the list of searchable parameters.

200 - OK
Arrow
Name
Description
An array of all Resource Usage.
Resource Usage
Name
Description
app-idstring
A unique app identifier generated by the Ocamba platform.


Example: 1000163

company_idstring
A unique company identifier generated by the Ocamba platform.


Example: 10013213

create_timedateTime
Timezone: GMT.


Example: 2021-07-30 12:50:13

defined_limitinteger
The number representing the limit, defined by the plan.


Example: 100

defined_limit_namestring
A unique limit identifier generated by the Ocamba platform.


Example: Number of Zones

descriptionstring
A limit description generated by the Ocamba platform.


Example: zones

idstring
A unique identifier generated by the Ocamba platform.


Example: 1998

limit_namestring
A unique limit identifier generated by the Ocamba platform.


Example: zones

limit_reached_notifiedinteger
The number representing if limit is reached.


Example: 1

limit_reached_notified_timedateTime
Timezone: GMT. Represents when is sent notification if limit is reached.


Example: 2021-07-30 12:50:13

threshold_notifiedinteger
The number representing if threshold is reached.


Example: 1

threshold_notified_timedateTime
Timezone: GMT. Represents when is sent notification if threshold is reached.


Example: 2021-07-30 12:50:13

update_timedateTime
Timezone: GMT.


Example: 2021-07-30 12:50:13

usage_percentagenumber
The number representing the resource usage in percentage.


Example: 70.6

used_limitnumber (integer)
The number representing the resource usage.


Example: 100

totalinteger
A total number of items.


Example: 31

400 - Bad Request
Arrow
Name
Description
codeinteger
Http response status code.


Example: 400

messagestring
The human readable message that describes how to deal with error.


Example: The request body is not valid.

titlestring
The error title.


Example: Bad request.

trace_idstring
Error trace id.


Example: 99a84211-f73d-4ff8-acdf-eb3e06bb9d62

500 - Internal Server Error
Arrow
Name
Description
codeinteger
Http response status code.


Example: 500

messagestring
The human readable message that describes how to deal with error.


Example: Internal server error.

titlestring
The error title.


Example: Internal server error.
tip
1 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.

2 Searchable fields are: limit_name, defined_limit_name, description

3 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.
200 Arrow
{
  "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"
    }
  ]
}
{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
{
  "code": 500,
  "title": "Internal server error.",
  "message": "Internal server error."
}