Event Service

The event service provides an audit trail for all the major events happening in the EscapeKit platform. Services such as the Inventory and State service use the Event service as a sink for their events.

Endpoints

Events

GET
/api/v1/events/query/
Get all events that the user can see based on its group permissions.
/internal/create-event
Add an event.

Inventory Events

GET
/api/v1/events/query/inventory/
Get all Inventory events that the user can see based on its group permissions.
GET
/api/v1/events/query/inventory/{project}/
Get all Inventory project events (if user is in permitted groups).
GET
/api/v1/events/query/inventory/{project}/{application}/
Get all events for an Inventory application (if user is in permitted groups).
GET
/api/v1/events/query/inventory/{project}/{application}/{version}/
Get all events for a specific Inventory release (if user is in permitted groups).

State Events

GET
/api/v1/events/query/project/
Get all State events that the user can see based on its group permissions.
GET
/api/v1/events/query/project/{project}/
Get all State project events (if user is in permitted groups).
GET
/api/v1/events/query/project/{project}/{environment}/
Get all events for a specific State project environment (if user is in permitted groups).
GET
/api/v1/events/query/project/{project}/{environment}/deployment
Get all events for a specific deployment (if user is in permitted groups).

Subscriptions

GET
/api/v1/events/subscriptions/project/{project}/
PUT
/api/v1/events/subscriptions/project/{project}/

Schemas

Event

Description:
Describes an event having taken place in the EscapeKit platform.
Type:
object
Example:
{
    "allowed_groups": [
        "my-group", 
        "your-group"
    ], 
    "id": "123", 
    "inventory_project": "test", 
    "timestamp": 12343434343434, 
    "type": "CREATE_INVENTORY_PROJECT", 
    "username": "user"
}
FieldTypeDescriptionExample
allowed_roles[
string
]
The roles that are allowed to see this event.
data
object
Additional data.
id
string
The event identifier.
inventory_application
string
The inventory application (if any) this event pertains to.
inventory_namespace
string
The inventory namespace (if any) this event pertains to.
inventory_version
string
The inventory version (if any) this event pertains to.
state_deployment
string
The state deployment (if any) this event pertains to.
state_environment
string
The state environment (if any) this event pertains to.
state_project
string
The state project (if any) this event pertains to.
timestamp
string
The event's timestamp. Unix time in nanoseconds.
type
enum
The event type.
"CREATE_INVENTORY_PROJECT"
"NEW_INVENTORY_APPLICATION"
"UPLOAD_INVENTORY_APPLICATION"
"UPDATE_INVENTORY_PROJECT_USER_ACL"
"DELETE_INVENTORY_PROJECT_USER_ACL"
"UPDATE_INVENTORY_PROJECT_USER_ACL"
"DELETE_INVENTORY_PROJECT_TEAM_ACL"
"CREATE_STATE_PROJECT"
"CREATE_STATE_ENVIRONMENT"
"CREATE_STATE_DEPLOYMENT"
"UPDATE_STATE_DEPLOYMENT"
"REDEPLOY_STATE_DEPLOYMENT"
"RERUN_SMOKE_TESTS"
"DESTROY_REQUESTED"
"ADD_BUILD"
"TRIGGER_BUILD_WEBHOOK"
"BUILD_FINISHED_EVENT"
"UPDATE_STATE_PROJECT_USER_ACL"
"DELETE_STATE_PROJECT_USER_ACL"
"UPDATE_STATE_PROJECT_TEAM_ACL"
"DELETE_STATE_PROJECT_TEAM_ACL"
"USER_SIGNUP"
"USER_CONFIRMED"
"TEAM_CREATED"
"TEAM_DELETED"
"TEAM_MEMBER_UPDATED"
"TEAM_MEMBER_DELETED"
"TEAM_SERVICE_ACCOUNT_CREATED"
username
string
The username (if any) of the user that triggered this event.

Events

Description:
Events keyed by id.
Type:
Example:
[
    {
        "id": "123", 
        "inventory_project": "test", 
        "timestamp": 12343434343434, 
        "type": "CREATE_INVENTORY_PROJECT", 
        "username": "user"
    }, 
    {
        "allowed_groups": [
            "my-group", 
            "your-group"
        ], 
        "id": "124", 
        "state_project": "state-test", 
        "timestamp": 12343434343435, 
        "type": "CREATE_STATE_PROJECT", 
        "username": "user"
    }
]

Subscription

Description:
Describes a subscription that the event-service will send events to
Type:
object
FieldTypeDescriptionExample
id[
string
]
The groups that are allowed to see this event.
slack_icon
string
The icon to use if type is SLACK
slack_username
string
The username to use if type is SLACK
type
enum
The subscription type.
"webhook"
"slack"
url
string
URL used to send events to

Subscriptions

Description:
Events keyed by id.