メニュー

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?

Monitor REST API: Alerts

Alertインスタンスリソースは、TwilioがWebhookリクエストをサーバーに発行したり、アプリケーションが(Twilioの)REST APIに対してリクエストを発行する際のエラーや警告の1件分のログ項目を表しています。 これらはデバッグの過程で特に有用で、モニター・アラート・トリガー を使って、新しいアラートをメールかWebhookで通知するよう構成できます。

Alert properties

特記事項 : 他のREST APIと違い、アラートインスタンスのレスポンスは リストリソース です。アラートに含まれる非常に大量のデータの可能性のため、HTTPリクエストとレスポンスデータはアラートインスタンスリソースの中だけで返されます。

Names in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Alert resource.

alert_text
文字列 Not PII

アラートのテキスト

api_version
文字列 Not PII

The API version used when the alert was generated. Can be empty for events that don't have a specific API version.

date_created
date_time<iso8601> Not PII

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

date_generated
date_time<iso8601> Not PII

The date and time in GMT when the alert was generated specified in ISO 8601 format. Due to buffering, this can be different than date_created.

date_updated
date_time<iso8601> Not PII

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

error_code
文字列 Not PII

The error code for the condition that generated the alert. See the Error Dictionary for possible causes and solutions to the error.

log_level
文字列 Not PII

The log level. Can be: error, warning, notice, or debug.

more_info
文字列 Not PII

The URL of the page in our Error Dictionary with more information about the error condition.

request_method
http_method Not PII

The method used by the request that generated the alert. If the alert was generated by a request we made to your server, this is the method we used. If the alert was generated by a request from your application to our API, this is the method your application used.

request_url
uri Not PII

The URL of the request that generated the alert. If the alert was generated by a request we made to your server, this is the URL on your server that generated the alert. If the alert was generated by a request from your application to our API, this is the URL of the resource requested.

resource_sid
sid Not PII

The SID of the resource for which the alert was generated. For instance, if your server failed to respond to an HTTP request during the flow of a particular call, this value would be the SID of the server. This value is empty if the alert was not generated for a particular resource.

sid
sid<NO> Not PII

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

url
url Not PII

The absolute URL of the Alert resource.

service_sid
sid Not PII

The SID of the service or resource that generated the alert. Can be null.

Fetch an Alert resource

GET
https://monitor.twilio.com/v1/Alerts/{Sid}
パラメーター
Names in REST API format
sid
Path
GET sid<NO> Not PII

The SID of the Alert resource to fetch.

        
        
        
        

        Read multiple Alert resources

        GET
        https://monitor.twilio.com/v1/Alerts

        アカウントに対して生成されたアラートのリストを返します。このリストはページ情報を含みます。

        パラメーター
        Names in REST API format
        log_level
        オプション
        GET 文字列 Not PII

        Only show alerts for this log-level. Can be: error, warning, notice, or debug.

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

        Only include alerts that occurred on or after this date. Specify the date in GMT and format as YYYY-MM-DD. Queries for alerts older than 30 days are not supported.

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

        Only include alerts that occurred on or before this date. Specify the date in GMT and format as YYYY-MM-DD. Queries for alerts older than 30 days are not supported.

        例 1
              
              
              
              
              例 2
                    
                    
                    
                    
                    Only show WARNING alerts generated between midnight April 1, 2015 and midnight April 30, 2015

                    Date range example

                    Only show WARNING alerts generated between midnight April 1, 2015 and midnight April 30, 2015
                    Rate this page:

                    ヘルプが必要ですか?

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