Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Event Resource

TaskRouterは、履歴のレポートと監査のために、Workspaceにおける各状態変更のEventを記録します。 また、それらのEventが発生するたびに、Eventの詳細を含むHTTPリクエストをWorkspaceのEventCallbackURLに送信します(詳細については、Eventコールバックをご覧ください)。

イベントプロパティー

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Event resource.

actorSid
sid Not PII

The SID of the resource that triggered the event.

actorType
文字列 Not PII

The type of resource that triggered the event.

actorUrl
url Not PII

The absolute URL of the resource that triggered the event.

description
文字列 Not PII

A description of the event.

eventData
オブジェクト Not PII

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

eventDate
date_time<iso8601> Not PII

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

eventDateMs
long Not PII

The time the event was sent in milliseconds.

eventType
文字列 Not PII

The identifier for the event.

resourceSid
sid Not PII

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

resourceType
文字列 Not PII

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

resourceUrl
url Not PII

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

sid
sid<EV> Not PII

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

source
文字列 Not PII

Where the Event originated.

sourceIpAddress
文字列 Not PII

The IP from which the Event originated.

url
url Not PII

The absolute URL of the Event resource.

workspaceSid
sid<WS> Not PII

The SID of the Workspace that contains the Event.

Fetch an Event resource

GET
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Events/{Sid}
パラメーター
Names in None format
workspace_sid
必須
GET sid<WS> Not PII

The SID of the Workspace with the Event to fetch.

sid
必須
GET sid<EV> Not PII

