List events

Description

Retrieve a list of events emitted by a specified action.

Request

HTTP Method: GET

Parameter Description
action_id ID of the action
since_id Optional Only retrieve events greater than this ID.
per_page Optional Set the number of results returned per page.
curl -X GET \
  https://<<META.tenant.domain>>/api/v1/agents/<<action_id>>/events \
  -H 'content-type: application/json' \
  -H 'x-user-token: <api-token>'

Response

A successful request will return a JSON Array describing events emitted by the specified action.

Field description

Parameter Description
id Event ID.
user_id ID of user associated with the action. That is: emitting action's owner.
agent_id ID of action that emitted the event.
payload JSON representation of the event payload.
created_at ISO 8601 Timestamp representing date and time the event was emitted.
updated_at ISO 8601 Timestamp representing date and time the event was last updated. Will always by the same as 'created_at'.
expires_at ISO 8601 Timestamp representing date and time the event will expire and be deleted.

Sample response

[
  {
    "id": 79240,
    "user_id": 1,
    "agent_id": 21,
    "payload": {
      "propagation_webhook": {
        "username": "joe.bloggs",
        "age": 99
      },
      "delay_http_request": {
        "body": {
          "delay": "5"
        },
        "headers": {
          "access-control-allow-credentials": "",
          "access-control-allow-headers": "",
          "access-control-allow-methods": "",
          "access-control-allow-origin": "",
          "access-control-expose-headers": "",
          "content-type": "application/json; charset=utf-8",
          "date": "Tue, 03 Apr 2018 13:37:24 GMT",
          "etag": "W/\"d-N6WkUL2Jgn7fCGyPWbbptw\"",
          "server": "nginx",
          "set-cookie": "sails.sid=s%3A6Hr22AAbEOurnGiqRo3; Path=/; HttpOnly",
          "vary": "Accept-Encoding",
          "content-length": "13",
          "connection": "Close"
        },
        "status": 200
      }
    },
    "created_at": "2018-04-03T13:37:24.479Z",
    "updated_at": "2018-04-03T13:37:24.479Z",
    "expires_at": "2019-04-03T13:37:24.433Z"
  }
]
Was this helpful?