Fetch worker

GET /v1/Workspaces/{WorkspaceSid}/Workers/{Sid}

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the Worker to fetch.

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

  • Sid string Required

    The SID of the Worker resource to fetch.

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

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • ETag string
    • 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
    • account_sid string | null

      The SID of the Account that created the Worker resource.

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

    • activity_name string | null

      The friendly_name of the Worker's current Activity.

    • activity_sid string | null

      The SID of the Worker's current Activity.

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

    • attributes string | null

      The JSON string that describes the Worker. For example: { "email": "Bob@example.com", "phone": "+5095551234" }. Note If this property has been assigned a value, it will only be displayed in FETCH actions that return a single resource. Otherwise, this property will be null, even if it has a value. This data is passed to the assignment_callback_url when TaskRouter assigns a Task to the Worker.

    • available boolean | null

      Whether the Worker is available to perform tasks.

    • date_created string(date-time) | null

      The date and time in GMT when the resource was created specified in ISO 8601 format.

    • date_status_changed string(date-time) | null

      The date and time in GMT of the last change to the Worker's activity specified in ISO 8601 format. Used to calculate Workflow statistics.

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in ISO 8601 format.

    • friendly_name string | null

      The string that you assigned to describe the resource. Friendly names are case insensitive, and unique within the TaskRouter Workspace.

    • sid string | null

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

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

    • workspace_sid string | null

      The SID of the Workspace that contains the Worker.

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

    • url string(uri) | null

      The absolute URL of the Worker resource.

GET /v1/Workspaces/{WorkspaceSid}/Workers/{Sid}
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}' \
 --user "username:password"
Response examples (200)
{
  "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
    "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics",
    "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations",
    "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
    "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
    "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics",
    "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics"
  },
  "available": false,
  "attributes": "{}",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2017-05-30T23:32:39Z",
  "date_updated": "2017-05-30T23:32:39Z",
  "activity_name": "available",
  "friendly_name": "NewWorker3",
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "consumed_attention": 0,
  "operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_status_changed": "2017-05-30T23:32:39Z",
  "consumed_concurrency": 0,
  "configured_concurrency": -1
}