Home
Version 3
Service Usage Events (experimental) API

Service Usage Events (experimental) API

List Service Usage Events

GET /v2/service_usage_events

Events are sorted by internal database IDs. This order may differ from created_at. Events close to the current time should not be processed because other events may still have open transactions that will change their order in the results.

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
q Parameters used to filter the result set.
Format queries as <filter><op><value>
Valid ops: : >= <= < > IN
Valid filters: service_instance_type
  • q=filter:value
  • q=filter>value
  • q=filter IN a,b,c
page Page of results to fetch
results-per-page Number of results per page
order-direction Order of the results: asc (default) or desc
inline-relations-depth 0 - don't inline any relations and return URLs. Otherwise, inline to depth N.
after_guid Restrict results to Service Usage Events after the one with the given guid

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NCIsImVtYWlsIjoiZW1haWwtMjA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDl9.y841WX98z-t2gty-VmSDKtwPdCWqTno5L5LXpyIHMIE
Host: example.org
Cookie: 

Route

GET /v2/service_usage_events?results-per-page=1&after_guid=2a9058b4-5a83-4d11-989a-265f7271f913

Query Parameters

results-per-page: 1
after_guid: 2a9058b4-5a83-4d11-989a-265f7271f913

cURL

curl "https://api.[your-domain.com]/v2/service_usage_events?results-per-page=1&after_guid=2a9058b4-5a83-4d11-989a-265f7271f913" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NCIsImVtYWlsIjoiZW1haWwtMjA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDl9.y841WX98z-t2gty-VmSDKtwPdCWqTno5L5LXpyIHMIE" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a62eb546-6a16-4b6d-ba92-2e93d0958797
Content-Length: 1058
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "total_results": 2,
  "total_pages": 2,
  "prev_url": null,
  "next_url": "/v2/service_usage_events?after_guid=2a9058b4-5a83-4d11-989a-265f7271f913&order-direction=asc&page=2&results-per-page=1",
  "resources": [
    {
      "metadata": {
        "guid": "f5ba3a5c-cc4a-40e7-8dea-b64d640ddec4",
        "url": "/v2/service_usage_events/f5ba3a5c-cc4a-40e7-8dea-b64d640ddec4",
        "created_at": "2014-11-05T01:02:29+00:00"
      },
      "entity": {
        "state": "CREATED",
        "org_guid": "guid-505215e4-6bbc-42c9-b124-12af64d3906f",
        "space_guid": "guid-067d6854-863f-4234-8fa1-9ab4057970d8",
        "space_name": "name-1179",
        "service_instance_guid": "guid-b1748f75-78e4-49a8-b8c0-ebbc075d956b",
        "service_instance_name": "name-1180",
        "service_instance_type": "type-8",
        "service_plan_guid": "guid-c4e28c1d-9be7-4e5f-b19d-227a01c0e269",
        "service_plan_name": "name-1181",
        "service_guid": "guid-136e23ac-2ee8-4e8e-83bf-ec8af30e80a2",
        "service_label": "label-66"
      }
    }
  ]
}