Skip to content

Latest commit

 

History

History
334 lines (236 loc) · 10.1 KB

File metadata and controls

334 lines (236 loc) · 10.1 KB

EndpointsApi

All URIs are relative to http://localhost

Method HTTP request Description
createEndpoint POST /accounts/{accountId}/endpoints Create Endpoint
deleteEndpoint DELETE /accounts/{accountId}/endpoints/{endpointId} Delete Endpoint
getEndpoint GET /accounts/{accountId}/endpoints/{endpointId} Get Endpoint
listEndpoints GET /accounts/{accountId}/endpoints List Endpoints
updateEndpointBxml PUT /accounts/{accountId}/endpoints/{endpointId}/bxml Update Endpoint BXML

createEndpoint

CreateEndpointResponse createEndpoint(body)

Creates a new Endpoint for the specified account.

Example

import {
    EndpointsApi,
    Configuration
} from 'bandwidth-sdk';

const configuration = new Configuration();
const apiInstance = new EndpointsApi(configuration);

let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let body: CreateWebRtcConnectionRequest; //

const { status, data } = await apiInstance.createEndpoint(
    accountId,
    body
);

Parameters

Name Type Description Notes
body CreateWebRtcConnectionRequest
accountId [string] Your Bandwidth Account ID. defaults to undefined

Return type

CreateEndpointResponse

Authorization

Basic, OAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - The number of seconds the client should wait before making another request.
500 Service Unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteEndpoint

deleteEndpoint()

Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated.

Example

import {
    EndpointsApi,
    Configuration
} from 'bandwidth-sdk';

const configuration = new Configuration();
const apiInstance = new EndpointsApi(configuration);

let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let endpointId: string; //BRTC Endpoint ID. (default to undefined)

const { status, data } = await apiInstance.deleteEndpoint(
    accountId,
    endpointId
);

Parameters

Name Type Description Notes
accountId [string] Your Bandwidth Account ID. defaults to undefined
endpointId [string] BRTC Endpoint ID. defaults to undefined

Return type

void (empty response body)

Authorization

Basic, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - The number of seconds the client should wait before making another request.
500 Service Unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEndpoint

EndpointResponse getEndpoint()

Returns information about the specified endpoint.

Example

import {
    EndpointsApi,
    Configuration
} from 'bandwidth-sdk';

const configuration = new Configuration();
const apiInstance = new EndpointsApi(configuration);

let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let endpointId: string; //BRTC Endpoint ID. (default to undefined)

const { status, data } = await apiInstance.getEndpoint(
    accountId,
    endpointId
);

Parameters

Name Type Description Notes
accountId [string] Your Bandwidth Account ID. defaults to undefined
endpointId [string] BRTC Endpoint ID. defaults to undefined

Return type

EndpointResponse

Authorization

Basic, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - The number of seconds the client should wait before making another request.
500 Service Unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listEndpoints

ListEndpointsResponse listEndpoints()

Returns a list of endpoints associated with the specified account.

Example

import {
    EndpointsApi,
    Configuration
} from 'bandwidth-sdk';

const configuration = new Configuration();
const apiInstance = new EndpointsApi(configuration);

let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let type: EndpointTypeEnum; //The type of endpoint. (optional) (default to undefined)
let status: EndpointStatusEnum; //The status of the endpoint. (optional) (default to undefined)
let afterCursor: string; //The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) (default to undefined)
let limit: number; //The maximum number of endpoints to return in the response. (optional) (default to 100)

const { status, data } = await apiInstance.listEndpoints(
    accountId,
    type,
    status,
    afterCursor,
    limit
);

Parameters

Name Type Description Notes
accountId [string] Your Bandwidth Account ID. defaults to undefined
type EndpointTypeEnum The type of endpoint. (optional) defaults to undefined
status EndpointStatusEnum The status of the endpoint. (optional) defaults to undefined
afterCursor [string] The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) defaults to undefined
limit [number] The maximum number of endpoints to return in the response. (optional) defaults to 100

Return type

ListEndpointsResponse

Authorization

Basic, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - The number of seconds the client should wait before making another request.
500 Service Unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateEndpointBxml

updateEndpointBxml(body)

Updates the BXML for the specified endpoint.

Example

import {
    EndpointsApi,
    Configuration
} from 'bandwidth-sdk';

const configuration = new Configuration();
const apiInstance = new EndpointsApi(configuration);

let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let endpointId: string; //BRTC Endpoint ID. (default to undefined)
let body: string; //

const { status, data } = await apiInstance.updateEndpointBxml(
    accountId,
    endpointId,
    body
);

Parameters

Name Type Description Notes
body string
accountId [string] Your Bandwidth Account ID. defaults to undefined
endpointId [string] BRTC Endpoint ID. defaults to undefined

Return type

void (empty response body)

Authorization

Basic, OAuth2

HTTP request headers

  • Content-Type: application/xml
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
405 Method Not Allowed -
415 Unsupported Media Type -
429 Too Many Requests * Retry-After - The number of seconds the client should wait before making another request.
500 Service Unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]