Event
Events are changes occurring in Crunchy Bridge which are captured when
certain actions are performed which are considered to be worth auditing. For
example, when an account creates a cluster, an event is captured with a kind
of cluster.created
. In general, actions which cause mutable changes are
captured as events whereas read-only actions are not.
Events apply to another type of API resource (like a cluster
or network), and a representation of that API resource at the
time an event occurred on it is captured in an event's data
field. This
means that to a certain degree, events on a resource can be walked back to
see historical representations of a captured resource, although no API
compatibility is guaranteed on captured data.
Events are retained for 90 days, after which they are deleted automatically.
Part of the API reference collection
This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.
List events
List events for an account, cluster, or team.
With no query parameters, events for which the authenticated account is the
"actor" are returned, meaning events which were captured due to actions taken
by the account. When cluster_id
is specified, events pertaining to any
actions that occurred on that cluster are returned instead. When team_id
is
specified, events taken by any member of that team are returned instead. Only
one of these filters can be specified.
This endpoint's pagination may be ordered through the order_field
parameter
by id
only.
GET /events
Request
Query parameters
Name | Required | Type | Description |
---|---|---|---|
cluster_id | string | The cluster ID for which to retrieve events. | |
cursor | string | Return only items starting after this cursor ID. When paginating, pass the value of | |
kind | array | Kind to filter returned list of events on. For example, a value of | |
limit | integer | The maximum number of items to return on the page. Defaults to | |
order | string | The order of pagination. Enum | |
order_field | string | The name of the field on which to paginate like | |
team_id | string | The team ID for which to retrieve events. |
cURL example
curl -X GET https://api.crunchybridge.com/events
-H "Authorization: Bearer $CRUNCHY_API_KEY"
Response
Status: 200
Response for listing events.
Content type: application/json
Name | Nullable | Type | Description |
---|---|---|---|
events | array of array | List of events for this page. | |
has_more | boolean | Indicates whether or not there are more resources to page through in the collection. | |
next_cursor | ✔ | string in EID format | A cursor value to pass to the endpoint to get the next page. |
Example
{
"events": [
{
"actor_email": null,
"actor_id": "qvcw4hylovgyzbwzp53bmmlhga",
"actor_ip": "73.70.33.3",
"cluster_id": "rvf73a77ozfsvcttryebfrnlem",
"created_at": "2021-07-11T01:02:03Z",
"data": {
"cidr4": "1.2.3.4/24",
"id": "p56biajnfvgjhftvqs7lqymspe",
"name": "crunchy-production-network",
"provider_id": "aws",
"region_id": "us-west-2",
"team_id": "eaevtjiudzeq7bsqbbpiscund4"
},
"description": "[email protected] updated network `p56biajnfvgjhftvqs7lqymspe`.",
"id": "klkvpx5enfdilaehwhvnmcfoiy",
"kind": "network.created",
"object_id": "p56biajnfvgjhftvqs7lqymspe",
"object_kind": "network",
"previous_properties": null,
"request_id": "27a532f4-5bc8-4810-b602-88475a93167c",
"team_id": "eaevtjiudzeq7bsqbbpiscund4"
}
],
"has_more": false,
"next_cursor": null
}
Get event
Get a specific event.
GET /events/{event_id}
Request
Path parameters
event_id
: The ID of the event to be retrieved.
cURL example
curl -X GET https://api.crunchybridge.com/events/{event_id}
-H "Authorization: Bearer $CRUNCHY_API_KEY"
Response
Status: 200
An event represents an operation that occurred in the system. It contains a
kind like cluster.created
, a primary object associated with the event, and
may also be associated with a cluster or team.
Content type: application/json
Name | Nullable | Type | Description |
---|---|---|---|
id | string in EID format | The primary ID of the event. IDs for events are generated in ascending order. | |
actor_email | ✔ | string | The email of the actor who initiated the event, if there was one. |
actor_id | ✔ | string in EID format | The ID of the actor who initiated the event, if there was one. Actor IDs are always the identifier of an account. |
actor_ip | string | The IP from which the actor initiated the event, if there was an actor. | |
cluster_id | ✔ | string in EID format | The ID of the cluster associated with the event, if there was one. |
created_at | string of date/time formatted as RFC 3339 | The time when the event occurred. | |
data | string | Data captured at the time of the event. When an event is captured for another API resource, that API resource is rendered and stored in the | |
description | string | A human-readable description of the event. Note that this format is not guaranteed to be stable (it may change), so don't compare against it programmatically. Use other fields instead. | |
kind | string | The event's kind. Looks something like | |
object_id | string in EID format | The ID of the primary object associated with the event. For example, for a | |
object_kind | string | The kind of the primary object associated with the event. For example, for a | |
previous_properties | string | Contains the previous values of properties that may have changed during the operation which produced this event, taken by comparing a new API resource to how it rendered before the change. Usually only present on | |
request_id | ✔ | string in UUID format | The ID of the request that instigated the action which caused this event to be captured, if there was one. |
team_id | ✔ | string in EID format | The team associated with the event, if there was one. For example, for a |
Example
{
"actor_email": null,
"actor_id": "qvcw4hylovgyzbwzp53bmmlhga",
"actor_ip": "73.70.33.3",
"cluster_id": "rvf73a77ozfsvcttryebfrnlem",
"created_at": "2021-07-11T01:02:03Z",
"data": {
"cidr4": "1.2.3.4/24",
"id": "p56biajnfvgjhftvqs7lqymspe",
"name": "crunchy-production-network",
"provider_id": "aws",
"region_id": "us-west-2",
"team_id": "eaevtjiudzeq7bsqbbpiscund4"
},
"description": "[email protected] updated network `p56biajnfvgjhftvqs7lqymspe`.",
"id": "klkvpx5enfdilaehwhvnmcfoiy",
"kind": "network.created",
"object_id": "p56biajnfvgjhftvqs7lqymspe",
"object_kind": "network",
"previous_properties": null,
"request_id": "27a532f4-5bc8-4810-b602-88475a93167c",
"team_id": "eaevtjiudzeq7bsqbbpiscund4"
}