list

View as MarkdownOpen in Claude

List SWML webhook resources in the project.

Response

datalist of objectsRequired
An array of objects that contain a list of SWML Webhook data

Response Example

Response
1{
2 "data": [
3 {
4 "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
5 "project_id": "99151cf8-9548-4860-ba70-a8de824f3312",
6 "display_name": "Booking Assistant",
7 "type": "swml_webhook",
8 "created_at": "2024-05-06T12:20:00Z",
9 "updated_at": "2024-05-06T12:20:00Z",
10 "swml_webhook": {
11 "id": "a87db7ed-8ebe-42e4-829f-8ba5a4152f54",
12 "name": "My SWML Webhook",
13 "used_for": "calling",
14 "primary_request_url": "https://primary.com",
15 "primary_request_method": "GET",
16 "fallback_request_url": "https://fallback.com",
17 "fallback_request_method": "GET",
18 "status_callback_url": "https://callback.com",
19 "status_callback_method": "POST"
20 }
21 }
22 ],
23 "links": {
24 "self": "https://example.signalwire.com/api/fabric/resources/swml_webhooks?page_number=0&page_size=50&type=swml_webhook",
25 "first": "https://example.signalwire.com/api/fabric/resources/swml_webhooks?page_number=0&page_size=50&type=swml_webhook",
26 "next": "https://example.signalwire.com/api/fabric/resources/swml_webhooks?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca&type=swml_webhook",
27 "prev": "https://example.signalwire.com/api/fabric/resources/swml_webhooks?page_number=0&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca&type=swml_webhook"
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.swml_webhooks.list()
10for webhook in response.get("data", []):
11 print(f"{webhook['display_name']}: {webhook['id']}")