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?

Monitor REST API: Alerts

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

Alert properties

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

Names in cs format
AccountSid
sid<AC> Not PII

The SID of the Account that created the Alert resource.

AlertText
文字列 Not PII

アラートのテキスト

ApiVersion
文字列 Not PII

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

DateCreated
date_time<iso8601> Not PII

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

DateGenerated
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.

DateUpdated
date_time<iso8601> Not PII

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

ErrorCode
文字列 Not PII

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

LogLevel
文字列 Not PII

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

MoreInfo
文字列 Not PII

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

RequestMethod
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.

RequestUrl
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.

ResourceSid
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.

ServiceSid
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 None format
sid
必須
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 None 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タグのついた情報から欲しいものを探してみましょう。