listCallNotification
Error notifications for calls
Details
- Method:
GET - Path:
/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json - Operation ID:
ListCallNotification
Parameters
{
"AccountSid": {
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resources to read.",
"required": true,
"location": "path",
"type": "string"
},
"CallSid": {
"description": "The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resources to read.",
"required": true,
"location": "path",
"type": "string"
},
"Log": {
"description": "Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.",
"required": false,
"location": "query",
"type": "integer"
},
"MessageDate": {
"description": "Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.",
"required": false,
"location": "query",
"type": "string",
"format": "date"
},
"MessageDate<": {
"description": "Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.",
"required": false,
"location": "query",
"type": "string",
"format": "date"
},
"MessageDate>": {
"description": "Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.",
"required": false,
"location": "query",
"type": "string",
"format": "date"
},
"PageSize": {
"description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
"required": false,
"location": "query",
"type": "integer",
"format": "int64"
},
"Page": {
"description": "The page index. This value is simply for client state.",
"required": false,
"location": "query",
"type": "integer"
},
"PageToken": {
"description": "The page token. This is provided by the API.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"title": "ListCallNotificationResponse",
"type": "object",
"properties": {
"notifications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account_sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^AC[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource."
},
"api_version": {
"type": "string",
"nullable": true,
"description": "The API version used to create the Call Notification resource."
},
"call_sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^CA[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the Call Notification resource is associated with."
},
"date_created": {
"type": "string",
"format": "date-time-rfc-2822",
"nullable": true,
"description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
},
"date_updated": {
"type": "string",
"format": "date-time-rfc-2822",
"nullable": true,
"description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
},
"error_code": {
"type": "string",
"nullable": true,
"description": "A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors)."
},
"log": {
"type": "string",
"nullable": true,
"description": "An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING."
},
"message_date": {
"type": "string",
"format": "date-time-rfc-2822",
"nullable": true,
"description": "The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`."
},
"message_text": {
"type": "string",
"nullable": true,
"description": "The text of the notification."
},
"more_info": {
"type": "string",
"format": "uri",
"nullable": true,
"description": "The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors)."
},
"request_method": {
"type": "string",
"format": "http-method",
"enum": [
"GET",
"POST"
],
"nullable": true,
"description": "The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers."
},
"request_url": {
"type": "string",
"format": "uri",
"nullable": true,
"description": "The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called."
},
"sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^NO[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The unique string that that we created to identify the Call Notification resource."
},
"uri": {
"type": "string",
"nullable": true,
"description": "The URI of the resource, relative to `https://api.twilio.com`."
}
}
}
},
"end": {
"type": "integer"
},
"first_page_uri": {
"format": "uri",
"type": "string"
},
"next_page_uri": {
"format": "uri",
"nullable": true,
"type": "string"
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"previous_page_uri": {
"format": "uri",
"nullable": true,
"type": "string"
},
"start": {
"type": "integer"
},
"uri": {
"format": "uri",
"type": "string"
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('twilio')
# Call this tool
result = await agent.call_tool('listCallNotification', {
# Add required parameters here
})