Skip to content
Get started

Cancel or Terminate the media session

DELETE/webrtc/sessions/{mediaSessionId}

Cancel a 1-1 media session (as originator), Decline a 1-1 media session (as receiver), Terminate a 1-1 an ongoing media session ** The client shall construct the API path using the mediaSessionId supplied in the session creation response (origination) or in the invitation notification (termination). **’

Path ParametersExpand Collapse
mediaSessionId: string
Header ParametersExpand Collapse
"x-correlator": optional string

Cancel or Terminate the media session

curl https://api.example.com/camara/webrtc/sessions/$MEDIA_SESSION_ID \
    -X DELETE \
    -H "Authorization: Bearer $CAMARA_BEARER_TOKEN"
{
  "status": 400,
  "code": "INVALID_ARGUMENT",
  "message": "Client specified an invalid argument, request body or query param."
}
{
  "status": 400,
  "code": "OUT_OF_RANGE",
  "message": "Client specified an invalid range."
}
{
  "status": 401,
  "code": "UNAUTHENTICATED",
  "message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}
{
  "status": 403,
  "code": "PERMISSION_DENIED",
  "message": "Client does not have sufficient permissions to perform this action."
}
{
  "status": 403,
  "code": "INVALID_TOKEN_CONTEXT",
  "message": "originator info is not consistent with access token."
}
{
  "status": 404,
  "code": "NOT_FOUND",
  "message": "The specified resource is not found."
}
{
  "status": 404,
  "code": "IDENTIFIER_NOT_FOUND",
  "message": "Device identifier not found."
}
Returns Examples
{
  "status": 400,
  "code": "INVALID_ARGUMENT",
  "message": "Client specified an invalid argument, request body or query param."
}
{
  "status": 400,
  "code": "OUT_OF_RANGE",
  "message": "Client specified an invalid range."
}
{
  "status": 401,
  "code": "UNAUTHENTICATED",
  "message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}
{
  "status": 403,
  "code": "PERMISSION_DENIED",
  "message": "Client does not have sufficient permissions to perform this action."
}
{
  "status": 403,
  "code": "INVALID_TOKEN_CONTEXT",
  "message": "originator info is not consistent with access token."
}
{
  "status": 404,
  "code": "NOT_FOUND",
  "message": "The specified resource is not found."
}
{
  "status": 404,
  "code": "IDENTIFIER_NOT_FOUND",
  "message": "Device identifier not found."
}