list
List all Fabric resources across all resource types.
Response
datalist of objectsRequired
An array of objects that contain a list of Resource data
linksobjectRequired
Object containing pagination links
Response Example
Response
1 { 2 "data": [ 3 { 4 "call_flow": { 5 "document_version": 1, 6 "flow_data": {}, 7 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", 8 "relayml": { 9 "sections": { 10 "main": [ 11 { 12 "denoise": {}, 13 "play": { 14 "url": "https://cdn.signalwire.com/swml/audio.mp3" 15 } 16 } 17 ] 18 }, 19 "version": "1.0.0" 20 }, 21 "title": "Booking Assistant" 22 }, 23 "created_at": "2024-05-06T12:20:00Z", 24 "display_name": "My Resource", 25 "id": "993ed018-9e79-4e50-b97b-984bd5534095", 26 "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780", 27 "type": "call_flow", 28 "updated_at": "2024-05-06T12:20:00Z" 29 } 30 ], 31 "links": { 32 "self": "https://devspace.signalwire.com/api/fabric/resources?page_number=0&page_size=50", 33 "first": "https://devspace.signalwire.com/api/fabric/resources?page_size=50", 34 "next": "https://devspace.signalwire.com/api/fabric/resources?page_number=1&page_size=50&page_token=PA0f2b7869-304c-45ac-8863-3455ccb34cdc", 35 "prev": "https://devspace.signalwire.com/api/fabric/resources?page_number=0&page_size=50&page_token=PA0f2b7869-304c-45ac-8863-3455ccb34cdc" 36 } 37 }
Example
1 import { RestClient } from "@signalwire/sdk"; 2 3 const client = new RestClient({ 4 project: "your-project-id", 5 token: "your-api-token", 6 host: "your-space.signalwire.com" 7 }); 8 9 const response = await client.fabric.resources.list(); 10 for (const resource of response.data ?? []) { 11 console.log(`${resource.type}: ${resource.name} (${resource.id})`); 12 }