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.
GET /v2/service_usage_events?results-per-page=1&after_guid=4ab57ef9-86c1-42b0-b987-1a83c315b3fd
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, service_guid |
|
|
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. |
|
|
orphan-relations | 0 - de-duplicate object entries in response |
|
|
exclude-relations | comma-delimited list of relations to drop from response |
|
|
include-relations | comma-delimited list of the only relations to include in response |
|
|
after_guid | Restrict results to Service Usage Events after the one with the given guid |
|
|
results-per-page: 1 after_guid: 4ab57ef9-86c1-42b0-b987-1a83c315b3fd
Name | Description | Default | Valid Values | Example Values |
---|---|---|---|---|
guid | The guid of the event. |
|
|
|
state | The desired state of the service. |
|
|
|
org_guid | The GUID of the organization. |
|
|
|
space_guid | The GUID of the space. |
|
|
|
space_name | The name of the space. |
|
|
|
service_instance_guid | The GUID of the service instance. |
|
|
|
service_instance_name | The name of the service instance. |
|
|
|
service_instance_type | The type of the service instance. |
|
|
|
service_plan_guid | The GUID for the service plan. |
|
|
|
service_plan_name | The name for the service plan. |
|
|
|
service_guid | The GUID of the service. |
|
|
|
created_at | The timestamp of the event creation. |
|
|
|
service_label | The name of the service. |
|
|
Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTczIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc4fQ.aSv-NdDEZxTsy0tIQNVdaTJRIeym03rX1i_FHf7Z6MY Host: example.org Cookie:
curl "https://api.[your-domain.com]/v2/service_usage_events?results-per-page=1&after_guid=4ab57ef9-86c1-42b0-b987-1a83c315b3fd" -X GET \ -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTczIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc4fQ.aSv-NdDEZxTsy0tIQNVdaTJRIeym03rX1i_FHf7Z6MY" \ -H "Host: example.org" \ -H "Cookie: "
200 OK
{ "total_results": 2, "total_pages": 2, "prev_url": null, "next_url": "/v2/service_usage_events?after_guid=4ab57ef9-86c1-42b0-b987-1a83c315b3fd&order-direction=asc&page=2&results-per-page=1", "resources": [ { "metadata": { "guid": "4122a4f0-c63a-480d-8ae6-04b7cd55f2af", "url": "/v2/service_usage_events/4122a4f0-c63a-480d-8ae6-04b7cd55f2af", "created_at": "2015-12-22T18:27:58Z" }, "entity": { "state": "CREATED", "org_guid": "guid-a7430698-b33e-4093-b5af-0e60f4cb1cf0", "space_guid": "guid-304302c9-df70-4ac2-9f12-bf139d356211", "space_name": "name-173", "service_instance_guid": "guid-a89d370e-83df-4340-ac82-60244d7e8e27", "service_instance_name": "name-174", "service_instance_type": "type-2", "service_plan_guid": "guid-e59a38b2-50a2-4cb9-8b37-9d13da1b4e6a", "service_plan_name": "name-175", "service_guid": "guid-c0fbcb7f-eae3-4b67-97c5-041c8e8365be", "service_label": "label-14" } } ] }
Content-Type: application/json;charset=utf-8 X-VCAP-Request-ID: Content-Length: 1050 X-Content-Type-Options: nosniff