Worker Statistics Resource
TaskRouter provides real-time, cumulative, and historical statistics for Workers. There are various APIs for retrieving the data that is meaningful to your business.
These resources may not be accessible if your Workspace exceeds 100 workers. Please contact support for additional assistance.
Resource Properties in REST API format | |
---|---|
realtime
|
An object that contains the real-time statistics for the Worker. |
cumulative
|
An object that contains the cumulative statistics for the Worker. |
account_sid
|
The SID of the Account that created the Worker resource. |
workspace_sid
|
The SID of the Workspace that contains the Worker. |
url
|
The absolute URL of the Worker statistics resource. |
Minutes cannot be used in combination with StartDate and EndDate parameters. If no parameters are passed, 15 minutes will be the default.
Fetch All Worker Statistics
GET /v1/Workspaces/{WorkspaceSid}/Workers/Statistics
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Worker to fetch. |
minutes
オプション
|
Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. |
start_date
オプション
|
Only calculate statistics from this date and time and later, specified in ISO 8601 format. |
end_date
オプション
|
Only calculate statistics from this date and time and earlier, specified in GMT as an ISO 8601 date-time. |
task_queue_sid
オプション
|
The SID of the TaskQueue for which to fetch Worker statistics. |
task_queue_name
オプション
|
The |
friendly_name
オプション
|
Only include Workers with |
task_channel
オプション
|
Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its |
Fetch Real-Time Worker Statistics
GET /v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the resource to fetch. |
task_channel
オプション
|
Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its |
Real-time statistics relating to a list of Workers include the following:
プロパティ | 概要 |
---|---|
TotalWorkers | 総Worker数です。 |
ActivityStatistics | Activity別の現在のWorkerステータス数です。 |
Fetch Cumulative Worker Statistics
GET /v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the resource to fetch. |
end_date
オプション
|
Only calculate statistics from this date and time and earlier, specified in ISO 8601 format. |
minutes
オプション
|
Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. |
start_date
オプション
|
Only calculate statistics from this date and time and later, specified in ISO 8601 format. |
task_channel
オプション
|
Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its |
Workerのリストに関連する一定期間における累積統計には、次が含まれます。
プロパティ | 概要 |
---|---|
ReservationsCreated | 作成されたReservationの総数です |
ReservationsAccepted | 受諾されたReservationの総数です |
ReservationsRejected | 拒否されたReservationの総数です |
ReservationsTimedOut | タイムアウトしたReservationの総数です |
ReservationsCanceled | キャンセルされたReservationの総数です |
ReservationsRescinded | 撤回されたReservationの総数です |
ActivityDurations | 各ActivityにWorkerが存在した最小時間、平均時間、最大時間、および総時間(秒)です。 |
Fetch A Specific Worker's Statistics
GET /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the WorkerChannel to fetch. |
worker_sid
Path
|
The SID of the Worker with the WorkerChannel to fetch. |
minutes
オプション
|
Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. |
start_date
オプション
|
Only calculate statistics from this date and time and later, specified in ISO 8601 format. |
end_date
オプション
|
Only include usage that occurred on or before this date, specified in GMT as an ISO 8601 date-time. |
task_channel
オプション
|
Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its |
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。