List alert

GET /v1/Alerts

Debugger alerts

Query parameters

  • LogLevel string

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

  • StartDate string(date-time)

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

  • EndDate string(date-time)

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

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • alerts array[object]
      Hide alerts attributes Show alerts attributes object
      • account_sid string | null

        The SID of the Account that created the Alert resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • alert_text string | null

        The text of the alert.

      • api_version string | null

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

      • date_created string(date-time) | null

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

      • date_generated string(date-time) | null

        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 string(date-time) | null

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

      • error_code string | null

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

      • log_level string | null

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

      • more_info string | null

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

      • request_method string(http-method) | null

        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.

        Values are GET or POST.

      • request_url string | null

        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 string | null

        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.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$.

      • sid string | null

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

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^NO[0-9a-fA-F]{32}$.

      • url string(uri) | null

        The absolute URL of the Alert resource.

      • service_sid string | null

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

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Alerts
curl \
 --request GET 'https://monitor.twilio.com/v1/Alerts' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "alerts",
    "url": "https://monitor.twilio.com/v1/Alerts?LogLevel=log_level&StartDate=2016-01-01&EndDate=2016-01-01&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Alerts?LogLevel=log_level&StartDate=2016-01-01&EndDate=2016-01-01&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "alerts": []
}
{
  "meta": {
    "key": "alerts",
    "url": "https://monitor.twilio.com/v1/Alerts?LogLevel=log_level&StartDate=2016-01-01&EndDate=2016-01-01&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Alerts?LogLevel=log_level&StartDate=2016-01-01&EndDate=2016-01-01&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "alerts": [
    {
      "sid": "NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://monitor.twilio.com/v1/Alerts/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "log_level": "log_level",
      "more_info": "more_info",
      "alert_text": "alert_text",
      "error_code": "error_code",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "api_version": "2010-04-01",
      "request_url": "http://www.example.com",
      "service_sid": "PNe2cd757cd5257b0217a447933a0290d2",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:00:00Z",
      "resource_sid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_generated": "2015-07-30T20:00:00Z",
      "request_method": "GET"
    }
  ]
}