list

View as MarkdownOpen in Claude

List cXML script resources in the project.

Response

datalist of objectsRequired
An array of objects containing a list of cXML Script data

Response Example

Response
{
"data": [
{
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
"name": "Reception Script",
"type": "cxml_script",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:20:00Z",
"cxml_script": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contents": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say>Hello World</Say></Response>",
"request_count": 5,
"last_accessed_at": "2023-10-01T12:00:00Z",
"request_url": "https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e",
"script_type": "calling",
"display_name": "Booking Assistant Script",
"status_callback_url": "https://example.com/cxml/status",
"status_callback_method": "POST"
}
}
],
"links": {
"self": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_number=0&page_size=50&type=cxml_script",
"first": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_size=50&type=cxml_script",
"next": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_number=1&page_size=50&page_token=PA08cdad0c-e7e6-4a75-8244-902524f38d55&type=cxml_script",
"prev": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_number=0&page_size=50&page_token=PA08cdad0c-e7e6-4a75-8244-902524f38d55&type=cxml_script"
}
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
response = client.fabric.cxml_scripts.list()
for item in response.get("data", []):
print(f"{item['name']}: {item['id']}")