The SID of the Event resource to fetch.

        
        
        
        

        List all Events

        GET
        https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Events
        パラメーター
        Names in None format
        workspace_sid
        必須
        GET sid<WS> Not PII

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

        end_date
        オプション
        GET date_time<iso8601> Not PII

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

        event_type
        オプション
        GET 文字列 Not PII

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

        minutes
        オプション
        GET integer Not PII

        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.

        reservation_sid
        オプション
        GET sid<WR> Not PII

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

        start_date
        オプション
        GET date_time<iso8601> Not PII

        Only include Events from on or after this date and time, specified in ISO 8601 format.

        task_queue_sid
        オプション
        GET sid<WQ> Not PII

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

        task_sid
        オプション
        GET sid<WT> Not PII

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

        worker_sid
        オプション
        GET sid<WK> Not PII

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

        workflow_sid
        オプション
        GET sid<WW> Not PII

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

        task_channel
        オプション
        GET 文字列 Not PII

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

        sid
        オプション
        GET sid<EV> Not PII

        The SID of the Event resource to read.

              
              
              
              

              If the StartDate of the Events request is greater than 30 days in the past, then the events returned will not contain fields that may contain Personally Identifiable Information. The fields labeled as PII in the tables below will be redacted.

              Eventコールバック

              The EventCallbackUrl is defined on the Workspace. Your application should respond to Event Callbacks with 204 No Content and a Content-Type header of "application/json" within 15 seconds.

              TaskRouterは、Eventが発生するたびに、Workspaceで構成されているEventCallbackURLにPOSTを送信して、次のパラメーターを渡します。

              A busy TaskRouter system will generate a large volume of Events at a frequent rate. Keep this in mind when considering how your application will scale.

              パラメーター 概要
              EventType このEventの識別子です
              AccountSid このEventを所有するアカウントです
              WorkspaceSid このEventが発生したWorkspaceのSidです
              WorkspaceName The Workspace Name generating this event (📇 PII )
              EventDescription A description of the event (📇 PII )
              リソースタイプ このEventをもっとも関連するオブジェクトのタイプです(Task、Reservation、Worker)
              ResourceSid このEventを最も良く表しているオブジェクトのsidです(TaskSid、ReservationSid、WorkerSid)。
              Timestamp このEventの送信日時です。

              イベントタイプ

              The following are the events sent by TaskRouter. All relevant fields at that particular moment will be logged.

              EventType フィールドデータ 概要
              task.created Task
              WorkflowSid
              TaskアイテムがWorkspaceに追加されました
              task.updated Task
              TaskQueueSid
              WorkflowSid
              A task’s attributes are changed
              task.canceled Task
              TaskQueueSid
              WorkflowSid
              A task is canceled
              task.wrapup Task
              TaskQueueSid
              WorkflowSid
              A task is moved to wrapup state.
              task.completed Task
              TaskQueueSid
              WorkflowSid
              A task is completed
              task.deleted Task
              TaskQueueSid
              WorkflowSid
              A task is deleted via API. Does not include auto-deleted Tasks after cancelation/completion.
              task.system-deleted Task
              TaskQueueSid
              WorkflowSid
              A task is deleted via the system, after the task reaches its TTL.
              reservation.created Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              A task is assigned to a worker
              reservation.accepted Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              Task ReservationがWorkerによって承諾されました
              reservation.rejected Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              Task ReservationがWorkerによって拒否されました
              reservation.timeout Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              Too much time passed without a task being accepted or rejected. The reservation is canceled.
              reservation.canceled Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              A task reservation is canceled before it has been accepted by a worker
              reservation.rescinded Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              Multi-reservation was used for a task and another worker has accepted one of the created reservations
              reservation.completed Task
              Worker
              TaskQueueSid
              ReservationSid
              WorkflowSid
              A task reservation is completed. Aligns with task.completed.
              task-queue.created TaskQueueSid
              TaskQueueName
              TaskQueueTargetExpression
              A TaskQueue has been created
              task-queue.deleted TaskQueueSid
              TaskQueueName
              TaskQueueTargetExpression
              A TaskQueue has been deleted
              task-queue.entered Task
              TaskQueueSid
              WorkflowSid
              A task enters its first queue during workflow processing
              task-queue.timeout Task
              TaskQueueSid
              WorkflowSid
              A workflow routing step timed-out and a task is leaving a queue
              task-queue.moved Task
              TaskQueueSid
              WorkflowSid
              A task enters a new queue during workflow processing
              workflow.target-matched Task
              WorkflowSid
              A task item matches a workflow routing step
              workflow.entered Task
              WorkflowSid
              A task enters a workflow
              workflow.timeout Task
              WorkflowSid
              A task reaches the end of a workflow without being accepted and is removed from the workspace
              workflow.skipped Task
              WorkflowSid
              A task skips-out of the workflow (because of skip_if in the final step) and is removed from the workspace
              worker.created Worker A worker is created
              worker.activity.update Worker A worker’s activity is updated
              worker.attributes.update Worker A worker’s attributes are updated
              worker.capacity.update Worker
              Channel
              A worker's channel's configured capacity has been updated
              worker.channel.availability.update Worker
              Channel
              A worker's channel's availability has been updated
              worker.deleted Worker A worker is deleted

              TaskのEventのフィールド

              Task関連のEventのログを記録する場合、Eventコールバックには以下のフィールドが含まれます。

              パラメーター 概要
              TaskSid 変更されたTaskのSIDです
              TaskAttributes The JSON Attributes of the task (📇 PII )
              TaskAge Taskの有効期限です
              TaskPriority Taskの優先度です
              TaskAssignmentStatus Taskの割り当てステータスです
              TaskCanceledReason Taskがキャンセルされた理由です
              TaskCompletedReason Taskが完了した理由

              WorkerのEventのフィールド

              When an event comes in that relates to a Worker, the following fields will be passed in:

              パラメーター 概要
              WorkerSid 変更されたWorkerのSIDです。
              WorkerName The Friendly Name of the worker (📇 PII )
              WorkerAttributes The JSON Attributes of the worker (📇 PII )
              WorkerActivitySid Workerの新しいActivityのSIDです。
              WorkerActivityName Workerの新しいActivityの分かりやすい名前 (Friendly Name) です。

              When an event comes in that relates to a Worker's activity changing, the following additional fields will be passed in:

              パラメーター 概要
              WorkerTimeInPreviousActivity 直前のActivityで費やされた時間で、小数点ゼロで切り捨てられた小数です
              WorkerTimeInPreviousActivityMs 直前のActivityで費やされた時間で、単位はミリ秒です
              WorkerPreviousActivitySid 今回の状態変更の前に実行したActivityのSIDです。

              When an event comes in that relates to a Worker's configured channel capacity or availability changing, the following additional fields will be passed in:

              パラメーター 概要
              WorkerChannelAvailable The availability of the channel
              WorkerChannelAvailableCapacity The available capacity of the channel
              WorkerChannelPreviousCapacity The previous capacity of the channel
              TaskChannelSid The associated channel sid
              TaskChannelUniqueName The associated channel unique name
              WorkerChannelTaskCount The number of assigned tasks to this worker on this channel
              Rate this page:

              ヘルプが必要ですか?

              誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。