Home
Version 3
Events API

Events API

List events associated with an App since January 1, 2014

GET /v2/events

Fields

Name Description Default Valid Values Example Values
guid The guid of the event.
type The type of the event.
  • app.crash
  • audit.app.update
  • audit.app.create
  • audit.app.delete-request
  • audit.space.create
  • audit.space.update
  • audit.space.delete-request
  • app.crash
  • audit.app.update
actor The GUID of the actor.
actor_type The actor type.
  • user
  • app
actor_name The name of the actor.
actee The GUID of the actee.
actee_type The actee type.
  • space
  • app
actee_name The name of the actee.
timestamp The event creation time.
metadata The additional information about event. {}
space_guid The guid of the associated space.
organization_guid The guid of the associated organization.

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: timestamp, type, actee
  • 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.
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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxNzQ2MjM0N30.WkhcPJG4PPC-Zw4eZwnH8YHcxeGasqKHtZi_wCLszNE
Host: example.org
Cookie: 

Route

GET /v2/events?q=actee:1f3df990-7382-43d0-bafd-303dc9e7c843&q=timestamp%3E2014-01-01+00%3A00%3A00-04%3A00

Query Parameters

q: timestamp>2014-01-01 00:00:00-04:00

cURL

curl "https://api.[your-domain.com]/v2/events?q=actee:1f3df990-7382-43d0-bafd-303dc9e7c843&q=timestamp%3E2014-01-01+00%3A00%3A00-04%3A00" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxNzQ2MjM0N30.WkhcPJG4PPC-Zw4eZwnH8YHcxeGasqKHtZi_wCLszNE" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ca3a8260-2eef-47bc-a372-5c4bcf7e8bab
Content-Length: 2788
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "total_results": 3,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        "guid": "e2deb5f3-33bb-4b06-9922-493c78eab196",
        "url": "/v2/events/e2deb5f3-33bb-4b06-9922-493c78eab196",
        "created_at": "2014-11-24T19:32:27+00:00",
        "updated_at": null
      },
      "entity": {
        "type": "audit.app.create",
        "actor": "uaa-id-7",
        "actor_type": "user",
        "actor_name": "user@email.com",
        "actee": "1f3df990-7382-43d0-bafd-303dc9e7c843",
        "actee_type": "app",
        "actee_name": "name-73",
        "timestamp": "2014-11-24T19:32:27+00:00",
        "metadata": {
          "request": {
            "name": "new",
            "instances": 1,
            "memory": 84,
            "state": "STOPPED",
            "environment_json": "PRIVATE DATA HIDDEN"
          }
        },
        "space_guid": "a730ae15-1f8f-47aa-a04d-ec787ffe8a6d",
        "organization_guid": "c695eb27-b0b9-4ee9-8729-f3db0a5e861e"
      }
    },
    {
      "metadata": {
        "guid": "288f1146-ef1a-4764-a6c6-ab7f89507a6c",
        "url": "/v2/events/288f1146-ef1a-4764-a6c6-ab7f89507a6c",
        "created_at": "2014-11-24T19:32:27+00:00",
        "updated_at": null
      },
      "entity": {
        "type": "audit.app.update",
        "actor": "uaa-id-7",
        "actor_type": "user",
        "actor_name": "user@email.com",
        "actee": "1f3df990-7382-43d0-bafd-303dc9e7c843",
        "actee_type": "app",
        "actee_name": "name-73",
        "timestamp": "2014-11-24T19:32:27+00:00",
        "metadata": {
          "request": {
            "name": "new",
            "instances": 1,
            "memory": 84,
            "state": "STOPPED",
            "environment_json": "PRIVATE DATA HIDDEN"
          }
        },
        "space_guid": "a730ae15-1f8f-47aa-a04d-ec787ffe8a6d",
        "organization_guid": "c695eb27-b0b9-4ee9-8729-f3db0a5e861e"
      }
    },
    {
      "metadata": {
        "guid": "1b2d88e5-8e11-4e69-abea-b952ddc0e906",
        "url": "/v2/events/1b2d88e5-8e11-4e69-abea-b952ddc0e906",
        "created_at": "2014-11-24T19:32:27+00:00",
        "updated_at": null
      },
      "entity": {
        "type": "audit.app.delete-request",
        "actor": "uaa-id-7",
        "actor_type": "user",
        "actor_name": "user@email.com",
        "actee": "1f3df990-7382-43d0-bafd-303dc9e7c843",
        "actee_type": "app",
        "actee_name": "name-73",
        "timestamp": "2014-11-24T19:32:27+00:00",
        "metadata": {
          "request": {
            "recursive": false
          }
        },
        "space_guid": "a730ae15-1f8f-47aa-a04d-ec787ffe8a6d",
        "organization_guid": "c695eb27-b0b9-4ee9-8729-f3db0a5e861e"
      }
    }
  ]
}