List event

GET /v1/Workspaces/{WorkspaceSid}/Events

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the Events to read. Returns only the Events that pertain to the specified Workspace.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

Query parameters

  • EndDate string(date-time)

    Only include Events that occurred on or before this date, specified in GMT as an ISO 8601 date-time.

  • EventType string

    The type of Events to read. Returns only Events of the type specified.

  • Minutes integer

    The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is 15 minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.

  • ReservationSid string

    The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WR[0-9a-fA-F]{32}$.

  • StartDate string(date-time)

    Only include Events from on or after this date and time, specified in ISO 8601 format. Task Attributes for Events older than 30 days will be redacted.

  • TaskQueueSid string

    The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WQ[0-9a-fA-F]{32}$.

  • TaskSid string

    The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WT[0-9a-fA-F]{32}$.

  • WorkerSid string

    The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WK[0-9a-fA-F]{32}$.

  • WorkflowSid string

    The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WW[0-9a-fA-F]{32}$.

  • TaskChannel string

    The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.

  • Sid string

    The SID of the Event resource to read.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^EV[0-9a-fA-F]{32}$.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • X-Rate-Limit-Limit string
    • X-Rate-Limit-Remaining string
    • X-Rate-Limit-Config string
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • events array[object]
      Hide events attributes Show events attributes object
      • account_sid string | null

        The SID of the Account that created the Event resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • actor_sid string | null

        The SID of the resource that triggered the event.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$.

      • actor_type string | null

        The type of resource that triggered the event.

      • actor_url string(uri) | null

        The absolute URL of the resource that triggered the event.

      • description string | null

        A description of the event.

      • event_data

        Data about the event. For more information, see Event types.

      • event_date string(date-time) | null

        The time the event was sent, specified in ISO 8601 format.

      • event_date_ms integer(int64) | null

        The time the event was sent in milliseconds.

      • event_type string | null

        The identifier for the event.

      • resource_sid string | null

        The SID of the object the event is most relevant to, such as a TaskSid, ReservationSid, or a WorkerSid.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$.

      • resource_type string | null

        The type of object the event is most relevant to, such as a Task, Reservation, or a Worker).

      • resource_url string(uri) | null

        The URL of the resource the event is most relevant to.

      • sid string | null

        The unique string that we created to identify the Event resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^EV[0-9a-fA-F]{32}$.

      • source string | null

        Where the Event originated.

      • source_ip_address string | null

        The IP from which the Event originated.

      • url string(uri) | null

        The absolute URL of the Event resource.

      • workspace_sid string | null

        The SID of the Workspace that contains the Event.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Workspaces/{WorkspaceSid}/Events
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Events' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "events",
    "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "events": [
    {
      "sid": "EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events/EVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "source": "twilio",
      "actor_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "actor_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "actor_type": "workspace",
      "event_data": {
        "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "worker_name": "JustinWorker",
        "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "workspace_name": "WorkspaceName",
        "worker_attributes": "{}",
        "worker_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "worker_activity_name": "Offline",
        "worker_time_in_previous_activity": "26",
        "worker_time_in_previous_activity_ms": "26123"
      },
      "event_date": "2015-02-07T00:32:41Z",
      "event_type": "worker.activity",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "description": "Worker JustinWorker updated to Idle Activity",
      "resource_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "resource_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "event_date_ms": 987654321111,
      "resource_type": "worker",
      "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "source_ip_address": "1.2.3.4"
    }
  ]
}
{
  "meta": {
    "key": "events",
    "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-03T00%3A00%3A00Z&WorkerSid=WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&EventType=reservation.created&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ReservationSid=WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "events": []
}