stopAirplaySession
const url = 'https://example.com/api/v1/airplay/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/stop';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/airplay/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/stop \ --header 'Content-Type: application/json' \ --data '{ "reason": "example" }'Stop an AirPlay Present session. Requires an Owner or Administrator with the write scope. Cookie-authenticated unsafe requests require X-CSRF-Token. The server commits the stop transition and required Player cleanup commands together. Retry if the server returns 503.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Cookie-backed browser requests only, and only on unsafe methods. Bearer grants never send it.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "reason": "example"}Responses
Section titled “ Responses ”AirPlay session stopped
object
Temporary AirPlay Present session. The PIN appears only while the session is preparing, waiting, or active, and only when the server issued one. Null audio and network ids mean no audio screen and no Presentation Network, respectively.
object
object
Example
{ "data": { "provider": "airplay", "status": "preparing", "targetType": "screen", "transport": "auto", "audioMode": "gateway_only" }}Invalid request body
Dashboard authentication required
Insufficient role or screen scope
AirPlay session not found
Stop reason too long
Stop transition or required Player cleanup command could not be committed; retry the request