Monitor Event Resource
イベントは Twilioのリソースの イベントを記録、変更トラッキング を提供するプラットフォームです。
For example, Events log when you provision a phone number, change your account’s security settings, delete a recording, and so on. Events log virtually every action taken within Twilio, regardless of whether that action was taken through the API, by a user in the Twilio Console, or even by a Twilio employee.
イベント RESTリソースはイベントログの API経由での取得を提供します。それぞれの イベントは ログエントリーに類似します。
- The type of event.
- The resource that the event relates to.
- The actor that caused the event to happen.
- The originating source for the event, including its IP address.
- Any related event data (like what properties were changed).
イベント は Twilioプロダクト全体で動作します。これらは Twilioアプリケーションで何が起きているかを全て可視化するために助けになるツールです。APIはログの取得、ログ収集ツールやSIEM(セキュリティ情報およびイベント管理)へのデータのプッシュに利用できます。
イベントプロパティー
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Event resource. |
actor_sid
|
The SID of the actor that caused the event, if available. Can be |
actor_type
|
The type of actor that caused the event. Can be: |
description
|
A description of the event. Can be |
event_data
|
An object with additional data about the event. The contents depend on |
event_date
|
The date and time in GMT when the event was recorded specified in ISO 8601 format. |
event_type
|
The event's type. Event-types are typically in the form: |
resource_sid
|
The SID of the resource that was affected. |
resource_type
|
The type of resource that was affected. For a full list of all resource-types, see the Monitor Event Types. |
sid
|
The unique string that we created to identify the Event resource. |
source
|
The originating system or interface that caused the event. Can be: |
source_ip_address
|
The IP address of the source, if the source is outside the Twilio cloud. This value is |
url
|
The absolute URL of the resource that was affected. Can be |
links
|
The absolute URLs of related resources. |
イベント通知ページやイベントリストページを作成する際、これらのフィールドが役に立ちます。たとえば、"On {event_date
}, a {event_type
} event was generated for resource {resource_type
} via {source
} by {actor_type
} {actor_sid
} from {source_ip_address
}" のように、人間が読みやすい形式の文字列を表示できます。
ソース、当事者タイプ、および当事者 Sid
ソース、当事者タイプ、および当事者 Sid は、密接に関係しています。これらはすべて、誰または何が、どこで、イベントを発生させたかを示すのに役立ちます。次の表は、あなたが目にするであろう、最も一般的な組み合わせを示します。
ソース | actor_type | actor_sid | description |
---|---|---|---|
api | アカウント | AC123 | アカウント AC123 は、API により認証され、イベントを発生させました。 |
Web | user | US456 | Sid が US456 であるユーザーが Twilio コンソールにログインして、イベントを発生させました。このユーザーの Sid は、Twilio コンソールの「Manager Users」ページで確認できます。 |
twilio | twilio-admin | null | Twilio 管理者が Twilio の管理インターフェイスで変更を行いました。 |
Fetch an Event resource
https://monitor.twilio.com/v1/Events/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Event resource to fetch. |
例 1
Read multiple Event resources
https://monitor.twilio.com/v1/Events
Returns a list of Events in this account, sorted by event-date
. This list includes paging information.
By default, all Events are included. You can always filter your
Events by event-date using theStartDate
andEndDate
parameters.
In addition, you may filter by any one of the other fields. Filtering on more than one field in the same request is not supported and will result in a400 Bad Request
error.
パラメーター
Parameters in REST API format | |
---|---|
actor_sid
オプション
|
Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials. |
event_type
オプション
|
Only include events of this Event Type. |
resource_sid
オプション
|
Only include events that refer to this resource. Useful for discovering the history of a specific resource. |
source_ip_address
オプション
|
Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console. |
start_date
オプション
|
Only include events that occurred on or after this date. Specify the date in GMT and ISO 8601 format. |
end_date
オプション
|
Only include events that occurred on or before this date. Specify the date in GMT and ISO 8601 format. |
例 1
例 2
例 3
例 4
サポートされているすべてのリソースタイプとイベントタイプの完全なリスト
現在、イベントは、次に示すリソースタイプと関連イベントタイプを追跡しています。
リソースタイプ | イベントタイプ |
---|---|
アカウント | account.created account.updated account.deleted |
アプリケーション | application.created application.updated application.deleted |
authorized-connect-app | authorized-connect-app.created authorized-connect-app.deleted |
call | call.deleted |
caller-id | caller-id.created caller-id.updated caller-id.deleted |
connect-app | connect-app.created connect-app.updated connect-app.deleted |
invoice-settings | invoice-settings.updated |
message | message.updated message.deleted |
message-body | message-body.deleted |
message-media | message-media.deleted |
payment | payment.created |
payment-method | payment-method.created payment-method.updated payment-method.deleted |
payment-refund | payment-refund.created |
phone-number | phone-number.created phone-number.updated phone-number.deleted |
recharge-trigger | recharge-trigger.created recharge-trigger.updated recharge-trigger.deleted |
レコーディング | recording.deleted |
Shortcode | shortcode.created shortcode.updated shortcode.deleted |
sip-credential-list | sip-credential-list.created sip-credential-list.updated sip-credential-list.deleted |
sip-domain | sip-domain.created sip-domain.updated sip-domain.deleted |
sip-ip-access-control-list | sip-ip-access-control-list.created sip-ip-access-control-list.updated sip-ip-access-control-list.deleted |
support-plan | support-plan.updated |
sms-geographic-permissions | sms-geographic-permissions.updated |
トランスクリプション | transcription.deleted |
usage-trigger | usage-trigger.created usage-trigger.updated usage-trigger.deleted |
voice-geographic-permissions | voice-geographic-permissions.updated |
wireless-sim | wireless-sim.updated |
Resource-Types and Event-Types Available only via the Console
All of the above event types are available via the console and API. The following types can be viewed in the console only:
リソースタイプ | イベントタイプ |
---|---|
account-api-keys | account-api-keys.created account-api-keys.deleted account-api-keys.updated |
account-auth-token | account-auth-token.primary-created account-auth-token.deleted account-auth-token.promoted account-auth-token.secondary-created account-auth-token.secondary-deleted |
account-credentials | account-credentials.created account-credentials.deleted account-credentials.updated |
authorized-connect-app | authorized-connect-app.created authorized-connect-app.deleted authorized-connect-app.updated |
config | config.created config.deleted |
connect-app | connect-app.created connect-app.deleted connect-app.updated |
connection-policy | connection-policy.created connection-policy.deleted connection-policy.updated |
copilot-application | copilot-application.created copilot-application.updated copilot-application.deleted |
copilot-number-pool | copilot-number-pool.created copilot-number-pool.deleted copilot-number-pool.updated |
data-policy | data-policy.created data-policy.deleted |
invoice-settings | invoice-settings.created invoice-settings.deleted |
ip-access-control-list | ip-access-control-list.created ip-access-control-list.deleted ip-access-control-list.updated |
ip-messaging | ip-messaging.message.deleted ip-messaging.message.updated |
message-body | message-body.updated |
payment-refund | payment-refund.deleted payment-refund.updated |
payment | payment.deleted payment.updated |
security-settings | security-settings.created security-settings.deleted security-settings.updated |
sms-geographic-permissions | sms-geographic-permissions.created sms-geographic-permissions.deleted |
support-plan | support-plan.created support-plan.deleted |
トランスクリプション | transcription.created transcription.updated |
user-invitation | user-invitation.created user-invitation.deleted user-invitation.updated |
user-password | user-password.created user-password.deleted user-password.updated |
user-session | user-session.created user-session.deleted user-session.updated |
user | user.created user.deleted user.updated |
voice-geographic-permissions | voice-geographic-permissions.created voice-geographic-permissions.deleted |
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。