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
1{
2 "data": [
3 {
4 "id": "993ed018-9e79-4e50-b97b-984bd5534095",
5 "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
6 "name": "Reception Script",
7 "type": "cxml_script",
8 "created_at": "2024-05-06T12:20:00Z",
9 "updated_at": "2024-05-06T12:20:00Z",
10 "cxml_script": {
11 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
12 "contents": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say>Hello World</Say></Response>",
13 "request_count": 5,
14 "last_accessed_at": "2023-10-01T12:00:00Z",
15 "request_url": "https://example.signalwire.com/laml-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e",
16 "script_type": "calling",
17 "display_name": "Booking Assistant Script",
18 "status_callback_url": "https://example.com/cxml/status",
19 "status_callback_method": "POST"
20 }
21 }
22 ],
23 "links": {
24 "self": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_number=0&page_size=50&type=cxml_script",
25 "first": "https://example.signalwire.com/api/fabric/resources/cxml_scripts?page_size=50&type=cxml_script",
26 "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",
27 "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"
28 }
29}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9response = client.fabric.cxml_scripts.list()
10for item in response.get("data", []):
11 print(f"{item['name']}: {item['id']}")