A project web hook event is created when a project’s web hook is triggered from a session event such as a session being created, updated or deleted.

The event can be used to monitor the response code and response message that are returned from the congigured web hook endpoint.

The response code and response message will be null while the event is being processed. When completed, either successfully or with a failure, the response code will represent the HTTP status code that was recieved from the endpoint. Polling can be used to re-request the event to monitor the response_code for a completed result.


GET /api/v1/projects/:project_id/web_hook/events/:event_id
Gets the Web Hook Event, including current state of the event and response code if the event is complete.

Get the information for a web hook event including the type of event, the time it was triggered and the response from the endpoint. The event will contain a response code and a response message once the event has finished being executed.

The event type will be determined by what triggered the event. The session.test event will occur when testing the web hook via the API or the project options page. When a new session is created it will trigger a session.create event. When a session is deleted it will trigger a session.delete event. When a session is updated or restored (from deleted) then it will trigger a session.update event.

The session_id field will be null for the session.test event but will contain a session guid for all other event types.

Examples

A 'session.create' event which is pending (incomplete).
{
  "status" : "success",
  "result" : {
    "id": 1239583414,
    "client_id": 19817472,
    "project_id": 1249918,
    "session_id": "7e9c00a0-f3d0-4a5c-a4c8-9d8258c31e34",
    "event_type": "session.create",
    "event_timestamp": 1513045894.577,
    "response_code": null,
    "response_message": null,
    "endpoint": "example.com/web_hook"
  }
}
A 'session.test' event which is completed successfully.
{
  "status" : "success",
  "result" : {
    "id": 1239583414,
    "client_id": 19817472,
    "project_id": 1249918,
    "session_id": null,
    "event_type": "session.test",
    "event_timestamp": 1513045894.577,
    "response_code": 200,
    "response_message": "OK",
    "endpoint": "example.com/web_hook"
  }
}
A 'session.update' event which completed with a failure response from the executed endpoint.
{
  "status" : "success",
  "result" : {
    "id": 1239583414,
    "client_id": 19817472,
    "project_id": 1249918,
    "session_id": "7e9c00a0-f3d0-4a5c-a4c8-9d8258c31e34",
    "event_type": "session.update",
    "event_timestamp": 1513045894.577,
    "response_code": 404,
    "response_message": "Not Found",
    "endpoint": "example.com/web_hook"
  }
}

Params

Param name Description
project_id
required

The ID of the project.

Validations:

  • Must be a Integer

event_id
required

The ID of the web hook event. This will be returned when triggering a test session event for a project.

Validations:

  • Must be a Integer