@@ -47,6 +47,151 @@ paths:
4747 - $ref : " #/components/schemas/NewSessionResponse"
4848 - example :
4949 sessionId : e017a2629c754fedc1f7d8587e06d126
50+ /apps/{appId}/adapters/websocket/new :
51+ post :
52+ tags :
53+ - Create adapter(s)
54+ summary : Create WebSocket adapter(s) for ingest or stream
55+ requestBody :
56+ content :
57+ application/json :
58+ schema :
59+ $ref : " #/components/schemas/NewAdapterRequest"
60+ examples :
61+ local_ingest :
62+ description : Ingest audio from a WebSocket endpoint to create a new WebRTC track
63+ value :
64+ tracks :
65+ - location : local
66+ trackName : tts-track
67+ endpoint : wss://example.com/ingest
68+ inputCodec : pcm
69+ mode : buffer
70+ remote_stream_audio :
71+ description : Stream an existing WebRTC audio track to a WebSocket endpoint
72+ value :
73+ tracks :
74+ - location : remote
75+ sessionId : 2a45361d5fd7cc14eface0587c276c94
76+ trackName : mic-track
77+ endpoint : wss://example.com/stream-audio
78+ outputCodec : pcm
79+ mode : stream
80+ remote_stream_video :
81+ description : Stream an existing WebRTC video track as JPEG to a WebSocket endpoint
82+ value :
83+ tracks :
84+ - location : remote
85+ sessionId : 2a45361d5fd7cc14eface0587c276c94
86+ trackName : camera-track
87+ endpoint : wss://example.com/stream-video
88+ outputCodec : jpeg
89+ mode : stream
90+ security :
91+ - secret : []
92+ parameters :
93+ - in : path
94+ name : appId
95+ schema :
96+ type : string
97+ required : true
98+ description : WebRTC application ID
99+ responses :
100+ " 200 " :
101+ description : OK
102+ headers :
103+ vary :
104+ schema :
105+ type : string
106+ example : Origin
107+ content :
108+ application/json :
109+ schema :
110+ $ref : " #/components/schemas/NewAdapterResponse"
111+ examples :
112+ local_ingest :
113+ value :
114+ tracks :
115+ - trackName : tts-track
116+ adapterId : 4e66a9d5a35e4a0899f6f8d0b63a35c1
117+ sessionId : d6f73f6f0c6645a7bb8f74e3fcb00a2f
118+ endpoint : wss://example.com/ingest
119+ remote_stream :
120+ value :
121+ tracks :
122+ - trackName : mic-track
123+ adapterId : 2b2ff7d2e17a4d638be5b6e3075ed6ce
124+ endpoint : wss://example.com/stream-audio
125+ " 503 " :
126+ description : Service unavailable. No adapter could be created.
127+ headers :
128+ vary :
129+ schema :
130+ type : string
131+ example : Origin
132+ content :
133+ application/json :
134+ schema :
135+ $ref : " #/components/schemas/NewAdapterResponse"
136+ example :
137+ tracks :
138+ - trackName : mic-track
139+ errorCode : adapter_unavailable
140+ errorDescription : Failed to create adapter
141+ /apps/{appId}/adapters/websocket/close :
142+ post :
143+ tags :
144+ - Close adapter(s)
145+ summary : Close WebSocket adapter(s)
146+ requestBody :
147+ content :
148+ application/json :
149+ schema :
150+ $ref : " #/components/schemas/CloseAdapterRequest"
151+ example :
152+ tracks :
153+ - adapterId : 4e66a9d5a35e4a0899f6f8d0b63a35c1
154+ security :
155+ - secret : []
156+ parameters :
157+ - in : path
158+ name : appId
159+ schema :
160+ type : string
161+ required : true
162+ description : WebRTC application ID
163+ responses :
164+ " 200 " :
165+ description : OK
166+ headers :
167+ vary :
168+ schema :
169+ type : string
170+ example : Origin
171+ content :
172+ application/json :
173+ schema :
174+ $ref : " #/components/schemas/CloseAdapterResponse"
175+ example :
176+ tracks :
177+ - adapterId : 4e66a9d5a35e4a0899f6f8d0b63a35c1
178+ bytesProcessed : 83492
179+ " 503 " :
180+ description : Service unavailable. No adapter could be closed.
181+ headers :
182+ vary :
183+ schema :
184+ type : string
185+ example : Origin
186+ content :
187+ application/json :
188+ schema :
189+ $ref : " #/components/schemas/CloseAdapterResponse"
190+ example :
191+ tracks :
192+ - adapterId : 4e66a9d5a35e4a0899f6f8d0b63a35c1
193+ errorCode : adapter_not_found
194+ errorDescription : Adapter not found
50195 /apps/{appId}/sessions/{sessionId}/tracks/new :
51196 post :
52197 tags :
@@ -904,6 +1049,105 @@ components:
9041049 errorDescription :
9051050 type : string
9061051 description : Array of track objects with results
1052+ AdapterObject :
1053+ type : object
1054+ properties :
1055+ location :
1056+ type : string
1057+ enum :
1058+ - local
1059+ - remote
1060+ description : Use local to ingest media from an external endpoint. Use remote to stream media from an existing WebRTC track.
1061+ sessionId :
1062+ type : string
1063+ description : Session ID of the track owner. Required for remote adapters.
1064+ trackName :
1065+ type : string
1066+ description : Track name to ingest into or stream from.
1067+ endpoint :
1068+ type : string
1069+ description : WebSocket endpoint URL.
1070+ outputCodec :
1071+ type : string
1072+ enum :
1073+ - pcm
1074+ - jpeg
1075+ description : Codec for outgoing media on remote adapters. Use pcm for audio or jpeg for video.
1076+ inputCodec :
1077+ type : string
1078+ enum :
1079+ - pcm
1080+ description : Codec for incoming media on local adapters.
1081+ mode :
1082+ type : string
1083+ enum :
1084+ - stream
1085+ - buffer
1086+ description : Adapter mode. Use buffer for local adapters and stream for remote adapters.
1087+ adapterId :
1088+ type : string
1089+ description : Unique identifier of the adapter instance.
1090+ AdapterStatObject :
1091+ type : object
1092+ properties :
1093+ adapterId :
1094+ type : string
1095+ description : Unique identifier of the adapter instance.
1096+ bytesProcessed :
1097+ type : number
1098+ description : Number of bytes processed before the adapter closed.
1099+ NewAdapterRequest :
1100+ type : object
1101+ properties :
1102+ tracks :
1103+ type : array
1104+ items :
1105+ $ref : " #/components/schemas/AdapterObject"
1106+ NewAdapterResponse :
1107+ type : object
1108+ properties :
1109+ errorCode :
1110+ type : string
1111+ errorDescription :
1112+ type : string
1113+ tracks :
1114+ type : array
1115+ items :
1116+ allOf :
1117+ - $ref : " #/components/schemas/AdapterObject"
1118+ - properties :
1119+ errorCode :
1120+ type : string
1121+ errorDescription :
1122+ type : string
1123+ CloseAdapterRequest :
1124+ type : object
1125+ properties :
1126+ tracks :
1127+ type : array
1128+ items :
1129+ type : object
1130+ properties :
1131+ adapterId :
1132+ type : string
1133+ description : Adapter identifier to close.
1134+ CloseAdapterResponse :
1135+ type : object
1136+ properties :
1137+ errorCode :
1138+ type : string
1139+ errorDescription :
1140+ type : string
1141+ tracks :
1142+ type : array
1143+ items :
1144+ allOf :
1145+ - $ref : " #/components/schemas/AdapterStatObject"
1146+ - properties :
1147+ errorCode :
1148+ type : string
1149+ errorDescription :
1150+ type : string
9071151 DataChannelObject :
9081152 type : object
9091153 properties :
0 commit comments