From bfdf593301a5e710f711e1f4c8cbd2666d9b6ed9 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Thu, 12 Oct 2023 14:18:57 +0000 Subject: [PATCH] Add Code Snippets to Spec Files --- site/specs/emergency.yml | 2913 ++++++++++++ site/specs/messaging.yml | 452 +- site/specs/multi-factor-auth.yml | 303 +- site/specs/numbers.yml | 210 +- site/specs/numbers_v2.yml | 7031 +++++++++++++++++----------- site/specs/phone-number-lookup.yml | 166 +- site/specs/voice.yml | 1776 +++---- site/specs/webrtc.yml | 2019 -------- 8 files changed, 8687 insertions(+), 6183 deletions(-) create mode 100644 site/specs/emergency.yml diff --git a/site/specs/emergency.yml b/site/specs/emergency.yml new file mode 100644 index 000000000..eca455ab5 --- /dev/null +++ b/site/specs/emergency.yml @@ -0,0 +1,2913 @@ +openapi: 3.0.3 +info: + title: Unified Emergency Services Provisioning API + version: 1.0.0 + termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/ + description: >- + The API specification for Bandwidth’s unified Emergency Services + provisioning API. + + + ## Base URL + + `https://dashboard.bandwidth.com/api/v2/accounts/{accountId}/emergency` + contact: + email: support@bandwidth.com + name: Bandwidth + url: https://support.bandwidth.com +servers: + - url: https://dashboard.bandwidth.com/api/v2/accounts/{accountId}/emergency +paths: + /endpoints: + get: + summary: List Endpoints + operationId: listAllEndpoints + description: List all emergency provisioned endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/addressIdQuery' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listEndpoints' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Endpoints + operationId: addEndpoints + description: Provision new emergency endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/addEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderAddEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Endpoints + operationId: updateEndpoints + description: Update endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/updateEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderUpdateEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Endpoints + operationId: deleteEndpoints + description: Delete emergency endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/deleteEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderDeleteEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /endpoints/{endpointId}: + get: + summary: Get Endpoint + operationId: getEndpoint + description: Get an endpoint. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/getEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Endpoint + operationId: updateEndpoint + description: Get an endpoint. + tags: + - Endpoints + requestBody: + $ref: '#/components/requestBodies/updateEndpoint' + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '202': + $ref: '#/components/responses/provisioningOrderUpdateEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Endpoint + operationId: deleteEndpoint + description: Delete an endpoint. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '202': + $ref: '#/components/responses/provisioningOrderDeleteEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /addresses: + get: + summary: List Addresses + operationId: listAddresses + description: List all emergency addresses. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listAddresses' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Address + operationId: addAddress + description: Provision emergency addresses. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/addAddress' + responses: + '201': + $ref: '#/components/responses/addAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /addresses/{addressId}: + get: + summary: Get Address + operationId: getAddress + description: Get an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/getAddress' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Address + operationId: updateAddress + description: Update an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/updateAddress' + responses: + '200': + $ref: '#/components/responses/updateAddress' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Address + operationId: deleteAddress + description: Delete an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notifications: + get: + summary: List Notifications + operationId: listNotifications + description: List all emergency notifications. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/listNotifications' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Notification + operationId: addNotification + description: Add emergency notification. + tags: + - Notifications + requestBody: + $ref: '#/components/requestBodies/addNotification' + responses: + '201': + $ref: '#/components/responses/addNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notifications/{notificationId}: + get: + summary: Get Notification + operationId: getNotification + description: Get an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/getNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Notification + operationId: updateNotification + description: Update an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + requestBody: + $ref: '#/components/requestBodies/updateNotification' + responses: + '200': + $ref: '#/components/responses/updateNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Notification + operationId: deleteNotification + description: Delete an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notificationGroups: + get: + summary: List Notification Groups + operationId: listNotificationsGroups + description: List emergency notification groups. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/listNotificationGroups' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Notification Group + operationId: addNotificationGroup + description: Add emergency notification group. + tags: + - Notification Groups + requestBody: + $ref: '#/components/requestBodies/addNotificationGroup' + responses: + '201': + $ref: '#/components/responses/addNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notificationGroups/{groupId}: + get: + summary: Get Notification Group + operationId: getNotificationGroup + description: Get emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + responses: + '200': + $ref: '#/components/responses/getNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Notification Group + operationId: updateNotificationGroup + description: Update emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + requestBody: + $ref: '#/components/requestBodies/updateNotificationGroup' + responses: + '200': + $ref: '#/components/responses/updateNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Notification Group + operationId: deleteNotificationGroup + description: Delete emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders: + get: + summary: List Orders + operationId: listOrders + description: List all emergency orders. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderType' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrders' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders/{orderId}/details: + get: + summary: Get Order Details + operationId: getOrderDetails + description: Get emergency order details. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderId' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrderDetails' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders/{orderId}/history: + get: + summary: Get Order History + operationId: getOrderHistory + description: Get emergency order History. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrderHistory' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' +components: + schemas: + addEndpoints: + title: Add Endpoints + description: Add Endpoints. + type: object + properties: + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: home + phoneNumber: + type: string + example: '+16175551212' + pattern: >- + ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Bob + lang: + type: string + example: en + country: + type: string + example: US + addressId: + type: string + example: '7888993' + updateEndpoints: + title: Update Endpoints + description: Update Endpoints. + type: object + properties: + action: + $ref: '#/components/schemas/updateAction' + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: '1606772208758' + pattern: ^\S*$ + addressId: + type: string + example: '7888993' + pattern: ^\S*$ + deleteEndpoints: + title: Delete Endpoints + description: Delete Endpoints. + type: object + properties: + endpointIds: + type: array + items: + type: string + example: + - '1606772208758' + updateEndpoint: + title: Update Endpoint + description: Update Endpoint. + type: object + properties: + action: + $ref: '#/components/schemas/updateAction' + addressId: + type: string + example: '7888993' + addAddressRequest: + title: Add Address Request + description: Add Address Request. + type: object + properties: + id: + type: string + example: home_office + pattern: ^\S*$ + description: + type: string + example: Home office, downstairs + addressLine1: + type: string + example: 14111 NE 145th St + addressLine2: + type: string + example: Apt. 8 + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + customerType: + $ref: '#/components/schemas/customerType' + service: + $ref: '#/components/schemas/service' + district: + type: string + example: '' + companyName: + type: string + example: '' + firstName: + type: string + example: '' + lastName: + type: string + example: '' + floor: + type: string + example: '' + title: + type: string + example: '' + county: + type: string + example: '' + std: + type: string + example: '' + description: Subscriber Trunk Dialing + buildingName: + type: string + example: '' + houseNumberLetter: + type: string + example: '' + telephoneBook: + type: string + example: '' + contactFirstName: + type: string + example: '' + contactLastName: + type: string + example: '' + contactPhoneNumber: + type: string + example: '' + province: + type: string + example: '' + buildingLocation: + type: string + example: '' + buildingType: + type: string + example: '' + flatNumber: + type: string + example: '' + flatNumberLetter: + type: string + example: '' + floorLetter: + type: string + example: '' + floorType: + type: string + example: '' + secondaryHouseNumber: + type: string + example: '' + secondaryHouseNumberLetter: + type: string + example: '' + secondaryStreetType: + type: string + example: '' + secondFlatNumber: + type: string + example: '' + secondFlatNumberLetter: + type: string + example: '' + streetSuffix: + type: string + example: '' + streetType: + type: string + example: '' + addressSupplement: + type: string + example: '' + birthDate: + type: string + example: '' + birthPlace: + type: string + example: '' + block: + type: string + example: '' + commune: + type: string + example: '' + description: Community name using local name/spelling + companyLegalName: + type: string + example: '' + companyNameAddition: + type: string + example: '' + companyNumber: + type: string + example: '' + companyType: + type: string + example: '' + contactLanguage: + type: string + example: '' + documentNumber: + type: string + example: '' + door: + type: string + example: '' + email: + type: string + example: '' + entrance: + type: string + example: '' + foreignCity: + type: string + example: '' + foreignCountry: + type: string + example: '' + foreignStreet: + type: string + example: '' + houseNumberAddition: + type: string + example: '' + idNumber: + type: string + example: '' + idType: + type: string + example: '' + inseeCode: + type: string + example: '' + description: >- + is a numerical indexing code used by the French National Institute + for Statistics and Economic Studies + language: + type: string + example: '' + latitude: + type: string + example: '' + listingLanguage: + type: string + example: '' + longitude: + type: string + example: '' + middleName: + type: string + example: '' + municipality: + type: string + example: '' + municipalityCode: + type: string + example: '' + naceCode: + type: string + example: '' + description: Standard European nomenclature of productive economic activities + officialMunicipalityKey: + type: string + example: '' + poBox: + type: string + example: '' + postalDesignation: + type: string + example: '' + prepaidPhonecard: + type: boolean + example: false + description: Is the TN for a a prepaid phonecard? + profession: + type: string + example: '' + ruianAddressCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianBuildingCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianRegionCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianResidenceUnitCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianStreetCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianTownCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + secondLastName: + type: string + example: '' + siretNumber: + type: string + example: '' + description: >- + a 14-digit identifier that includes the SIREN number and an + additional five-digit number that represents the specific location + or establishment of the business + socialSecurityNumber: + type: string + example: '' + streetCode: + type: string + example: '' + taxNumber: + type: string + example: '' + taxOffice: + type: string + example: '' + tranditionalName: + type: string + example: '' + vatNumber: + type: string + example: '' + description: Value Added Tax ID Number + friendlyName: + type: string + example: '' + updateAddressRequest: + title: Update Address Request + description: Update Address Request. + type: object + properties: + addressLine1: + type: string + example: 14024 NE 181st St + description: + type: string + example: Home office, upstairs + notificationsRequest: + title: notifications Request + description: notifications Request. + type: object + properties: + id: + type: string + example: Notification1 + pattern: ^\S*$ + type: + $ref: '#/components/schemas/notificationType' + recipient: + type: string + example: test1@bandwidth.com + password: + type: string + example: '' + username: + type: string + example: '' + updateNotification: + title: notifications Request + description: notifications Request. + type: object + properties: + type: + $ref: '#/components/schemas/notificationType' + recipient: + type: string + example: test1@bandwidth.com + password: + type: string + example: '' + username: + type: string + example: '' + notificationGroupRequest: + title: Notification Groups Request + description: Notification Groups Request. + type: object + properties: + id: + type: string + example: NotificationGroup1 + pattern: ^\S*$ + description: + type: string + example: Notification Group 1 + endpoints: + type: array + items: + type: string + example: + - '48658456485' + notifications: + type: array + items: + type: string + example: + - '85485345848' + updateNotificationGroup: + title: Notification Groups Update Request + description: Notification Groups Update Request. + type: object + properties: + description: + type: string + example: Update Group No. 1 + notificationIdsToAdd: + type: array + items: + type: string + example: + - '85485345848' + notificationIdsToDelete: + type: array + items: + type: string + example: + - '85485342348' + provisioningOrderAddEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeAdd' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + provisioningOrderDeleteEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeDelete' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + provisioningOrderUpdateEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeUpdate' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + listEndpoints: + title: List Endpoints + description: List Endpoints. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: Joe's_Home_tn + accountId: + type: string + example: '5001232' + phoneNumber: + type: string + example: '+13035554321' + pattern: >- + ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Joe's Home + lang: + type: string + example: fr + created: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + updated: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + country: + type: string + example: US + addressId: + type: string + example: '7888993' + endpointResponse: + title: Get Endpoint + description: Get an endpoint. + type: object + properties: + id: + type: string + example: '283746343284623684' + accountId: + type: string + example: '5001232' + phoneNumber: + type: string + example: '+13035554321' + pattern: ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Joe's Home + lang: + type: string + example: fr + created: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + updated: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + country: + type: string + example: US + addressId: + type: string + example: '7888993' + listAddresses: + title: List Addresses + description: List Addresses. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + example: + - href: /relative/uri + rel: RelatedResource + method: GET + addresses: + type: array + items: + type: object + properties: + id: + type: string + example: '7888993' + pattern: ^\S*$ + validationStatus: + $ref: '#/components/schemas/validationStatus' + address: + type: string + example: 4916 NE 145th St + houseNumber: + type: string + example: '14111' + predirectional: + type: string + example: NE + postdirectional: + type: string + example: '' + streetName: + type: string + example: 145th + streetSuffix: + type: string + example: ST + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + description: + type: string + example: Home office, downstairs + latitude: + type: number + example: 47.732682 + longitude: + type: number + example: -122.155174 + created: + type: string + format: date-time + example: '2015-03-11T04:09:25.399Z' + updated: + type: string + format: date-time + example: '2016-03-11T04:09:25.399Z' + addressResponse: + title: Address Response + description: Address Response. + type: object + properties: + id: + type: string + example: homeoffice + pattern: ^\S*$ + description: Unique identifier for an address + validationStatus: + $ref: '#/components/schemas/validationStatus' + address: + type: string + example: 14024 NE 181st St + description: The full address + houseNumber: + type: string + example: '14024' + predirectional: + type: string + example: NE + description: >- + A word preceding the street name that indicates the directional + taken by the thoroughfare + postdirectional: + type: string + example: '' + description: >- + A word following the street name that indicates the directional + taken by the thoroughfare from an arbitrary strating point, or the + sector where it is located + streetName: + type: string + example: 181st + streetSuffix: + type: string + example: ST + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + description: + type: string + example: Home office, upstairs + latitude: + type: number + example: 47.732682 + longitude: + type: number + example: -122.155174 + created: + type: string + format: date-time + example: '2015-03-11T04:09:25.399Z' + description: when was created + updated: + type: string + format: date-time + example: '2016-03-11T04:09:25.399Z' + description: when was updated last + customerType: + $ref: '#/components/schemas/customerType' + service: + $ref: '#/components/schemas/service' + district: + type: string + example: '' + companyName: + type: string + example: '' + firstName: + type: string + example: '' + lastName: + type: string + example: '' + floor: + type: string + example: '' + title: + type: string + example: '' + county: + type: string + example: '' + std: + type: string + example: '' + description: Subscriber Trunk Dialing + buildingName: + type: string + example: '' + houseNumberLetter: + type: string + example: '' + telephoneBook: + type: string + example: '' + contactFirstName: + type: string + example: '' + contactLastName: + type: string + example: '' + contactPhoneNumber: + type: string + example: '' + province: + type: string + example: '' + buildingLocation: + type: string + example: '' + buildingType: + type: string + example: '' + flatNumber: + type: string + example: '' + flatNumberLetter: + type: string + example: '' + floorLetter: + type: string + example: '' + floorType: + type: string + example: '' + secondaryHouseNumber: + type: string + example: '' + secondaryHouseNumberLetter: + type: string + example: '' + secondaryStreetType: + type: string + example: '' + secondFlatNumber: + type: string + example: '' + secondFlatNumberLetter: + type: string + example: '' + streetType: + type: string + example: '' + addressSupplement: + type: string + example: '' + birthDate: + type: string + example: '' + birthPlace: + type: string + example: '' + block: + type: string + example: '' + commune: + type: string + example: '' + description: Community name using local name/spelling + companyLegalName: + type: string + example: '' + companyNameAddition: + type: string + example: '' + companyNumber: + type: string + example: '' + companyType: + type: string + example: '' + contactLanguage: + type: string + example: '' + documentNumber: + type: string + example: '' + door: + type: string + example: '' + email: + type: string + example: '' + entrance: + type: string + example: '' + foreignCity: + type: string + example: '' + foreignCountry: + type: string + example: '' + foreignStreet: + type: string + example: '' + houseNumberAddition: + type: string + example: '' + idNumber: + type: string + example: '' + idType: + type: string + example: '' + inseeCode: + type: string + example: '' + description: >- + is a numerical indexing code used by the French National Institute + for Statistics and Economic Studies + language: + type: string + example: '' + listingLanguage: + type: string + example: '' + middleName: + type: string + example: '' + municipality: + type: string + example: '' + municipalityCode: + type: string + example: '' + naceCode: + type: string + example: '' + description: Standard European nomenclature of productive economic activities + officialMunicipalityKey: + type: string + example: '' + poBox: + type: string + example: '' + postalDesignation: + type: string + example: '' + prepaidPhonecard: + type: boolean + example: false + description: Is the TN for a a prepaid phonecard? + profession: + type: string + example: '' + ruianAddressCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianBuildingCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianRegionCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianResidenceUnitCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianStreetCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianTownCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + secondLastName: + type: string + example: '' + siretNumber: + type: string + example: '' + description: >- + a 14-digit identifier that includes the SIREN number and an + additional five-digit number that represents the specific location + or establishment of the business + socialSecurityNumber: + type: string + example: '' + streetCode: + type: string + example: '' + taxNumber: + type: string + example: '' + taxOffice: + type: string + example: '' + tranditionalName: + type: string + example: '' + vatNumber: + type: string + example: '' + description: Value Added Tax ID Number + friendlyName: + type: string + example: '' + uicBillingNumber: + type: string + example: '' + listNotifications: + title: List Notifications + description: List Notifications. + type: object + properties: + notifications: + type: array + items: + type: object + properties: + id: + type: string + example: '134314' + pattern: ^\S*$ + accountId: + type: string + example: '6454565654' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 1 + groupCount: + type: integer + minimum: 0 + example: 1 + username: + type: string + example: joejoe + recipient: + type: string + example: joe@c.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: joe22 + notificationResponse: + title: Notification Response + description: Notification Response. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '4545454' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 2 + username: + type: string + example: '' + recipient: + type: string + example: joe@f.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: username 1 + getNotification: + title: Get Notification + description: Get Notification. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '566565' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 3 + username: + type: string + example: d + recipient: + type: string + example: recipient@email.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: joe33 + listNotificationGroups: + title: Get Notification Groups + description: Get Notification Groups. + type: object + properties: + notificationGroups: + type: array + items: + type: object + properties: + id: + type: string + example: '4334343' + pattern: ^\S*$ + accountId: + type: string + example: '34343434' + created: + type: string + format: date-time + example: '2023-01-22T09:33:36.208Z' + description: + type: string + example: Notification Group 1 + endpointCount: + type: integer + minimum: 0 + example: 0 + endpointIds: + type: array + items: + type: string + example: + - '793629347' + - '793629324' + notificationIds: + type: array + items: + type: string + example: + - '34343434' + updated: + type: string + format: date-time + example: '2023-01-22T09:33:36.208Z' + updatedBy: + type: string + example: Joe + notificationGroups: + title: Notification Group + description: Notification Group. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '3434343' + created: + type: string + format: date-time + example: '2023-01-22T10:12:17.506Z' + description: + type: string + example: Notification Group 3 + endpointCount: + type: integer + example: 1 + endpointIds: + type: array + items: + type: string + example: + - '2243432443' + notificationIds: + type: array + items: + type: string + example: + - '2243432443' + updated: + type: string + format: date-time + example: '2023-01-22T10:12:17.506Z' + updatedBy: + type: string + example: JJ + listOrders: + title: Get Orders + description: Get Orders. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + orders: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174003 + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeAdd' + status: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + listOrderDetails: + title: List Order Details + description: List Order Details. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + id: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeAdd' + status: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: '4525324234324' + pattern: ^\S*$ + updatedBy: + type: string + example: JJ + status: + $ref: '#/components/schemas/endpointStatus' + error: + type: string + example: A reason + errorCode: + type: string + example: XXX + listOrderHistory: + title: List Order History + description: List Order History. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + id: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86845c534aad + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeUpdate' + status: + $ref: '#/components/schemas/orderStatus' + created: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + orderHistory: + type: array + items: + type: object + properties: + status: + $ref: '#/components/schemas/orderStatus' + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + updatedBy: + type: string + example: JJ + note: + type: string + example: message + genericError: + title: Generic Error + type: object + properties: + errors: + type: array + items: + $ref: '#/components/schemas/error' + nullable: true + required: + - errors + links: + title: Links + type: object + properties: + href: + type: string + description: URI of the link. + example: /relative/uri + rel: + type: string + description: Specifies the relationship between this link and the resource. + example: RelatedResource + method: + type: string + description: HTTP method to be used. + example: GET + error: + title: Error + type: object + properties: + id: + type: string + description: A unique identifier for this particular instance of this problem. + example: optional-error-id + pattern: ^\S*$ + type: + type: string + description: >- + A short, human-readable summary of the problem that SHOULD NOT + change from occurrence to occurrence of the problem. + example: REQUEST_ERROR + description: + type: string + description: >- + A human-readable explanation that SHOULD be specific to this + occurrence of the problem. + example: There was an issue with a field in your request body + code: + type: integer + format: int32 + description: >- + An application-specific error code for services with extensive error + scenarios to supplement `description`. + minimum: 4 + example: 51130 + source: + $ref: '#/components/schemas/errorSource' + meta: + $ref: '#/components/schemas/errorMeta' + required: + - description + errorSource: + title: Error Source + type: object + properties: + parameter: + type: string + description: A string indicating which URI query parameter caused the error. + example: someParameter + field: + type: string + description: A string indicating which request body field caused the error. + example: someField + header: + type: string + description: A string indicating which header field caused the error. + example: someHeader + reference: + type: string + description: >- + A string that references a resource ID or path to the resource (or + non-existent resource) causing the error. + example: /some/reference + errorMeta: + title: Error Meta + type: object + properties: + message: + type: string + example: An optional metadata field + service: + type: string + enum: + - ES + - DS + - ESDS + example: ES + description: Emergency services, directory services, or both + customerType: + type: string + enum: + - RES + - BUS + example: BUS + description: Residential or Business + updateAction: + type: string + enum: + - PROVISION + - UNPROVISION + example: PROVISION + notificationType: + type: string + enum: + - HTTP + - SMS + - EMAIL + - VOICE + example: EMAIL + orderTypeAdd: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: ADD_ENDPOINTS + orderTypeUpdate: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: UPDATE_ENDPOINTS + orderTypeDelete: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: DELETE_ENDPOINTS + orderStatus: + type: string + enum: + - RECEIVED + - PROCESSING + - COMPLETED + - PARTIAL + - FAILED + example: COMPLETED + validationStatus: + type: string + enum: + - VALID + - INVALID + - UNVALIDATED + example: INVALID + description: Address is valid and represents a location + endpointStatus: + type: string + enum: + - INPROGRESS + - SUCCESS + - ERROR + example: INPROGRESS + region: + type: string + enum: + - NA + - ROW + example: NA + requestBodies: + addEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/addEndpoints' + description: Provision new endpoints and link them to an address using address id. + updateEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEndpoints' + description: >- + Update endpoints context, associate (PROVISION) or dissociate + (UNPROVISION) address using an address id. + updateEndpoint: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEndpoint' + description: >- + Update endpoint context, associate (PROVISION) or dissociate + (UNPROVISION) address using an address id. + deleteEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/deleteEndpoints' + description: Delete endpoints. + addAddress: + content: + application/json: + schema: + $ref: '#/components/schemas/addAddressRequest' + examples: + usaAddAddressRequest: + $ref: '#/components/examples/usaAddAddressRequest' + gbrAddAddressRequest: + $ref: '#/components/examples/gbrAddAddressRequest' + description: Add addresses, pick an id or leave id out to autogenerate one. + updateAddress: + content: + application/json: + schema: + $ref: '#/components/schemas/updateAddressRequest' + addNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/notificationsRequest' + updateNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/updateNotification' + addNotificationGroup: + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroupRequest' + updateNotificationGroup: + content: + application/json: + schema: + $ref: '#/components/schemas/updateNotificationGroup' + responses: + provisioningOrderAddEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderAddEndpoint' + provisioningOrderUpdateEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderUpdateEndpoint' + provisioningOrderDeleteEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderDeleteEndpoint' + listEndpoints: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listEndpoints' + examples: + listEndpoints: + $ref: '#/components/examples/listEndpoints' + getEndpoint: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/endpointResponse' + listAddresses: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listAddresses' + examples: + listAddresses: + $ref: '#/components/examples/listAddresses' + addAddressResponse: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + getAddress: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + noContentResponse: + description: No Content. + updateAddress: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + listNotifications: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listNotifications' + addNotification: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationResponse' + getNotification: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/getNotification' + updateNotification: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationResponse' + listNotificationGroups: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listNotificationGroups' + getNotificationGroup: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + addNotificationGroup: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + updateNotificationGroup: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + listOrders: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrders' + examples: + listOrders: + $ref: '#/components/examples/listOrders' + listOrderDetails: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrderDetails' + examples: + listOrderDetails: + $ref: '#/components/examples/listOrderDetails' + listOrderHistory: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrderHistory' + examples: + listOrderHistory: + $ref: '#/components/examples/listOrderHistory' + badRequestError: + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + badRequestErrorExample: + $ref: '#/components/examples/badRequestErrorExample' + notFoundError: + description: Not Found. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + notFoundErrorExample: + $ref: '#/components/examples/notFoundErrorExample' + notAllowedError: + description: Method Not Allowed. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + notAllowedErrorExample: + $ref: '#/components/examples/notAllowedErrorExample' + tooManyRequestsError: + description: Too Many Requests. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/tooManyRequestsErrorExample' + internalServerError: + description: Internal Server Error. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + internalServerErrorExample: + $ref: '#/components/examples/internalServerErrorExample' + forbiddenError: + description: Forbidden. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + forbiddenErrorExample: + $ref: '#/components/examples/forbiddenErrorExample' + unauthorizedError: + description: Unauthorized. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + unauthorizedErrorExample: + $ref: '#/components/examples/unauthorizedErrorExample' + parameters: + endpointId: + name: endpointId + in: path + required: true + schema: + type: string + description: String that identifies an endpoint. + addressIdQuery: + name: addressId + in: query + required: false + schema: + type: string + description: Unique ID for an address. + limit: + name: limit + in: query + required: false + schema: + type: string + description: Limit the number of returned record. + orderId: + name: orderId + in: path + required: true + schema: + type: string + description: UUID for orders. + notificationId: + name: notificationId + in: path + required: true + schema: + type: string + description: Unique emergency notification ID. + groupId: + name: groupId + in: path + required: true + schema: + type: integer + description: Unique emergency notification group ID. + orderType: + name: orderType + in: query + required: false + schema: + $ref: '#/components/schemas/orderTypeAdd' + description: Emergency order type filter. + addressId: + name: addressId + in: path + required: true + schema: + type: string + description: Address Id. + offset: + name: offset + in: query + description: Position in the dataset of a particular record to start the response. + schema: + type: integer + example: 100 + region: + name: region + in: query + required: false + schema: + $ref: '#/components/schemas/region' + description: List resources filtered by region + examples: + listEndpoints: + summary: Get Endpoints + value: + links: + - href: /endpoints + rel: self + method: GET + - href: /endpoints + rel: first + method: GET + - href: /endpoints?offset=99000&limit=1000 + rel: last + method: GET + - href: '' + rel: prev + method: GET + - href: /endpoints?offset=1000&limit=1000 + rel: next + method: GET + endpoints: + - id: '82734632846238746' + accountId: '5001232' + phoneNumber: '+13035554321' + name: Joe's Home + lang: fr + created: '2016-06-22T16:33:21.959Z' + updated: '2016-06-22T16:33:21.959Z' + country: US + addressId: '7888993' + - id: JDF9223kslemm23432 + accountId: '5001232' + phoneNumber: '+13035554322' + name: Joe's Office + lang: en + created: '2015-03-11T04:09:25.399Z' + updated: '2016-06-22T16:33:27.980Z' + country: US + addressId: cafoffice + listAddresses: + summary: List Addresses + value: + links: + - href: /addresses + rel: self + method: GET + - href: /addresses + rel: first + method: GET + - href: /addresses?offset=99000&limit=1000 + rel: last + method: GET + - href: '' + rel: prev + method: GET + - href: /addresses?offset=1000&limit=1000 + rel: next + method: GET + addresses: + - id: '7888993' + validationStatus: VALID + address: 4916 NE 145th St + houseNumber: '4916' + predirectional: NE + postdirectional: '' + streetName: 145th + streetSuffix: ST + city: Woodinville + state: WA + postalCode: '98072' + country: US + description: Home office, downstairs + latitude: 47.732682 + longitude: -122.155174 + created: '2015-03-11T04:09:25.399Z' + updated: '2016-06-22T16:33:27.980Z' + - id: cafoffice + validationStatus: INVALID + address: 4916 S Angeline St + houseNumber: '4916' + predirectional: S + postdirectional: '' + streetName: Angeline + streetSuffix: ST + city: Seattle + state: WA + postalCode: '98118' + country: US + description: Office by cafeteria + latitude: 47.560154 + longitude: -122.271105 + created: '2015-03-11T04:09:28.819Z' + updated: '2016-06-22T16:33:27.980Z' + usaAddAddressRequest: + summary: Add a US Address + value: + id: home_office + description: Home office, downstairs + addressLine1: 14111 NE 145th St + addressLine2: Apt. 8 + city: Woodinville + state: WA + postalCode: '98072' + country: US + gbrAddAddressRequest: + summary: Add a GBR Address + value: + id: london_office + friendlyName: London office + companyName: Jones + service: ES + customerType: BUS + addressLine1: 102-104 Albert Street + city: London + postalCode: NW1 7NE + country: BGR + usaAddressResponse: + summary: USA Address Response + value: + id: homeoffice + validationStatus: INVALID + address: 14024 NE 181st St + houseNumber: '14024' + predirectional: NE + postdirectional: '' + streetName: 181st + streetSuffix: ST + city: Woodinville + state: WA + postalCode: '98072' + country: US + description: Home office, upstairs + latitude: 47.732682 + longitude: -122.155174 + created: '2015-03-11T04:09:25.399Z' + updated: '2016-03-11T04:09:25.399Z' + gbrAddressResponse: + summary: GBR Address Response + value: + id: london_office_01 + validationStatus: UNVALIDATED + friendlyName: London office + customerType: BUS + service: ES + houseNumber: 102-104 + streetName: ALBERT STREET + streetType: STREET + city: LONDON + postalCode: NW1 7NE + country: GBR + created: '2023-09-26T17:37:10.432Z' + updated: '2023-09-26T17:37:10.432Z' + listOrders: + summary: Get Orders + value: + links: + - href: /orders + rel: self + method: GET + - href: /orders + rel: first + method: GET + - href: /orders?offset=99000&limit=1000 + rel: last + method: GET + - href: /orders + rel: prev + method: GET + - href: /orders?offset=1000&limit=1000 + rel: next + method: GET + orders: + - id: 08e0be9a-52fd-45a0-be2e-86825c534aad + type: ADD_ENDPOINTS + status: COMPLETED + acceptedCount: 1 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 1 + - id: 08e0be9a-52fd-45a0-be2e-96835c534aad + type: UPDATE_ENDPOINTS + status: COMPLETED + acceptedCount: 3 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 3 + listOrderDetails: + summary: List Order Details + value: + links: + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: self + method: GET + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: first + method: GET + - href: >- + /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad?offset=99000&limit=1000 + rel: last + method: GET + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: prev + method: GET + - href: >- + /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad?offset=1000&limit=1000 + rel: next + method: GET + id: 08e0be9a-52fd-45a0-be2e-86825c537aad + type: DELETE_ENDPOINTS + status: COMPLETED + acceptedCount: 1 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 1 + endpoints: + - id: '263946349349374' + updatedBy: JJ + status: INPROGRESS + error: A reason + errorCode: XXX + - id: '2945239843274934' + updatedBy: JJ + status: SUCCESS + error: A reason + errorCode: DDD + listOrderHistory: + summary: List Order History + value: + id: 08e0be9a-52fd-45a0-be2e-86825c734aad + type: ADD_ENDPOINTS + status: COMPLETED + created: '2022-01-18T08:57:04Z' + orderHistory: + - status: RECEIVED + updatedBy: JJ + updated: '2022-05-18T08:57:04Z' + note: message + - status: PROCESSING + updatedBy: JJ + updated: '2022-05-18T08:58:04Z' + note: message + - status: COMPLETED + updatedBy: JJ + updated: '2022-05-18T08:59:04Z' + note: message + badRequestErrorExample: + summary: An example of a generic Bad Request Error + value: + errors: + - id: optional-error-id + type: bad-request + description: There was an issue with your request. + code: 205617 + pattern: ^\S*$ + unauthorizedErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - id: optional-error-id + type: authentication-credentials + description: Invalid or missing credentials. + code: 206401 + pattern: ^\S*$ + forbiddenErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - id: optional-error-id + type: resource-permissions + description: User does not have permissions to access this resource. + code: 109107 + notFoundErrorExample: + summary: An example of a generic Not Found Error + value: + errors: + - id: optional-error-id + type: resource-not-found + description: The resource specified cannot be found. + code: 50420 + notAllowedErrorExample: + summary: An example of a generic Not Allowed Error + value: + errors: + - id: optional-error-id + type: http-method-not-supported + description: The HTTP method used is not supported by this resource. + code: 205621 + meta: + method: TRACE + tooManyRequestsErrorExample: + summary: An example of a generic Too Many Requests Error + value: + errors: + - id: optional-error-id + type: rate-limiting + description: >- + Rate limit exceeded. Wait for the time specified in the + 'Retry-After' header before sending another request. + code: 32002 + internalServerErrorExample: + summary: An example of a generic Internal Server Error + value: + errors: + - id: optional-error-id + type: internal-server-error + description: >- + Unexpected internal server error. Contact Bandwidth Customer + Support if this problem persists. + code: 32030 + securitySchemes: + Basic: + type: http + scheme: basic + description: >- + Basic authentication is a simple authentication scheme built into the + HTTP protocol. To use it, send your HTTP requests with an Authorization + header that contains the word Basic followed by a space and a + base64-encoded string `username:password`. + + Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + Token: + type: http + scheme: bearer + bearerFormat: JWT + ApiKey: + type: apiKey + in: header + name: apikey +security: + - Basic: [] + - Token: [] + - ApiKey: [] +tags: + - name: Endpoints + - name: Addresses + - name: Notifications + - name: Notification Groups + - name: Orders diff --git a/site/specs/messaging.yml b/site/specs/messaging.yml index de4129a53..eeea306fa 100644 --- a/site/specs/messaging.yml +++ b/site/specs/messaging.yml @@ -83,29 +83,36 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.messaging.models.Media; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MediaApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; import java.util.List; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + MediaApi apiInstance = new MediaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String continuationToken = "1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39"; // String | Continuation token used to retrieve subsequent media. try { - CompletableFuture>> completableFuture = client.getMessagingClient().getAPIController().listMediaAsync(ACCOUNT_ID, null); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + List result = apiInstance.listMedia(accountId, continuationToken); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MediaApi#listMedia"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -186,24 +193,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Messaging + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" - ) - messaging_client = bandwidth_client.messaging_client.client + api_instance = Bandwidth::MediaApi.new + account_id = '12345' begin - media = messaging_client.list_media("12345") - media.data.each { |item| - puts item.media_name - } - rescue APIException => e - puts e.response_code + result = api_instance.list_media(account_id) + result.each do |item| + p item.media_name + end + rescue Bandwidth::ApiError => e + p "Error when calling MediaApi->list_media: #{e}" end /users/{accountId}/media/{mediaId}: get: @@ -276,30 +282,37 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MediaApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.io.InputStream; + import java.io.File; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String mediaId = "media-id-123"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + MediaApi apiInstance = new MediaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. try { - CompletableFuture> completableFuture = client.getMessagingClient().getAPIController().getMediaAsync(ACCOUNT_ID, mediaId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + File result = apiInstance.getMedia(accountId, mediaId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MediaApi#getMedia"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -387,24 +400,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Messaging + require 'bandwidth-sdk' + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" - ) - messaging_client = bandwidth_client.messaging_client.client + api_instance = Bandwidth::MediaApi.new + account_id = '12345' + media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' begin - downloaded_media = messaging_client.get_media("12345", ENV['MEDIA_ID']) - f = File.open("file_to_write", "wb") - f.puts(downloaded_media.data) - f.close() - rescue APIException => e - puts e.response_code + result = api_instance.get_media(account_id, media_id) + f = File.open('file_to_write', 'wb') + f.p(result) + f.close + rescue Bandwidth::ApiError => e + p "Error when calling MediaApi->get_media: #{e}" end put: summary: Upload Media @@ -498,32 +510,38 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.utilities.FileWrapper; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MediaApi; import java.io.File; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String mediaId = "media-id-123"; - FileWrapper fileWrapper = new FileWrapper(new File("/path/to/file")); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + MediaApi apiInstance = new MediaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. + File body = new File("/path/to/file"); // File | + String contentType = "audio/wav"; // String | The media type of the entity-body. + String cacheControl = "no-cache"; // String | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. try { - CompletableFuture> completableFuture = client.getMessagingClient().getAPIController().uploadMediaAsync(ACCOUNT_ID, mediaId, fileWrapper, "content/type", "no-cache"); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.uploadMedia(accountId, mediaId, body, contentType, cacheControl); + } catch (ApiException e) { + System.err.println("Exception when calling MediaApi#uploadMedia"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -646,31 +664,26 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Messaging + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" - ) - messaging_client = bandwidth_client.messaging_client.client + api_instance = Bandwidth::MediaApi.new + account_id = '12345' + media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' + body = '12345' + opts = { + content_type: 'application/octet-stream', + cache_control: 'no-cache' + } begin - #f = File.open("some_file", "rb") - #file_content = f.read - file_content = "12345" - messaging_client.upload_media( - "12345", - ENV['MEDIA_ID'], - file_content, - :content_type => "application/octet-stream", - :cache_control => "no-cache" - ) - f.close() - rescue APIException => e - puts e.response_code + api_instance.upload_media(account_id, media_id, body, opts) + rescue Bandwidth::ApiError => e + p "Error when calling MediaApi->upload_media: #{e}" end delete: summary: Delete Media @@ -747,32 +760,36 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.messaging.models.BandwidthMessage; - import com.bandwidth.messaging.models.MessageRequest; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MediaApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.util.Collections; + import java.io.File; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String mediaId = "media-id-123"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + MediaApi apiInstance = new MediaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. try { - CompletableFuture> completableFuture = client.getMessagingClient().getAPIController().deleteMediaAsync(ACCOUNT_ID, mediaId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + File result = apiInstance.getMedia(accountId, mediaId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MediaApi#getMedia"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -856,21 +873,21 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Messaging + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" - ) - messaging_client = bandwidth_client.messaging_client.client + api_instance = Bandwidth::MediaApi.new + account_id = '12345' + media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' begin - messaging_client.delete_media("12345", ENV['MEDIA_ID']) - rescue APIException => e - puts e.response_code + api_instance.delete_media(account_id, media_id) + rescue Bandwidth::ApiError => e + p "Error when calling MediaApi->delete_media: #{e}" end /users/{accountId}/messages: get: @@ -954,30 +971,48 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.messaging.models.BandwidthMessagesList; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MessagesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String bandwidthNumber = "+15554443333"; - - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + MessagesApi apiInstance = new MessagesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String messageId = "9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6"; // String | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. + String sourceTn = "%2B15554443333"; // String | The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). + String destinationTn = "%2B15554443333"; // String | The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). + MessageStatusEnum messageStatus = MessageStatusEnum.fromValue("RECEIVED"); // MessageStatusEnum | The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. + ListMessageDirectionEnum messageDirection = ListMessageDirectionEnum.fromValue("INBOUND"); // ListMessageDirectionEnum | The direction of the message. One of INBOUND OUTBOUND. + String carrierName = "Verizon"; // String | The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). + MessageTypeEnum messageType = MessageTypeEnum.fromValue("sms"); // MessageTypeEnum | The type of message. Either sms or mms. + Integer errorCode = 9902; // Integer | The error code of the message. + String fromDateTime = "2022-09-14T18:20:16.000Z"; // String | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. + String toDateTime = "2022-09-14T18:20:16.000Z"; // String | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. + String campaignId = "CJEUMDK"; // String | The campaign ID of the message. + String sort = "sourceTn:desc"; // String | The field and direction to sort by combined with a colon. Direction is either asc or desc. + String pageToken = "gdEewhcJLQRB5"; // String | A base64 encoded value used for pagination of results. + Integer limit = 50; // Integer | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. + Boolean limitTotalCount = true; // Boolean | When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. try { - CompletableFuture> completableFuture = client.getMessagingClient().getAPIController().getMessagesAsync(ACCOUNT_ID, null, bandwidthNumber, null, null, null, null, null, null, null); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + MessagesList result = apiInstance.listMessages(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, sort, pageToken, limit, limitTotalCount); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MessagesApi#listMessages"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1059,22 +1094,21 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Messaging + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" - ) - messaging_client = bandwidth_client.messaging_client.client + api_instance = Bandwidth::MessagesApi.new + account_id = '12345' begin - result = messaging_client.get_messages("12345", :source_tn => "+15554443333") - puts result.data.total_count - rescue APIException => e - puts e.response_code + result = api_instance.list_messages(account_id) + p result.total_count + rescue Bandwidth::ApiError => e + p "Error when calling MessagesApi->list_messages: #{e}" end post: summary: Create Message @@ -1179,40 +1213,33 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.messaging.models.BandwidthMessage; - import com.bandwidth.messaging.models.MessageRequest; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.util.Collections; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MessagesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String messagingApplicationId = "1234-asdf"; - String to = "+15553334444"; - String from = "+15554443333"; - - BandwidthClient client = new BandwidthClient.Builder() - .messagingBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - MessageRequest request = new MessageRequest(); - request.setApplicationId(messagingApplicationId); - request.setTo(Collections.singletonList(to)); - request.setFrom(from); - request.setText("Hello world"); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + MessagesApi apiInstance = new MessagesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + MessageRequest messageRequest = new MessageRequest(); // MessageRequest | try { - CompletableFuture> completableFuture = client.getMessagingClient().getAPIController().createMessageAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + Message result = apiInstance.createMessage(accountId, messageRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MessagesApi#createMessage"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1336,28 +1363,29 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Messaging + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - messaging_basic_auth_user_name: "api-username", - messaging_basic_auth_password: "api-password" + api_instance = Bandwidth::MessagesApi.new + account_id = '12345' + message_request = Bandwidth::MessageRequest.new( + { + application_id: '1234-asdf', + to: ['+15553334444'], + from: '+15554443333', + text: 'Hello world!' + } ) - messaging_client = bandwidth_client.messaging_client.client - body = MessageRequest.new - body.application_id = "1234-asdf" - body.to = ["+15553334444"] - body.from = "+15554443333" - body.text = 'Hey, check this out!' - body.tag = '{"test": "message"}' begin - result = messaging_client.create_message("12345", body) - puts 'messageId: ' + result.data.id - rescue APIException => e - puts e.response_code + result = api_instance.create_message(account_id, message_request) + p "messageId: #{result.id}" + rescue Bandwidth::ApiError => e + p "Error when calling MessagesApi->create_message: #{e}" end components: parameters: diff --git a/site/specs/multi-factor-auth.yml b/site/specs/multi-factor-auth.yml index 27cace8f2..05c8a662c 100644 --- a/site/specs/multi-factor-auth.yml +++ b/site/specs/multi-factor-auth.yml @@ -101,52 +101,35 @@ paths: } } - lang: Java - source: > - import com.bandwidth.BandwidthClient; - - import com.bandwidth.http.response.ApiResponse; - - import - com.bandwidth.multifactorauth.models.TwoFactorCodeRequestSchema; - - import com.bandwidth.multifactorauth.models.TwoFactorVoiceResponse; - - - import java.util.concurrent.CompletableFuture; - - import java.util.concurrent.ExecutionException; - + source: | + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MfaApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static final String APPLICATION_ID = "1234-qwer"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .multiFactorAuthBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String to = "+15553334444"; - String from = "+15554443333"; - String scope = "sample"; - int digits = 6; - String message = "Your temporary {NAME} {SCOPE} code is {CODE}"; - - TwoFactorCodeRequestSchema request = new TwoFactorCodeRequestSchema(); - request.setApplicationId(APPLICATION_ID); - request.setTo(to); - request.setFrom(from); - request.setScope(scope); - request.setDigits(digits); - request.setMessage(message); + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + MfaApi apiInstance = new MfaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. try { - CompletableFuture> completableFuture = client.getMultiFactorAuthClient().getMFAController().createVoiceTwoFactorAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + VoiceCodeResponse result = apiInstance.generateVoiceCode(accountId, codeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MfaApi#generateVoiceCode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -291,29 +274,30 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::MultiFactorAuth + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - multi_factor_auth_basic_auth_user_name: "api-username", - multi_factor_auth_basic_auth_password: "api-password" + api_instance = Bandwidth::MFAApi.new + account_id = '12345' + code_request = Bandwidth::CodeRequest.new( + { + to: '+15553334444', + from: '+15554443333', + application_id: '1234-qwer', + message: 'Your temporary {NAME} {SCOPE} code is {CODE}', + digits: 6 + } ) - auth_client = bandwidth_client.multi_factor_auth_client.mfa - body = TwoFactorCodeRequestSchema.new - body.application_id = "1234-qwer" - body.to = "+15553334444" - body.from = "+15554443333" - body.digits = 6 - body.scope = "scope" - body.message = "Your temporary {NAME} {SCOPE} code is {CODE}" begin - result = auth_client.create_voice_two_factor("12345", body) - puts 'callId: ' + result.data.call_id - rescue APIException => e - puts e.response_code + result = api_instance.generate_voice_code(account_id, code_request) + p "callId: #{result.call_id}" + rescue Bandwidth::ApiError => e + p "Error when calling MFAApi->generate_voice_code: #{e}" end /accounts/{accountId}/code/messaging: post: @@ -401,53 +385,35 @@ paths: } } - lang: Java - source: > - import com.bandwidth.BandwidthClient; - - import com.bandwidth.http.response.ApiResponse; - - import - com.bandwidth.multifactorauth.models.TwoFactorCodeRequestSchema; - - import - com.bandwidth.multifactorauth.models.TwoFactorMessagingResponse; - - - import java.util.concurrent.CompletableFuture; - - import java.util.concurrent.ExecutionException; - + source: | + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MfaApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static final String APPLICATION_ID = "1234-asdf"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .multiFactorAuthBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String to = "+15553334444"; - String from = "+15554443333"; - String scope = "sample"; - int digits = 6; - String message = "Your temporary {NAME} {SCOPE} code is {CODE}"; - - TwoFactorCodeRequestSchema request = new TwoFactorCodeRequestSchema(); - request.setApplicationId(APPLICATION_ID); - request.setTo(to); - request.setFrom(from); - request.setScope(scope); - request.setDigits(digits); - request.setMessage(message); + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + MfaApi apiInstance = new MfaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. try { - CompletableFuture> completableFuture = client.getMultiFactorAuthClient().getMFAController().createMessagingTwoFactorAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + MessagingCodeResponse result = apiInstance.generateMessagingCode(accountId, codeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MfaApi#generateMessagingCode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -591,29 +557,30 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::MultiFactorAuth + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - multi_factor_auth_basic_auth_user_name: "api-username", - multi_factor_auth_basic_auth_password: "api-password" + api_instance = Bandwidth::MFAApi.new + account_id = '12345' + code_request = Bandwidth::CodeRequest.new( + { + to: '+15553334444', + from: '+15554443333', + application_id: '1234-asdf', + message: 'Your temporary {NAME} {SCOPE} code is {CODE}', + digits: 6 + } ) - auth_client = bandwidth_client.multi_factor_auth_client.mfa - body = TwoFactorCodeRequestSchema.new - body.application_id = "1234-asdf" - body.to = "+15553334444" - body.from = "+15554443333" - body.digits = 6 - body.scope = "scope" - body.message = "Your temporary {NAME} {SCOPE} code is {CODE}" begin - result = auth_client.create_messaging_two_factor("12345", body) - puts 'messageId: ' + result.data.message_id - rescue APIException => e - puts e.response_code + result = api_instance.generate_messaging_code(account_id, code_request) + p "messageId: #{result.message_id}" + rescue Bandwidth::ApiError => e + p "Error when calling MFAApi->generate_messaging_code: #{e}" end /accounts/{accountId}/code/verify: post: @@ -699,51 +666,35 @@ paths: } } - lang: Java - source: > - import com.bandwidth.BandwidthClient; - - import com.bandwidth.http.response.ApiResponse; - - import - com.bandwidth.multifactorauth.models.TwoFactorVerifyCodeResponse; - - import - com.bandwidth.multifactorauth.models.TwoFactorVerifyRequestSchema; - - - import java.util.concurrent.CompletableFuture; - - import java.util.concurrent.ExecutionException; - + source: | + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.MfaApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static final String APPLICATION_ID = "1234-qwer"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .multiFactorAuthBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String to = "+15553334444"; - String scope = "sample"; - String code = "159193"; - int expirationTimeInMinutes = 3; - - TwoFactorVerifyRequestSchema request = new TwoFactorVerifyRequestSchema(); - request.setApplicationId(APPLICATION_ID); - request.setTo(to); - request.setScope(scope); - request.setCode(code); - request.setExpirationTimeInMinutes(expirationTimeInMinutes); + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + MfaApi apiInstance = new MfaApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + VerifyCodeRequest verifyCodeRequest = new VerifyCodeRequest(); // VerifyCodeRequest | MFA code verify request body. try { - CompletableFuture> completableFuture = client.getMultiFactorAuthClient().getMFAController().createVerifyTwoFactorAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + VerifyCodeResponse result = apiInstance.verifyCode(accountId, verifyCodeRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MfaApi#verifyCode"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -906,28 +857,28 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::MultiFactorAuth + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - multi_factor_auth_basic_auth_user_name: "api-username", - multi_factor_auth_basic_auth_password: "api-password" + api_instance = Bandwidth::MFAApi.new + account_id = '12345' + verify_code_request = Bandwidth::VerifyCodeRequest.new( + { + to: '+15553334444', + expiration_time_in_minutes: 3, + code: '123456' + } ) - auth_client = bandwidth_client.multi_factor_auth_client.mfa - body = TwoFactorVerifyRequestSchema.new - body.application_id = "1234-qwer" - body.to = "+15553334444" - body.scope = "scope" - body.code = "123456" - body.expiration_time_in_minutes = 3 begin - result = auth_client.create_verify_two_factor("12345", body) - puts 'valid?: ' + result.data.valid - rescue APIException => e - puts e.response_code + result = api_instance.verify_code(account_id, verify_code_request) + p "valid?: #{result.valid}" + rescue Bandwidth::ApiError => e + p "Error when calling MFAApi->verify_code: #{e}" end components: schemas: diff --git a/site/specs/numbers.yml b/site/specs/numbers.yml index 6e8c45881..611700f55 100644 --- a/site/specs/numbers.yml +++ b/site/specs/numbers.yml @@ -1262,6 +1262,24 @@ components: name: sipPeerId schema: type: integer + SipPeerTnsPageQueryParam: + description: The number of the paged results to be displayed. + example: 4 + in: query + name: page + required: false + schema: + default: 1 + type: integer + SipPeerTnsSizeQueryParam: + description: The quantity of results displayed for each page. + example: 200 + in: query + name: size + required: false + schema: + default: 5000 + type: integer SiteIdPathParam: description: Site ID of the Sip Peer example: '407' @@ -2756,7 +2774,7 @@ components: AssociatedSipPeersResponse: $ref: '#/components/schemas/AssociatedSipPeersResponse' type: object - AutomatedTollFreeLnpOrderRequest: + AutomatedNANPTollFreeLnpOrderRequest: description: >- Indicates that the port-in contains toll-free numbers and that Toll-Free Automation is enabled. The numbers will be automatically validated and @@ -2767,7 +2785,25 @@ components: allOf: - $ref: '#/components/schemas/LnpOrderBasic' - $ref: '#/components/schemas/LnpOrderAutomatedTollFreeFields' - title: Automated Toll-Free + - properties: + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as “2013-05-10T15:14:22Z”, or + "2019-10-31T17:15:00+04:00".

For all ports, if + `RequestedFocDate` is specified, the date portion must + be:
- in the future
- after the losing carrier's + minimum number of days to port-out
- not on a weekend + or U.S. holiday

If `RequestedFocDate` is not + specified, the next available FOC date meeting the criteria + above will be used. If the Time portion of the + `RequestedFocDate` is omitted the port-in order will be + activated at the default activation time of 11:30 AM ET. If + an activation time other than 11:30 AM ET is desired, that + activation time should be included in the + `RequestedFocDate`. + type: string + type: object + title: Automated NANP Toll-Free LNP Order Request type: object AvailableNpaNxx: properties: @@ -4156,6 +4192,17 @@ components: years. format: int64 type: integer + NumberFormat: + default: LEGACY + description: >- + Specifies whether numbers should be formatted in e164 format, or use + legacy formatting. If Legacy is chosen, numbers with country code + '+1' will be formatted as 10-digit and all other numbers will use + e164 formatting. Can be omitted and defaults to LEGACY. + enum: + - LEGACY + - E164 + type: string Status: type: string URL: @@ -7337,7 +7384,7 @@ components: delete: type: boolean type: object - InternalLnpOrderRequest: + InternalNANPLnpOrderRequest: properties: LnpOrder: allOf: @@ -7371,7 +7418,7 @@ components: $ref: '#/components/schemas/TnAttribute' type: array type: object - title: Internal + title: Internal NANP LNP Order Request type: object IrisStatus: properties: @@ -7682,6 +7729,20 @@ components: carrier. For wireline port-in, the BillingTelephoneNumber is typically the telephone number being ported in. type: string + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as “2013-05-10T15:14:22Z”, or + "2019-10-31T17:15:00+04:00".

For all ports, if + `RequestedFocDate` is specified, the date portion must be:
- in + the future
- after the losing carrier's minimum number of days + to port-out
- not on a weekend or U.S. holiday

If + `RequestedFocDate` is not specified, the next available FOC date + meeting the criteria above will be used. If the Time portion of the + `RequestedFocDate` is omitted the port-in order will be activated at + the default activation time of 11:30 AM ET. If an activation time + other than 11:30 AM ET is desired, that activation time should be + included in the `RequestedFocDate`. + type: string Subscriber: oneOf: - $ref: '#/components/schemas/SubscriberBusiness' @@ -7987,6 +8048,22 @@ components: type: string type: object type: object + LnpOrderRequest: + properties: + LnpOrder: + allOf: + - $ref: '#/components/schemas/LnpOrderBasic' + - properties: + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as "2019-10-31".

For + international ports, if `RequestedFocDate` is specified the + time portions will be ignored and the date portion must + be:
- in the future
- not on a weekend. + type: string + type: object + title: LNP Order Request (Other) + type: object LnpOrderResponse: properties: LnpOrderResponse: @@ -8739,6 +8816,25 @@ components: SkipAck: type: boolean type: object + ManualNANPTollFreeLnpOrderRequest: + description: >- + Manual indicates that the port-in will be processed manually by + Bandwidth’s Local Number Portability team. Currently all toll free + port-ins are handled manually by Bandwidth’s Local Number Portability + team. But Bandwidth is in the process of automating portions of toll + free porting, with a goal of eventually automating the entire process. + properties: + LnpOrder: + allOf: + - $ref: '#/components/schemas/LnpOrderBasic' + properties: + Subscriber: + allOf: + - $ref: '#/components/schemas/SubscriberBusiness' + type: object + type: object + title: Manual NANP Toll-Free LNP Order Request + type: object ManualPortOutRequest: properties: BulkPortOut: @@ -8766,25 +8862,6 @@ components: TelephoneNumberToPort: type: string type: object - ManualTollFreeLnpOrderRequest: - description: >- - Manual indicates that the port-in will be processed manually by - Bandwidth’s Local Number Portability team. Currently all toll free - port-ins are handled manually by Bandwidth’s Local Number Portability - team. But Bandwidth is in the process of automating portions of toll - free porting, with a goal of eventually automating the entire process. - properties: - LnpOrder: - allOf: - - $ref: '#/components/schemas/LnpOrderBasic' - properties: - Subscriber: - allOf: - - $ref: '#/components/schemas/SubscriberBusiness' - type: object - type: object - title: Manual Toll-Free - type: object ManuallyPortableTollFreeNumberList: properties: DisconnectedTollFreeNumberList: @@ -9383,15 +9460,15 @@ components: type: object title: Number Portability Response type: object - OffNetLnpOrderRequest: + OffNetNANPLnpOrderRequest: properties: LnpOrder: allOf: - $ref: '#/components/schemas/LnpOrderBasic' - $ref: '#/components/schemas/LnpOrderAdditionalFields' - title: Off-net + title: Off-net NANP LNP Order Request type: object - OnNetLnpOrderRequest: + OnNetNANPLnpOrderRequest: properties: LnpOrder: allOf: @@ -9428,7 +9505,7 @@ components: $ref: '#/components/schemas/TnAttribute' type: array type: object - title: On-net + title: On-net NANP LNP Order Request type: object OrderCreatedDate: description: Creation date of the order. @@ -15389,10 +15466,6 @@ info: Bandwidth's Account and Number Management API - For the previous documentation visit - [v2.dev.bandwidth.com](https://v2.dev.bandwidth.com/numbers/apiReference.html). - - ### Disclaimer @@ -25759,48 +25832,6 @@ paths: summary: List Import to Account orders tags: - Import Tn to Account - post: - description: > - Import a large number of previously ported or otherwise acquired numbers - into the account - operationId: CreateImportToAccountOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - requestBody: - content: - application/xml: - examples: - example: - value: "\n\n\t\n\t\t10D\n\t\t\n\t\t\t4158714244\n\t\t\t6105330709\n\t\t\n\t\tNOCHARGE\n\t\tAvailable\n\t\t\n\t\t\tProtected\n\t\t\n\t\tLevel 3\n\t\tTestId1234\n\t\t2\n\t\n\t1\n\t12345\n\t" - schema: - $ref: '#/components/schemas/ImportToAccountOrderRequest' - responses: - '201': - content: - application/xml: - examples: - example: - value: "\n\n\t\n\t\tc5986599-3a7c-4eed-a5c4-9121c17d54ab\n\t\t2014-04-01T21:54:18.796Z\n\t\t\n\t\t\tSJM00001\n\t\t\t2\n\t\t\tNOCHARGE\n\t\t\t10D\n\t\t\tAvailable\n\t\t\t\n\t\t\t\tProtected\n\t\t\t\n\t\t\t\n\t\t\t\t4158714245\n\t\t\t\t6105330710\n\t\t\t\n\t\t\tLevel 3\n\t\t\n\t\t743\n\t\t12345\n\t\n\t" - schema: - $ref: '#/components/schemas/ImportToAccountNumberOrderResponse' - description: >- - The order has been created and an order ID will be specified in the - payload and in the header. - '400': - content: - application/xml: - examples: - example: - value: "\n\n\t \n\t\t \n\t\t\t 7309\n\t\t\t The site id was not supplied or is invalid.\n\t\t \n\t\t \n\t\t\t 7312\n\t\t\t The sippeer id is invalid.\n\t\t \n\t \n " - schema: - $ref: '#/components/schemas/ImportToAccountNumberOrderErrorResponse' - description: >- - The order failed; one of the input parameters is invalid. The error - text and an error code will be provided in the ErrorList - element.

- summary: Import to Account order - tags: - - Import Tn to Account /accounts/{accountId}/importToAccount/batches: get: description: >- @@ -29428,7 +29459,7 @@ paths: content: application/xml: examples: - Portins in FOC: + Portins containing NANP numbers: description: List of portin orders with FOC processing status value: |- @@ -29476,7 +29507,7 @@ paths: 979E019287CDF6A1 - RespOrg exception toll-free portin order: + RespOrg exception toll-free order containing NANP numbers: description: >- List containing a single RespOrg exception toll-free portin order @@ -29528,25 +29559,26 @@ paths: content: application/xml: examples: - Automated Toll-Free Port-in: + Automated NANP Toll-Free Port-in: value: "\n\n\tMy order id\n\t2021-06-16Z\n\t2439\n\t23432\n\tThe Authgal\n\tJYT01\n\t\n\t\t8774809871\n\t\n" - Regular Port-in: + On-net NANP Port-in: value: "\n\n\t2016-03-25T21:15:00.000Z\n\tX455\n\t9195551234\n\t9175131245\n\t SITE ID \n\t SIPPEER ID \n\t\n\t\tBUSINESS\n\t\tFirst\n\t\tLast\n\t\t\n\t\t\t11235\n\t\t\tBack\n\t\t\tDenver\n\t\t\tCO\n\t\t\t27541\n\t\t\tCanyon\n\t\t\n\t\n\tThe Authguy\n\t\n\t\t771297665AABC\n\t\t1234\n\t\n\t\n\t\tProtected\n\t\tExternal\n\t\tImported\n\t\n\t\n\t\t9194809871\n\t\n\tmyOrder\n\ttrue\n\ttrue\n\tDRAFT\n" schema: oneOf: - - $ref: '#/components/schemas/OnNetLnpOrderRequest' - - $ref: '#/components/schemas/ManualTollFreeLnpOrderRequest' - - $ref: '#/components/schemas/AutomatedTollFreeLnpOrderRequest' - - $ref: '#/components/schemas/OffNetLnpOrderRequest' - - $ref: '#/components/schemas/InternalLnpOrderRequest' + - $ref: '#/components/schemas/OnNetNANPLnpOrderRequest' + - $ref: '#/components/schemas/OffNetNANPLnpOrderRequest' + - $ref: '#/components/schemas/InternalNANPLnpOrderRequest' + - $ref: '#/components/schemas/ManualNANPTollFreeLnpOrderRequest' + - $ref: '#/components/schemas/AutomatedNANPTollFreeLnpOrderRequest' + - $ref: '#/components/schemas/LnpOrderRequest' responses: '201': content: application/xml: examples: - Automated Toll-Free Order Response: + Automated NANP Toll-Free Port-in Order Response: value: "\n\n\t03f194d5-3932-4e9f-8ba1-03ef767985e5\n\t\n\t\t201\n\t\tOrder request received. Please use the order id to check the status of your order later.\n\t\n\tVALIDATE_TFNS\n\t2016-03-25T21:15:00.000Z\n\tThe Authguy\n\t\n\t\t8774809871\n\t\n\tPROCESSING\n\tPHASE_1_TOLLFREE\n\tJYT01\n" - Regular Order Response: + On-net NANP Port-in Order Response: value: "\n\n\t03f194d5-3932-4e9f-8ba1-03ef767985e5\n\t\n\t\t201\n\t\tOrder request received. Please use the order id to check the status of your order later.\n\t\n\tPENDING_DOCUMENTS\n\t2016-03-25T21:15:00.000Z\n\tThe Authguy\n\t\n\t\tBUSINESS\n\t\tFirst\n\t\tLast\n\t\t\n\t\t\t11235\n\t\t\tBack\n\t\t\tDenver\n\t\t\tCO\n\t\t\t27541\n\t\t\tCanyon\n\t\t\tUnited States\n\t\t\n\t\n\t\n\t\t771297665AABC\n\t\t1234\n\t\n\t\n\t\tProtected\n\t\tExternal\n\t\tImported\n\t\n\t9195551234\n\t9175131245\n\t SITE ID \n\t SIPPEER ID \n\t\n\t\t9194809871\n\t\n\tmyOrder\n\ttrue\n\ttrue\n" schema: $ref: '#/components/schemas/LnpOrderResponse' @@ -38640,6 +38672,8 @@ paths: parameters: - $ref: '#/components/parameters/AccountIdPathParam' - $ref: '#/components/parameters/SiteIdPathParam' + - $ref: '#/components/parameters/SipPeerTnsPageQueryParam' + - $ref: '#/components/parameters/SipPeerTnsSizeQueryParam' - description: ID of the Sip Peer to retrieve TNs information example: '500017' in: path @@ -39031,6 +39065,7 @@ paths: iris + LEGACY @@ -39053,6 +39088,7 @@ paths: iris + LEGACY @@ -39186,6 +39222,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + LEGACY eventEmailSubscription: @@ -39215,6 +39252,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + LEGACY orderEmailSubscription: @@ -39342,6 +39380,7 @@ paths: http://customer.com:8087/path/BandwidthHandler 4283455101 200 OK + LEGACY @@ -39373,6 +39412,7 @@ paths: http://customer.com:8087/path/BandwidthHandler 4283455101 200 OK + LEGACY @@ -39438,6 +39478,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + LEGACY eventEmailSubscription: @@ -39467,6 +39508,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + LEGACY orderEmailSubscription: diff --git a/site/specs/numbers_v2.yml b/site/specs/numbers_v2.yml index 701f55faa..ddeb1a975 100644 --- a/site/specs/numbers_v2.yml +++ b/site/specs/numbers_v2.yml @@ -948,6 +948,68 @@ components: + badRequestErrorExample: + summary: An example of a generic Bad Request Error + value: + errors: + - code: 205617 + description: There was an issue with your request. + id: optional-error-id + type: bad-request + forbiddenErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - code: 109107 + description: User does not have permissions to access this resource. + id: optional-error-id + type: resource-permissions + internalServerErrorExample: + summary: An example of a generic Internal Server Error + value: + errors: + - code: 32030 + description: >- + Unexpected internal server error. Contact Bandwidth Customer + Support if this problem persists. + id: optional-error-id + type: internal-server-error + notAllowedErrorExample: + summary: An example of a generic Not Allowed Error + value: + errors: + - code: 205621 + description: The HTTP method used is not supported by this resource. + id: optional-error-id + meta: + method: TRACE + type: http-method-not-supported + notFoundErrorExample: + summary: An example of a generic Not Found Error + value: + errors: + - code: 50420 + description: The resource specified cannot be found. + id: optional-error-id + type: resource-not-found + tooManyRequestsErrorExample: + summary: An example of a generic Too Many Requests Error + value: + errors: + - code: 32002 + description: >- + Rate limit exceeded. Wait for the time specified in the + "Retry-After" header before sending another request. + id: optional-error-id + type: rate-limiting + unauthorizedErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - code: 206401 + description: Invalid or missing credentials. + id: optional-error-id + type: authentication-credentials parameters: AccountIDQueryParam: description: > @@ -1014,7 +1076,7 @@ components: CustomerOrderIdQueryParam: description: >- The Customer Order ID is an ID assigned by the account owner to provide - a reference number for the importVoiceTnOrder. + a reference number for the order. example: ABCCorp12345 in: query name: customerOrderId @@ -1183,21 +1245,33 @@ components: schema: type: string SipPeerIdPathParam: + description: SipPeer ID, also known as Location in: path name: sipPeerId required: true schema: format: int32 type: integer - SipPeerIdQueryParam: - description: A Sip Peer Id that is referenced in the order - example: 50139 + SipPeerTnsPageQueryParam: + description: The number of the paged results to be displayed. + example: 4 in: query - name: sipPeerId + name: page + required: false schema: + default: 1 + type: integer + SipPeerTnsSizeQueryParam: + description: The quantity of results displayed for each page. + example: 200 + in: query + name: size + required: false + schema: + default: 5000 type: integer SiteIdPathParam: - description: Site ID of the Sip Peer + description: Site ID, also known as Sub-Account example: '407' in: path name: siteId @@ -1257,6 +1331,249 @@ components: required: true schema: type: string + addressIdPathParam: + description: Address Id. + in: path + name: addressId + required: true + schema: + example: ArAnD0m1d + type: string + afterCursorQueryParam_eq: + description: Returns the page after the last record on the current page. + explode: true + in: query + name: afterCursor + required: false + schema: + properties: + eq: + example: ArAnD0m1d + type: string + type: object + style: deepObject + areaCodeQueryParam: + description: >- + The 1 to 6 digit area code associated with the phone number. The system + defaults to return all area codes when the query parameter is not + passed. The countryCodeA3 is a required parameter with areaCode. + in: query + name: areaCode + required: false + schema: + example: '435' + type: string + areaCodeQueryParam_eq: + description: >- + The 1 to 6 digit area code associated with the phone number. The system + defaults to return all area codes when the query parameter is not + passed. The countryCodeA3 is a required parameter with areaCode. + in: query + name: areaCode + required: false + schema: + properties: + eq: + example: '435' + type: string + type: object + beforeCursorQueryParam_eq: + description: Returns the page before the first record on the current page. + explode: true + in: query + name: beforeCursor + required: false + schema: + properties: + eq: + example: ArAnD0m1d + type: string + type: object + style: deepObject + cityQueryParam: + description: >- + The name of the city. The system defaults to return all cities when the + query parameter is not passed. The countryCodeA3 is a required parameter + with city. Some phone number types like TOLL_FREE may not have any + associated cities. + in: query + name: city + required: false + schema: + example: Raleigh + type: string + cityQueryParam_eq_startsWith: + description: >- + The name of the city. The system defaults to return all cities when the + query parameter is not passed. The countryCodeA3 is a required parameter + with city. Some phone number types like TOLL_FREE may not have any + associated cities. + explode: true + in: query + name: city + required: false + schema: + properties: + eq: + example: Raleigh + type: string + startsWith: + example: Ral + type: string + type: object + style: deepObject + countryCodeA3QueryParam: + description: Country code of the address in ISO 3166-1 alpha-3 format. + in: query + name: countryCodeA3 + required: false + schema: + example: USA + type: string + countryCodeA3QueryParam_eq: + description: Country code of the address in ISO 3166-1 alpha-3 format. + in: query + name: countryCodeA3 + required: false + schema: + properties: + eq: + example: USA + type: string + type: object + countryCodeA3RequiredQueryParam: + description: Country code of the address in ISO 3166-1 alpha-3 format. + in: query + name: countryCodeA3 + required: true + schema: + properties: + eq: + example: USA + type: string + type: object + customReferenceQueryParam_eq_startsWith: + description: Customer reference. It cannot be combined with any other query filter. + in: query + name: customReference + required: false + schema: + properties: + eq: + example: home_office + maxLength: 64 + minLength: 1 + type: string + startsWith: + example: home + maxLength: 64 + minLength: 1 + type: string + type: object + enddateQueryParam: + description: >- + The ending date of a search in yy-mm-dd format. startdate and enddate + must be used as a pair. + in: query + name: enddate + required: false + schema: + example: 23-10-31 + type: string + isHiddenQueryParam_eq: + description: >- + Returns hidden addresses when set to true. The system defaults to false + and only returns addresses that are not hidden. + in: query + name: isHidden + required: false + schema: + properties: + eq: + example: false + type: boolean + type: object + limitQueryParam_eq: + description: Limit the number of returned records. + explode: true + in: query + name: limit + required: false + schema: + properties: + eq: + default: 300 + maximum: 5000 + minimum: 1 + type: number + type: object + style: deepObject + pageQueryParam: + description: >- + An ID of the first element in a page. This value will indicate the + first value, not the page number, of the initial entry in the page being + requested. The initial page is tagged with the ID `1` as a convention. + in: query + name: page + required: false + schema: + default: 1 + example: 1 + type: integer + phoneNumberTypeQueryParam: + description: >- + The type of phone number. The system defaults to return phone numbers of + all types when the query parameter is not passed. The countryCodeA3 is a + required parameter with phone number type. + in: query + name: phoneNumberType + required: false + schema: + enum: + - GEOGRAPHIC + - NATIONAL + - MOBILE + - TOLL_FREE + - SHARED_COST + example: MOBILE + type: string + phoneNumberTypeQueryParam_eq: + description: >- + The type of phone number. The system defaults to return phone numbers of + all types when the query parameter is not passed. The countryCodeA3 is a + required parameter with phone number type. + in: query + name: phoneNumberType + required: false + schema: + properties: + eq: + enum: + - GEOGRAPHIC + - NATIONAL + - MOBILE + - TOLL_FREE + - SHARED_COST + example: MOBILE + type: string + type: object + postalCodeQueryParam_eq_startsWith: + description: >- + The postal code of the address. The system defaults to return all postal + codes when the query parameter is not passed. The countryCodeA3 is a + required parameter with postalCode. + in: query + name: postalCode + required: false + schema: + properties: + eq: + example: '98072' + type: string + startsWith: + example: '9807' + type: string + type: object shortCodeCountryPathParam: description: The short code number country. example: USA @@ -1324,12 +1641,53 @@ components: required: true schema: type: string + sizeQueryParam: + description: The number of elements to retrieve + in: query + name: page + required: false + schema: + example: 30 + type: integer + startdateQueryParam: + description: >- + The starting date of a search in yy-mm-dd format. startdate and enddate + must be used as a pair. + in: query + name: startdate + required: false + schema: + example: 22-10-31 + type: string + tierQueryParam: + description: >- + A service tier indicating the the vendor class that the TN is associated + with. Tier indicates whether the TN is on-net, domestic offnet, + Canadian, etc. + in: query + name: tier + required: false + schema: + example: 5 + type: integer requestBodies: + addAddressRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/createAddressRequest' + description: Add address. shortCodeJsonPatchShortCodeRequest: content: application/json-patch+json: schema: $ref: '#/components/schemas/jsonPatch' + updateAddressRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/updateAddressRequest' + description: Update address. verificationRequest: content: application/json: @@ -1396,6 +1754,15 @@ components: associated with the order, the state of the order, and a list of the successfully imported Telephone Numbers, and descriptions of any encountered errors. + badRequestError: + content: + application/json: + examples: + badRequestErrorExample: + $ref: '#/components/examples/badRequestErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Bad Request. bulkRateCenterGetResponse404Error: content: application/xml: @@ -1447,6 +1814,72 @@ components: description: >- Successful response which starts the bulk upsert for provided rate centers. + createAddressResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateAddressResponse' + description: Created. + forbiddenError: + content: + application/json: + examples: + forbiddenErrorExample: + $ref: '#/components/examples/forbiddenErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Forbidden. + getAddressFieldsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/getAddressFieldsResponse' + description: OK. + getAddressResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/genericAddressResponse' + description: OK. + internalServerError: + content: + application/json: + examples: + internalServerErrorExample: + $ref: '#/components/examples/internalServerErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Internal Server Error. + listAddressesResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/listAddressesResponse' + description: OK. + listOfLosingCarriersResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/portingLosingCarriersResponseSchema' + description: A list of available carriers that can port out a phone number + notAllowedError: + content: + application/json: + examples: + notAllowedErrorExample: + $ref: '#/components/examples/notAllowedErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Method Not Allowed. + notFoundError: + content: + application/json: + examples: + notFoundErrorExample: + $ref: '#/components/examples/notFoundErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Not Found. rateCenter401Error: content: application/json: @@ -1831,12 +2264,42 @@ components: schema: $ref: '#/components/schemas/tfvError' description: Client is providing incorrect or invalid credentials. + tooManyRequestsError: + content: + application/json: + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/tooManyRequestsErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Too Many Requests. + unauthorizedError: + content: + application/json: + examples: + unauthorizedErrorExample: + $ref: '#/components/examples/unauthorizedErrorExample' + schema: + $ref: '#/components/schemas/genericError' + description: Unauthorized. + updateAddressResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/createUpdateAddressResponse' + description: OK. useCasesResponse: content: application/json: schema: $ref: '#/components/schemas/useCases' description: OK + validateAddressResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/validateAddressResponse' + description: OK. verifyPostResponse: description: Accepted verifyStatusResponse: @@ -2019,30 +2482,25 @@ components: TollFreeMMSAllowed: type: boolean type: object - AccountProduct: + AccountProductResponse: properties: - Features: - items: - properties: - Feature: - type: string - type: object - type: array - Name: - type: string + product: + oneOf: + - $ref: '#/components/schemas/productWithCountrySettings' + - $ref: '#/components/schemas/product' type: object - AccountProducts: + AccountProductsResponse: properties: - Product: + products: items: - $ref: '#/components/schemas/AccountProduct' + $ref: '#/components/schemas/productWithCountrySettings' type: array + xml: + name: Products + wrapped: true type: object - AccountProductsResponse: - properties: - Products: - $ref: '#/components/schemas/AccountProducts' - type: object + xml: + name: AccountProductsResponse AccountResponse: properties: Account: @@ -2109,6 +2567,34 @@ components: type: integer type: object type: object + ActivationRequirement: + properties: + CountryCodeA3: + type: string + PhoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + ProofOfAddressRequired: + type: boolean + ProofOfIdRequired: + type: boolean + TypeOfAddress: + $ref: '#/components/schemas/TypeOfAddress' + type: object + ActivationRequirementErrorResponse: + properties: + ActivationRequirementResponse: + $ref: '#/components/schemas/ResponseStatus' + type: object + ActivationRequirementResponse: + properties: + ActivationRequirementResponse: + properties: + ActivationRequirements: + items: + $ref: '#/components/schemas/ActivationRequirement' + type: array + type: object + type: object ActivationStatus: properties: ActivationStatus: @@ -2223,12 +2709,6 @@ components: type: string Latitude: type: string - LegacyAddressId: - deprecated: true - type: string - LegacyEntityId: - deprecated: true - type: string Longitude: type: string PlusFour: @@ -2248,10 +2728,6 @@ components: ServiceAddress. This element is optional when not needed to fully specify the ServiceAddress. type: string - RegionId: - deprecated: true - format: int32 - type: integer ResetAddressFields: type: boolean StateCode: @@ -2497,16 +2973,10 @@ components: $ref: '#/components/schemas/CallbackCreds' CallbackTimeout: type: string - CallbackUrl: - deprecated: true - type: string InboundCallbackCreds: $ref: '#/components/schemas/CallbackCreds' InboundCallbackUrl: type: string - MsgCallbackUrl: - deprecated: true - type: string OutboundCallbackCreds: $ref: '#/components/schemas/CallbackCreds' OutboundCallbackUrl: @@ -2556,15 +3026,6 @@ components: ApplicationsSettings: $ref: '#/components/schemas/ApplicationsSettings' type: object - AreaCodeSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - AreaCodeSearchAndOrderType: - $ref: '#/components/schemas/AreaCodeSearchAndOrderType' - type: object - xml: - name: Order AreaCodeSearchAndOrderResponse: properties: order: @@ -2596,6 +3057,15 @@ components: type: object xml: name: AreaCodeSearchAndOrderType + AreaCodeSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + AreaCodeSearchAndOrderType: + $ref: '#/components/schemas/AreaCodeSearchAndOrderType' + type: object + xml: + name: Order AssociatedSipPeer: properties: PeerId: @@ -2626,7 +3096,7 @@ components: AssociatedSipPeersResponse: $ref: '#/components/schemas/AssociatedSipPeersResponse' type: object - AutomatedTollFreeLnpOrderRequest: + AutomatedNANPTollFreeLnpOrderRequest: description: >- Indicates that the port-in contains toll-free numbers and that Toll-Free Automation is enabled. The numbers will be automatically validated and @@ -2637,7 +3107,25 @@ components: allOf: - $ref: '#/components/schemas/LnpOrderBasic' - $ref: '#/components/schemas/LnpOrderAutomatedTollFreeFields' - title: Automated Toll-Free + - properties: + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as “2013-05-10T15:14:22Z”, or + "2019-10-31T17:15:00+04:00".

For all ports, if + `RequestedFocDate` is specified, the date portion must + be:
- in the future
- after the losing carrier's + minimum number of days to port-out
- not on a weekend + or U.S. holiday

If `RequestedFocDate` is not + specified, the next available FOC date meeting the criteria + above will be used. If the Time portion of the + `RequestedFocDate` is omitted the port-in order will be + activated at the default activation time of 11:30 AM ET. If + an activation time other than 11:30 AM ET is desired, that + activation time should be included in the + `RequestedFocDate`. + type: string + type: object + title: Automated NANP Toll-Free LNP Order Request type: object AvailableNpaNxx: properties: @@ -2736,42 +3224,6 @@ components: type: array type: object type: object - Bdr: - properties: - Bdr: - properties: - EndDate: - type: string - StartDate: - type: string - type: object - type: object - BdrCreationErrorResponse: - properties: - BdrCreationResponse: - $ref: '#/components/schemas/ResponseStatus' - type: object - BdrCreationResponse: - properties: - BdrCreationResponse: - properties: - Info: - type: string - type: object - type: object - BdrRetrievalErrorResponse: - properties: - BdrRetrievalResponse: - $ref: '#/components/schemas/ResponseStatus' - type: object - BdrRetrievalResponse: - properties: - BdrRetrievalResponse: - properties: - Info: - type: string - type: object - type: object BillingReport: properties: BillingReportId: @@ -4026,6 +4478,17 @@ components: years. format: int64 type: integer + NumberFormat: + default: E164 + description: >- + Specifies whether numbers should be formatted in e164 format, or use + legacy formatting. If Legacy is chosen, numbers with country code + '+1' will be formatted as 10-digit and all other numbers will use + e164 formatting. Can be omitted and defaults to E164. + enum: + - LEGACY + - E164 + type: string Status: type: string URL: @@ -4339,15 +4802,6 @@ components: type: object title: CampaignTnsResponse type: object - CitySearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - CitySearchAndOrderType: - $ref: '#/components/schemas/CitySearchAndOrderType' - type: object - xml: - name: Order CitySearchAndOrderResponse: properties: order: @@ -4381,6 +4835,15 @@ components: type: object xml: name: CitySearchAndOrderType + CitySearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + CitySearchAndOrderType: + $ref: '#/components/schemas/CitySearchAndOrderType' + type: object + xml: + name: Order CitySearchResult: properties: AvailableTelephoneNumberCount: @@ -4412,15 +4875,6 @@ components: Count: type: integer type: object - CombinedSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - CombinedSearchAndOrderType: - $ref: '#/components/schemas/CombinedSearchAndOrderType' - type: object - xml: - name: Order CombinedSearchAndOrderResponse: properties: order: @@ -4472,6 +4926,15 @@ components: type: object xml: name: CombinedSearchAndOrderType + CombinedSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + CombinedSearchAndOrderType: + $ref: '#/components/schemas/CombinedSearchAndOrderType' + type: object + xml: + name: Order Contact: properties: Email: @@ -4600,6 +5063,20 @@ components: type: object type: array type: object + CountryCoverageResponseError: + properties: + responseStatus: + $ref: '#/components/schemas/responseStatus' + type: object + xml: + name: CountryCoverageResponse + CountryCoverageResponseSuccess: + properties: + countryCoverages: + $ref: '#/components/schemas/countryCoverages' + type: object + xml: + name: CountryCoverageResponse CoverageMatrixEntry: properties: Abbreviation: @@ -5136,11 +5613,6 @@ components: type: string DisconnectTelephoneNumberOrderType: $ref: '#/components/schemas/DisconnectTelephoneNumberOrderType' - Name: - deprecated: true - description: The name of the order. - maxLength: 50 - type: string type: object type: object DisconnectTelephoneNumberOrderErrorResponse: @@ -6376,122 +6848,6 @@ components: type: object xml: name: ExistingTelephoneNumberOrderType - ExternalTnsOrder: - properties: - AccountId: - type: string - Action: - enum: - - IMPORT - - REMOVE - type: string - CreatedByUser: - type: string - CustomerOrderId: - type: string - Errors: - items: - $ref: '#/components/schemas/Error' - type: array - LastModifiedDate: - type: string - LoaType: - enum: - - CARRIER - - SUBSCRIBER - type: string - OrderCreateDate: - type: string - ProcessingStatus: - enum: - - RECEIVED - - PROCESSING - - COMPLETE - - PARTIAL - - FAILED - type: string - SipPeerId: - type: string - SiteId: - type: string - TelephoneNumbers: - items: - $ref: '#/components/schemas/TelephoneNumber' - type: array - type: object - ExternalTnsOrderErrorResponse: - properties: - ExternalTnsOrderResponse: - $ref: '#/components/schemas/ResponseStatus' - type: object - ExternalTnsOrderRequest: - properties: - ExternalTnsOrder: - properties: - Action: - description: Indentify the action on external TNs - enum: - - IMPORT - - REMOVE - type: string - CustomerOrderId: - description: An order ID created by the customer for their tracking purposes - format: Only alphanumeric values, dashes and spaces are allowed - maxLength: 40 - type: string - LoaType: - default: CARRIER - description: Identify the LoaType on external TNs - enum: - - CARRIER - - SUBSCRIBER - type: string - SipPeerId: - description: >- - The ID of the SIP Peer that the Telephone Numbers are to be - provisioned to - format: int32 - type: integer - SiteId: - description: >- - The ID of the Site that the Telephone Numbers are to be - provisioned to - format: int32 - type: integer - TelephoneNumbers: - items: - $ref: '#/components/schemas/TelephoneNumber' - type: array - required: - - SiteId - - Action - type: object - type: object - ExternalTnsOrderResponse: - properties: - ExternalTnsOrderResponse: - properties: - ExternalTnsOrder: - $ref: '#/components/schemas/ExternalTnsOrder' - type: object - type: object - ExternalTnsOrders: - properties: - ExternalTnsOrders: - properties: - ExternalTnsOrder: - items: - $ref: '#/components/schemas/ExternalTnsOrder' - type: array - TotalCount: - type: integer - type: object - type: object - ExternalTnsOrdersError: - properties: - ExternalTnsOrders: - $ref: '#/components/schemas/ResponseStatus' - type: object Feature: properties: Status: @@ -6862,8 +7218,6 @@ components: required: - TelephoneNumbers - SiteId - - Subscriber - - LoaAuthorizingPerson type: object title: ImportTnOrder ImportTnOrderResponse: @@ -7207,7 +7561,7 @@ components: delete: type: boolean type: object - InternalLnpOrderRequest: + InternalNANPLnpOrderRequest: properties: LnpOrder: allOf: @@ -7241,7 +7595,7 @@ components: $ref: '#/components/schemas/TnAttribute' type: array type: object - title: Internal + title: Internal NANP LNP Order Request type: object IrisStatus: properties: @@ -7251,15 +7605,6 @@ components: Description: type: string type: object - LATASearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - LATASearchAndOrderType: - $ref: '#/components/schemas/LATASearchAndOrderType' - type: object - xml: - name: Order LATASearchAndOrderResponse: properties: order: @@ -7291,6 +7636,15 @@ components: type: object xml: name: LATASearchAndOrderType + LATASearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + LATASearchAndOrderType: + $ref: '#/components/schemas/LATASearchAndOrderType' + type: object + xml: + name: Order LNPResponseWrapper: properties: LNPResponseWrapper: @@ -7552,6 +7906,20 @@ components: carrier. For wireline port-in, the BillingTelephoneNumber is typically the telephone number being ported in. type: string + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as “2013-05-10T15:14:22Z”, or + "2019-10-31T17:15:00+04:00".

For all ports, if + `RequestedFocDate` is specified, the date portion must be:
- in + the future
- after the losing carrier's minimum number of days + to port-out
- not on a weekend or U.S. holiday

If + `RequestedFocDate` is not specified, the next available FOC date + meeting the criteria above will be used. If the Time portion of the + `RequestedFocDate` is omitted the port-in order will be activated at + the default activation time of 11:30 AM ET. If an activation time + other than 11:30 AM ET is desired, that activation time should be + included in the `RequestedFocDate`. + type: string Subscriber: oneOf: - $ref: '#/components/schemas/SubscriberBusiness' @@ -7818,13 +8186,7 @@ components: OrderId: type: string ProcessingStatus: - description: >- - The processing status of this order. Values may be: PROCESSING, - COMPLETED, FAILED. PROCESSING means that the system is still - processing the order. COMPLETED means that the order has been - successfully completed. FAILED means that errors occurred while - processing the order, and that the order did not make any - changes to the system. + description: The processing status of the order after it has been updated. enum: - REQUESTED_SUPP type: string @@ -8125,6 +8487,19 @@ components: type: string title: LnpOrderSupp type: object + LnpOrderSuppGlobalManual: + allOf: + - $ref: '#/components/schemas/LnpOrderBasicModifiableFields' + properties: + LosingCarrierName: + description: The name of the losing carrier the telephone numbers belong to. + type: string + Subscriber: + oneOf: + - $ref: '#/components/schemas/ManualGlobalSubscriberResidential' + - $ref: '#/components/schemas/ManualGlobalSubscriberBusiness' + title: LnpOrderSupp + type: object LnpOrderSuppInternal: allOf: - $ref: '#/components/schemas/LnpOrderBasicModifiableFields' @@ -8517,10 +8892,6 @@ components: to fully specify the ServiceAddress. maxLength: 2 type: string - RegionId: - deprecated: true - format: int32 - type: integer StateCode: description: >- StateCode is the 2-letter abbreviation of the state of the @@ -8609,6 +8980,284 @@ components: SkipAck: type: boolean type: object + ManualGlobalLnpOrderPutResponse: + properties: + LnpOrderResponse: + properties: + OrderId: + type: string + ProcessingStatus: + enum: + - REQUESTED_SUPP + type: string + Status: + properties: + Code: + type: integer + Description: + type: string + type: object + type: object + type: object + ManualGlobalLnpOrderRequest: + properties: + LnpOrder: + allOf: + - properties: + CustomerOrderId: + description: >- + The `CustomerOrderId` is an optional field that may be + provided by the customer and will remain with the order. The + value is opaque to Bandwidth. + format: Only alphanumeric values, dashes and spaces + maxLength: 40 + type: string + ListOfPhoneNumbers: + description: >- + `ListOfPhoneNumbers` is an array of `PhoneNumber`. At least + one `PhoneNumber` must be provided. + items: + properties: + PhoneNumber: + description: >- + One or more phone numbers is required.
Use a + `` tag for each phone number in the + `` list. + format: E164 phone number with no dots or dashes + type: string + type: object + type: array + LosingCarrierName: + description: >- + `LosingCarrierName` specifies the name of the losing + carrier + type: string + PeerId: + description: >- + `PeerId` specifies the numeric identifier of the SIP-peer + (Location) that the telephone numbers will be ported + into.

You can find the identifier for a SIP-peer + (location) by using `GET /accounts/id/sites/id/sippeers`, or + by clicking on 'Accounts' on the upper right of the + [Bandwidth Dashboard](Https://dashboard.bandwidth.com), then + clicking 'Locations' on the navigation bar. The SIP-peer + (location) identifiers are listed next to each location + name. If `PeerId` is omitted, the SIP-peer (location) + designated as the 'default location' for that site + (sub-account) will be used. + type: string + ProcessingStatus: + description: >- + Including `ProcessingStatus` with a value of DRAFT allows + you to create a port-in request, but not process the + request. This is useful if you wish to add items to the + order over a period of time and submit once you have the + order setup the way you want. Note, however, that draft + orders that have not been updated in a couple of days are + automatically deleted. Removal of stagnant draft orders is + performed so that telephone numbers are not tied up in these + orders, preventing them from being included in other + orders.

Very little validation is performed while + an order is in draft state. Omitting `ProcessingStatus` + causes the port-in to be validated and, if correct, + processed right away. The full validation is performed on + the order when you change the ProcessingStatus to + 'SUBMITTED' by performing a PUT request on the order. +

All toll free telephone numbers provided will be + validated (even in draft state) to ensure + + that they are portable, and to allow you to separate + telephone numbers into separate port-ins + + based on the RespOrg that they are being ported from.

+ enum: + - DRAFT + type: string + RequestedFocDate: + description: >- + Format: ISO8601 encoding such as "2019-10-31".

For + global ports, if `RequestedFocDate` is specified the time + portions will be ignored and the date portion must be:
+ - in the future
- not on a weekend. + type: string + SiteId: + description: >- + `SiteId` specifies the identifier of the site (sub-account) + that the telephone numbers will be ported into.

You + can find the identifier for a site (sub-account) by using + `GET /accounts/id/sites`, or by clicking on 'Manage + sub-account' for the desired sub-account on the main page of + the Bandwidth Dashboard. + format: int32 + type: integer + Subscriber: + oneOf: + - $ref: '#/components/schemas/ManualGlobalSubscriberResidential' + - $ref: '#/components/schemas/ManualGlobalSubscriberBusiness' + required: + - SiteId + - ListOfPhoneNumbers + - LosingCarrierName + type: object + title: Manual Global LNP Order Request + type: object + ManualGlobalLnpOrderResponse: + properties: + LnpOrderResponse: + properties: + CountryCodeA3: + description: The ISO-3166 alpha 3 code of the country the numbers belong to. + type: string + Errors: + properties: + Code: + description: Numeric designation of corresponding error. + type: integer + Description: + description: Detailed explanation about error. + type: string + type: object + ListOfPhoneNumbers: + description: >- + ListOfPhoneNumbers is an array of PhoneNumber. At least one + PhoneNumber must be provided for all port-types. + items: + $ref: '#/components/schemas/PhoneNumber' + type: array + LosingCarrierName: + description: The name of the losing carrier the telephone numbers belong to. + type: string + OrderId: + description: Unique orderId that is used to manage the order. + type: string + PeerId: + description: >- + The numeric designation for the Location or SIP Peer ID that + applied to the Port-in Order. The SIP Peer ID is used to provide + a home within the location for the TN(s) that were ported in by + the Port-in Order + type: string + PhoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + PortType: + description: Port type + enum: + - MANUAL + type: string + ProcessingStatus: + description: >- + The processing status of this order. PROCESSING means that the + system is still processing the order. COMPLETE means that the + order has been successfully completed. EXCEPTION means that + errors occurred while processing the order, and that the order + did not make any changes to the system. + enum: + - DRAFT + - PENDING_DOCUMENTS + - SUBMITTED + - FOC + - COMPLETE + - EXCEPTION + - REQUESTED_CANCEL + - CANCELLED + - REQUESTED_SUPP + type: string + SiteId: + description: >- + The numeric designation for the Site ID that applied to the + Port-in Order. The SiteId is used to provide a home within the + account for the TN(s) that were ported in by the Port-in Order + type: string + Status: + properties: + Code: + type: integer + Description: + type: string + type: object + Subscriber: + oneOf: + - $ref: '#/components/schemas/ManualGlobalSubscriberResidential' + - $ref: '#/components/schemas/ManualGlobalSubscriberBusiness' + type: object + title: Manual Global LNP Order Response + type: object + ManualGlobalSubscriberBusiness: + properties: + AddressId: + description: >- + UUID of the address created with the + `/accounts/{accountId}/addresses` API endpoint. + maxLength: 36 + type: string + BusinessName: + maxLength: 25 + type: string + SubscriberType: + enum: + - BUSINESS + type: string + VatNumber: + description: >- + The `VatNumber` is the value of the VAT number associated with the + subscriber. This field is required when porting numbers for a subset + of countries when the SubscriberType is `BUSINESS`. + maxLength: 36 + type: string + required: + - SubscriberType + - AddressId + - BusinessName + - VatNumber + title: BUSINESS + type: object + ManualGlobalSubscriberResidential: + properties: + AddressId: + description: >- + UUID of the address created with the + `/accounts/{accountId}/addresses` API endpoint. + maxLength: 36 + type: string + FirstName: + maxLength: 25 + type: string + LastName: + maxLength: 25 + type: string + MiddleInitial: + maxLength: 1 + type: string + SubscriberType: + enum: + - RESIDENTIAL + type: string + required: + - SubscriberType + - AddressId + - FirstName + - LastName + title: RESIDENTIAL + type: object + ManualNANPTollFreeLnpOrderRequest: + description: >- + Manual indicates that the port-in will be processed manually by + Bandwidth’s Local Number Portability team. Currently all toll free + port-ins are handled manually by Bandwidth’s Local Number Portability + team. But Bandwidth is in the process of automating portions of toll + free porting, with a goal of eventually automating the entire process. + properties: + LnpOrder: + allOf: + - $ref: '#/components/schemas/LnpOrderBasic' + properties: + Subscriber: + allOf: + - $ref: '#/components/schemas/SubscriberBusiness' + type: object + type: object + title: Manual NANP Toll-Free LNP Order Request + type: object ManualPortOutRequest: properties: BulkPortOut: @@ -8636,25 +9285,6 @@ components: TelephoneNumberToPort: type: string type: object - ManualTollFreeLnpOrderRequest: - description: >- - Manual indicates that the port-in will be processed manually by - Bandwidth’s Local Number Portability team. Currently all toll free - port-ins are handled manually by Bandwidth’s Local Number Portability - team. But Bandwidth is in the process of automating portions of toll - free porting, with a goal of eventually automating the entire process. - properties: - LnpOrder: - allOf: - - $ref: '#/components/schemas/LnpOrderBasic' - properties: - Subscriber: - allOf: - - $ref: '#/components/schemas/SubscriberBusiness' - type: object - type: object - title: Manual Toll-Free - type: object ManuallyPortableTollFreeNumberList: properties: DisconnectedTollFreeNumberList: @@ -8968,6 +9598,52 @@ components: TotalCount: type: integer type: object + NANPATNDetail: + description: Returned when `enableTnDetail=True` for NANPA numbers + properties: + LATA: + example: 426 + type: number + xml: + name: LATA + city: + $ref: '#/components/schemas/city' + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + fullNumber: + example: 17722029845 + type: string + xml: + name: FullNumber + phoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + rateCenter: + example: SEBASTIAN + type: string + xml: + name: RateCenter + state: + example: FL + type: string + xml: + name: State + tier: + example: 0 + type: number + xml: + name: Tier + vendorId: + example: 49 + type: number + xml: + name: VendorId + vendorName: + example: Bandwidth CLEC + type: string + xml: + name: VendorName + title: NANPA TN Detail + type: object NNRoute: properties: DeliveryNetwork: @@ -8988,15 +9664,6 @@ components: trafficType: type: string type: object - NPANXXSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - NPANXXSearchAndOrderType: - $ref: '#/components/schemas/NPANXXSearchAndOrderType' - type: object - xml: - name: Order NPANXXSearchAndOrderResponse: properties: order: @@ -9030,6 +9697,15 @@ components: type: object xml: name: NPANXXSearchAndOrderType + NPANXXSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + NPANXXSearchAndOrderType: + $ref: '#/components/schemas/NPANXXSearchAndOrderType' + type: object + xml: + name: Order NonPortableTollFreeNumberList: properties: DeniedTollFreeNumberList: @@ -9253,15 +9929,15 @@ components: type: object title: Number Portability Response type: object - OffNetLnpOrderRequest: + OffNetNANPLnpOrderRequest: properties: LnpOrder: allOf: - $ref: '#/components/schemas/LnpOrderBasic' - $ref: '#/components/schemas/LnpOrderAdditionalFields' - title: Off-net + title: Off-net NANP LNP Order Request type: object - OnNetLnpOrderRequest: + OnNetNANPLnpOrderRequest: properties: LnpOrder: allOf: @@ -9298,7 +9974,7 @@ components: $ref: '#/components/schemas/TnAttribute' type: array type: object - title: On-net + title: On-net NANP LNP Order Request type: object OrderCreatedDate: description: Creation date of the order. @@ -9473,6 +10149,29 @@ components: $ref: '#/components/schemas/OriginationRoutePayload' type: array type: object + OtherTNDetail: + description: Returned when `enableTnDetail=True` for Other numbers + properties: + areaCode: + $ref: '#/components/schemas/areaCode' + city: + $ref: '#/components/schemas/city' + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + fullNumber: + example: 31208908115 + type: string + xml: + name: FullNumber + phoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + tier: + example: 0 + type: number + xml: + name: Tier + title: Other TN Detail + type: object PaginationLinks: properties: first: @@ -9488,7 +10187,7 @@ components: PhoneNumber: properties: PhoneNumber: - description: Simple Telephone Number. + description: Telephone Number in E.164 format. type: string type: object PidfloAddressDeleting911Order: @@ -10299,15 +10998,6 @@ components: $ref: '#/components/schemas/LnpCheckerTnList' title: Rate Center information type: object - RateCenterSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - RateCenterSearchAndOrderType: - $ref: '#/components/schemas/RateCenterSearchAndOrderType' - type: object - xml: - name: Order RateCenterSearchAndOrderResponse: properties: order: @@ -10343,6 +11033,15 @@ components: type: object xml: name: RateCenterSearchAndOrderType + RateCenterSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + RateCenterSearchAndOrderType: + $ref: '#/components/schemas/RateCenterSearchAndOrderType' + type: object + xml: + name: Order RateCenterSearchResult: properties: Abbreviation: @@ -10875,6 +11574,35 @@ components: type: integer type: object type: object + Restriction: + properties: + CountryCodeA3: + type: string + RestrictionCategory: + type: string + RestrictionDescription: + type: string + RestrictionType: + $ref: '#/components/schemas/RestrictionType' + type: object + RestrictionResponse: + properties: + RestrictionResponse: + properties: + Restrictions: + items: + $ref: '#/components/schemas/Restriction' + type: array + type: object + type: object + RestrictionType: + enum: + - LEGAL + - PURCHASE + - SERVICE + - NRA + example: LEGAL + type: string RogerTerminationSettings: properties: SubnetAddressingAllowed: @@ -10930,46 +11658,33 @@ components: type: object SearchResult: oneOf: - - properties: - ResultCount: - format: int32 - type: integer - TelephoneNumberList: - items: - $ref: '#/components/schemas/TelephoneNumber' - type: array - type: object - - properties: - resultCount: - format: int32 - type: integer - telephoneNumberDetailList: - items: - $ref: '#/components/schemas/telephoneNumberDetail' - type: array - xml: - name: TelephoneNumberDetailList - xml: - name: ResultCount - type: object + - $ref: '#/components/schemas/TNDetailDisabled' + - $ref: '#/components/schemas/TNDetailEnabled' xml: name: SearchResult SearchResultError: properties: - Error: + error: properties: - Code: + code: + example: 4010 type: integer - Description: + xml: + name: Code + description: + example: >- + One of more required search parameters are null or empty, please + refer to the api documentation type: string + xml: + name: Description type: object + xml: + name: Error title: SearchResult type: object - SearchResultErrorWrapper: - properties: - SearchResult: - $ref: '#/components/schemas/SearchResultError' - type: object + xml: + name: SearchResult SearchResultForAvailableNpaNxx: properties: AvailableNpaNxxList: @@ -11425,6 +12140,8 @@ components: properties: Address: $ref: '#/components/schemas/Address' + BillingIdentifier: + type: string CallVerificationEnabled: type: boolean CallingName: @@ -11580,13 +12297,6 @@ components: MessagingSettings: description: Does this telephone number have any messaging system configured type: string - NumberFormat: - enum: - - 10digit - - 11digit - - e164 - - 'false' - type: string RPIDFormat: description: Telephone number RPID format enum: @@ -11606,26 +12316,6 @@ components: type: string type: array type: object - SipPeerTelephoneNumberBulk: - properties: - SipPeerTelephoneNumbers: - items: - type: string - xml: - name: FullNumber - maxItems: 5000 - type: array - type: object - SipPeerTelephoneNumberBulkErrorResponse: - properties: - SipPeerTelephoneNumberMoveResponse: - $ref: '#/components/schemas/ResponseStatus' - type: object - SipPeerTelephoneNumberBulkResponse: - properties: - SipPeerTelephoneNumberMoveResponse: - $ref: '#/components/schemas/SipPeerTelephoneNumberBulk' - type: object SipPeerTelephoneNumberResponse: properties: SipPeerTelephoneNumber: @@ -11789,21 +12479,6 @@ components: Name: type: string type: object - SiteOrdersResponse: - properties: - ResponseSelectWrapper: - properties: - ListOrderIdUserIdDate: - properties: - OrderIdUserIdDate: - items: - $ref: '#/components/schemas/OrderSummary' - type: array - TotalCount: - type: integer - type: object - type: object - type: object SitePayload: properties: Address: @@ -11961,15 +12636,6 @@ components: type: integer title: HttpSettings type: object - StateSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - StateSearchAndOrderType: - $ref: '#/components/schemas/StateSearchAndOrderType' - type: object - xml: - name: Order StateSearchAndOrderResponse: properties: order: @@ -12001,6 +12667,15 @@ components: type: object xml: name: StateSearchAndOrderType + StateSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + StateSearchAndOrderType: + $ref: '#/components/schemas/StateSearchAndOrderType' + type: object + xml: + name: Order StateWithCount: properties: Count: @@ -12171,7 +12846,6 @@ components: - lsrorders - e911s - tnoptions - - externalTns - lidb - bulkPortins - importtnorders @@ -12219,6 +12893,43 @@ components: type: array type: object type: object + TNDetailDisabled: + properties: + resultCount: + example: 1 + type: integer + xml: + name: ResultCount + telephoneNumberList: + items: + example: '+17722029845' + type: string + xml: + name: TelephoneNumber + type: array + xml: + name: TelephoneNumberList + wrapped: true + title: TN Detail Disabled + type: object + TNDetailEnabled: + properties: + resultCount: + example: 1 + type: integer + xml: + name: ResultCount + telephoneNumberDetailList: + items: + oneOf: + - $ref: '#/components/schemas/NANPATNDetail' + - $ref: '#/components/schemas/OtherTNDetail' + type: array + xml: + name: TelephoneNumberDetailList + wrapped: true + title: TN Detail Enabled + type: object TNSipPeersResponse: properties: SipPeers: @@ -12316,7 +13027,7 @@ components: TelephoneNumber: properties: TelephoneNumber: - description: Simple Telephone Number. + description: Telephone Number in E.164 format. type: string type: object TelephoneNumberAvailableNnRoutes: @@ -13391,16 +14102,16 @@ components: OrderResponse: oneOf: - $ref: '#/components/schemas/ExistingTelephoneNumberOrder' - - $ref: '#/components/schemas/RateCenterSearchAndOrder' - - $ref: '#/components/schemas/AreaCodeSearchAndOrder' - - $ref: '#/components/schemas/NPANXXSearchAndOrder' - - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder' - - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder' - - $ref: '#/components/schemas/LATASearchAndOrder' - - $ref: '#/components/schemas/ZIPSearchAndOrder' - - $ref: '#/components/schemas/CitySearchAndOrder' - - $ref: '#/components/schemas/StateSearchAndOrder' - - $ref: '#/components/schemas/CombinedSearchAndOrder' + - $ref: '#/components/schemas/RateCenterSearchAndOrder_NANPA' + - $ref: '#/components/schemas/AreaCodeSearchAndOrder_NANPA' + - $ref: '#/components/schemas/NPANXXSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/LATASearchAndOrder_NANPA' + - $ref: '#/components/schemas/ZIPSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/StateSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CombinedSearchAndOrder_NANPA' xml: name: OrderResponse type: object @@ -13464,16 +14175,16 @@ components: Order: oneOf: - $ref: '#/components/schemas/ExistingTelephoneNumberOrder' - - $ref: '#/components/schemas/RateCenterSearchAndOrder' - - $ref: '#/components/schemas/AreaCodeSearchAndOrder' - - $ref: '#/components/schemas/NPANXXSearchAndOrder' - - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder' - - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder' - - $ref: '#/components/schemas/LATASearchAndOrder' - - $ref: '#/components/schemas/ZIPSearchAndOrder' - - $ref: '#/components/schemas/CitySearchAndOrder' - - $ref: '#/components/schemas/StateSearchAndOrder' - - $ref: '#/components/schemas/CombinedSearchAndOrder' + - $ref: '#/components/schemas/RateCenterSearchAndOrder_NANPA' + - $ref: '#/components/schemas/AreaCodeSearchAndOrder_NANPA' + - $ref: '#/components/schemas/NPANXXSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/LATASearchAndOrder_NANPA' + - $ref: '#/components/schemas/ZIPSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/StateSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CombinedSearchAndOrder_NANPA' OrderCompleteDate: type: string OrderStatus: @@ -13704,15 +14415,6 @@ components: TerminationSettings: $ref: '#/components/schemas/TollFreeSettings' type: object - TollFreeVanitySearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - TollFreeVanitySearchAndOrderType: - $ref: '#/components/schemas/TollFreeVanitySearchAndOrderType' - type: object - xml: - name: Order TollFreeVanitySearchAndOrderResponse: properties: order: @@ -13744,12 +14446,12 @@ components: type: object xml: name: TollFreeVanitySearchAndOrderType - TollFreeWildCharSearchAndOrder: + TollFreeVanitySearchAndOrder_NANPA: allOf: - $ref: '#/components/schemas/orderMetadata' - properties: - TollFreeWildCharSearchAndOrderType: - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrderType' + TollFreeVanitySearchAndOrderType: + $ref: '#/components/schemas/TollFreeVanitySearchAndOrderType' type: object xml: name: Order @@ -13784,6 +14486,15 @@ components: type: object xml: name: TollFreeWildCharSearchAndOrderType + TollFreeWildCharSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + TollFreeWildCharSearchAndOrderType: + $ref: '#/components/schemas/TollFreeWildCharSearchAndOrderType' + type: object + xml: + name: Order Tpas: items: $ref: '#/components/schemas/Tpa' @@ -13795,6 +14506,13 @@ components: Ratio: type: integer type: object + TypeOfAddress: + enum: + - WORLDWIDE + - NATIONAL + - LOCAL + example: WORLDWIDE + type: string UcTrunkingCloudSettings: properties: BiDirectionalTrunks: @@ -13977,15 +14695,6 @@ components: type: string title: WirelessInfo type: object - ZIPSearchAndOrder: - allOf: - - $ref: '#/components/schemas/orderMetadata' - - properties: - ZIPSearchAndOrderType: - $ref: '#/components/schemas/ZIPSearchAndOrderType' - type: object - xml: - name: Order ZIPSearchAndOrderResponse: properties: order: @@ -14017,6 +14726,15 @@ components: type: object xml: name: ZIPSearchAndOrderType + ZIPSearchAndOrder_NANPA: + allOf: + - $ref: '#/components/schemas/orderMetadata' + - properties: + ZIPSearchAndOrderType: + $ref: '#/components/schemas/ZIPSearchAndOrderType' + type: object + xml: + name: Order Zone: properties: Id: @@ -14030,6 +14748,17 @@ components: description: User's account ID example: '1234567' type: string + additionalDetails: + properties: + comment: + description: Comment + example: Updating regulations + type: string + xml: + name: Comment + type: object + xml: + name: AdditionalDetails address: nullable: false properties: @@ -14080,6 +14809,115 @@ components: - zip - url type: object + addressFieldSchema: + properties: + changeable: + description: The address field value can be updated or not + example: false + title: Field Changeable + type: boolean + fieldName: + description: The name of the address field + example: addressLine1 + title: Field Name + type: string + maxLength: + description: The legth of the address field + example: 256 + title: Field Length + type: integer + required: + description: The address field is required or optional + example: true + title: Field Required + type: boolean + type: + description: The data type of the address field + example: string + title: Field Data Type + type: string + usedBy: + items: + properties: + feature: + description: The name of the feature that this address could be used for + enum: + - EMERGENCY + - PORTING + - REQUIREMENTS_PACKAGE + example: EMERGENCY + title: Feature Name + type: string + required: + description: The address field is required or optional for this feature + example: true + title: Field Required + type: boolean + type: object + title: Feature Specific Requirements + type: array + title: Country Specific Address Fields Schema + type: object + addressId: + description: Address Id + example: daa9dd0f-de97-4103-8530-b31bf4be8fc0 + title: Address Id + type: string + addressLinks: + items: + oneOf: + - $ref: '#/components/schemas/selfLink' + title: Links + type: array + addressResponse: + properties: + addressId: + $ref: '#/components/schemas/addressId' + addressLine1: + description: The number and street address of the address. + example: 14111 NE 145th St + title: Address Line1 + type: string + addressLine2: + description: The number and street address of the address. + example: Apt. 8 + title: Address Line2 + type: string + city: + $ref: '#/components/schemas/city' + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + createdDateTime: + $ref: '#/components/schemas/createdDateTime' + customReference: + $ref: '#/components/schemas/customReference' + isHidden: + $ref: '#/components/schemas/isHidden' + postalCode: + $ref: '#/components/schemas/postalCode' + state: + description: The state or region of the address. + example: WA + title: State + type: string + updatedDateTime: + $ref: '#/components/schemas/updatedDateTime' + title: '=Address Response' + type: object + areaCode: + description: The 1 to 6 digit area code associated with the phone number. + example: '435' + title: Area Code + type: string + xml: + name: AreaCode + city: + description: The city of the address. + example: Raleigh + title: City + type: string + xml: + name: City contact: nullable: false properties: @@ -14103,6 +14941,158 @@ components: - email - phoneNumber type: object + countryCodeA3: + description: Country code of the address in ISO 3166-1 alpha-3 format. + example: USA + title: Country Code + type: string + xml: + name: CountryCodeA3 + countryCoverage: + properties: + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + phoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + regions: + items: + $ref: '#/components/schemas/region' + type: array + xml: + name: Regions + wrapped: true + type: object + xml: + name: CountryCoverage + countryCoverages: + items: + $ref: '#/components/schemas/countryCoverage' + type: array + xml: + name: CountryCoverages + wrapped: true + countrySetting: + properties: + additionalDetails: + $ref: '#/components/schemas/additionalDetails' + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + features: + description: List of features configured for the specified countryCodeA3 + items: + properties: + featureName: + description: Feature Name + example: Ordering + type: string + xml: + name: FeatureName + isDisabled: + description: Feature Status + example: true + type: boolean + xml: + name: IsDisabled + type: object + xml: + name: Feature + type: array + xml: + name: Features + wrapped: true + phoneNumberType: + $ref: '#/components/schemas/phoneNumberType' + type: object + xml: + name: CountrySetting + countrySettings: + items: + $ref: '#/components/schemas/countrySetting' + type: array + xml: + name: CountrySettings + wrapped: true + createAddressRequest: + properties: + addressLine1: + description: The number and street address of the address. + example: 14111 NE 145th St + title: Address Line1 + type: string + addressLine2: + description: The number and street address of the address. + example: Apt. 8 + title: Address Line2 + type: string + city: + $ref: '#/components/schemas/city' + countryCodeA3: + $ref: '#/components/schemas/countryCodeA3' + customReference: + $ref: '#/components/schemas/customReference' + isHidden: + $ref: '#/components/schemas/isHidden' + postalCode: + $ref: '#/components/schemas/postalCode' + state: + description: The state or region of the address. + example: WA + title: State + type: string + title: Create Address Request + type: object + createUpdateAddressLink: + properties: + href: + description: URI of the link. + example: /accounts/{accountId}/addresses/{addressId} + type: string + method: + description: HTTP method to be used. + example: GET + type: string + rel: + description: Specifies the link to get the updated or created address. + example: RelatedResource + type: string + title: Create Address Link + type: object + createUpdateAddressLinks: + items: + oneOf: + - $ref: '#/components/schemas/selfLink' + - $ref: '#/components/schemas/createUpdateAddressLink' + title: Links + type: array + createUpdateAddressResponse: + properties: + data: + properties: + address: + $ref: '#/components/schemas/addressResponse' + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + links: + $ref: '#/components/schemas/createUpdateAddressLinks' + title: Update Address Response + type: object + createdDateTime: + description: The created date time in ISO 8601 format. + example: '2015-03-11T04:09:25.399Z' + type: string + customReference: + description: >- + Customer reference. It can be used for your own reference, e.g. to + uniquely identify one of your customers. + example: home_office + maxLength: 64 + minLength: 1 + title: Customer Reference + type: string denialReasonDescription: description: Denial reason explanation example: Disallowed Content - Gambling @@ -14119,6 +15109,65 @@ components: pattern: >- ^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$ type: string + error: + properties: + code: + description: >- + An application-specific error code for services with extensive error + scenarios to supplement `description`. + example: 51130 + format: int32 + minimum: 4 + type: integer + description: + description: >- + A human-readable explanation that SHOULD be specific to this + occurrence of the problem. + example: There was an issue with a field in your request body + type: string + id: + description: A unique identifier for this particular instance of this problem. + example: optional-error-id + type: string + meta: + description: >- + A meta object containing application-specific information or + non-standard metadata about the error. + type: object + source: + $ref: '#/components/schemas/errorSource' + type: + description: >- + A short, human-readable summary of the problem that SHOULD NOT + change from occurrence to occurrence of the problem. + example: REQUEST_ERROR + type: string + required: + - description + title: Error + type: object + errorSource: + properties: + field: + description: A string indicating which request body field caused the error. + example: someField + type: string + header: + description: A string indicating which header field caused the error. + example: someHeader + type: string + parameter: + description: A string indicating which URI query parameter caused the error. + example: someParameter + type: string + reference: + description: >- + A string that references a resource ID or path to the resource (or + non-existent resource) causing the error. + example: /some/reference + type: string + title: Error Source + type: object failureWebhookRequest: properties: accountId: @@ -14163,6 +15212,56 @@ components: type: string type: object type: object + genericAddressResponse: + properties: + data: + properties: + address: + $ref: '#/components/schemas/addressResponse' + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + links: + $ref: '#/components/schemas/addressLinks' + title: Address Response + type: object + genericError: + properties: + errors: + items: + $ref: '#/components/schemas/error' + nullable: true + type: array + required: + - errors + title: Generic Error + type: object + getAddressFieldsResponse: + properties: + data: + properties: + addressFields: + items: + $ref: '#/components/schemas/addressFieldSchema' + type: array + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + title: Get Address Fields Response + type: object + isHidden: + description: >- + Hide Address. It can be used to hide the address when it is no longer + needed. + example: false + title: Hide Address + type: boolean jsonPatch: items: $ref: '#/components/schemas/jsonPatchItem' @@ -14193,6 +15292,64 @@ components: - op - path type: object + listAddressesLinks: + items: + oneOf: + - $ref: '#/components/schemas/selfLink' + - $ref: '#/components/schemas/listPrevPageAddressesLink' + - $ref: '#/components/schemas/listNextPageAddressesLink' + title: Links + type: array + listAddressesResponse: + properties: + data: + properties: + addresses: + items: + $ref: '#/components/schemas/addressResponse' + type: array + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + links: + $ref: '#/components/schemas/listAddressesLinks' + title: List Addresses Response + type: object + listNextPageAddressesLink: + properties: + href: + description: URI of the link. + example: /accounts/{accountId}/addresses?afterCursor={cursorId} + type: string + method: + description: HTTP method to be used. + example: GET + type: string + rel: + description: Specifies the link to next page + example: RelatedResource + type: string + title: Address Link for Next Page + type: object + listPrevPageAddressesLink: + properties: + href: + description: URI of the link. + example: /accounts/{accountId}/addresses?beforeCursor={cursorId} + type: string + method: + description: HTTP method to be used. + example: GET + type: string + rel: + description: Specifies the link to previous page + example: RelatedResource + type: string + title: Address Link for Previous Page + type: object lnpPortInfoForGivenStatus: properties: ActualFOCDate: @@ -14337,6 +15494,136 @@ components: name: OrderCreateDate type: object type: object + phoneNumberType: + description: Phone number type + enum: + - GEOGRAPHIC + - NATIONAL + - MOBILE + - TOLL_FREE + - SHARED_COST + example: MOBILE + title: Phone Number Type + type: string + xml: + name: PhoneNumberType + portingLosingCarriersResponseSchema: + properties: + data: + properties: + losingCarriers: + items: + properties: + name: + description: The losing carrier name. + example: Losing Carrier 1 + title: Losing Carrier Name + type: string + type: object + type: array + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + links: + $ref: '#/components/schemas/selfLink' + title: List Addresses Response + type: object + postalCode: + description: The postal code of the address. + example: '98072' + title: Postal Code + type: string + product: + properties: + features: + items: + description: Feature Name + example: Ordering + type: string + xml: + name: Feature + type: array + xml: + name: Features + wrapped: true + name: + description: Product Name + example: NumberManagement + type: string + xml: + name: Name + type: object + xml: + name: Product + productWithCountrySettings: + properties: + countrySettings: + $ref: '#/components/schemas/countrySettings' + features: + items: + description: Feature Name + example: Ordering + type: string + xml: + name: Feature + type: array + xml: + name: Features + wrapped: true + name: + description: Product Name + example: NumberManagement + type: string + xml: + name: Name + type: object + xml: + name: Product + region: + properties: + areaCode: + $ref: '#/components/schemas/areaCode' + city: + $ref: '#/components/schemas/city' + type: object + xml: + name: Region + responseStatus: + properties: + description: + description: 'Detailed explanation about error ' + example: A supplied phoneNumberType within '[SPECIALLL]' is invalid. + type: string + xml: + name: Description + errorCode: + description: Numeric designation of corresponding error + example: 4010 + type: integer + xml: + name: ErrorCode + type: object + xml: + name: ResponseStatus + selfLink: + properties: + href: + description: URI of the link. + example: /self/uri + type: string + method: + description: HTTP method to be used. + example: GET + type: string + rel: + description: Specifies the relationship between this link and the resource. + example: SelfResource + type: string + title: Self Link + type: object shortCode: description: Short code registration. properties: @@ -14884,52 +16171,6 @@ components: - is required - can not be empty type: object - telephoneNumberDetail: - description: Returned when `enableTnDetail=True` - properties: - city: - example: MICCO - type: string - xml: - name: City - fullNumber: - example: 17722029845 - type: string - xml: - name: FullNumber - lata: - example: 46018 - type: number - xml: - name: LATA - rateCenter: - example: SEBASTIAN - type: string - xml: - name: RateCenter - state: - example: FL - type: string - xml: - name: State - tier: - example: 0 - type: number - xml: - name: Tier - vendorId: - example: 49 - type: number - xml: - name: VendorId - vendorName: - example: Bandwidth CLEC - type: string - xml: - name: VendorName - type: object - xml: - name: TelephoneNumberDetail tfPhoneNumber: description: Toll-free telephone number in E.164 format example: '+18005555555' @@ -15022,6 +16263,40 @@ components: example: abc-d8569gh type: string type: object + unsupportedFeatures: + description: Excluded Features + items: + properties: + addressCriteria: + items: + properties: + description: + description: >- + A human-readable explanation that SHOULD be specific to this + occurrence of the problem. + example: 'missing fields: addressLine2' + type: string + type: object + type: array + featureName: + description: A unique identifier for feature. + example: EMERGENCY + type: string + type: object + title: Excluded Features + type: array + updateAddressRequest: + properties: + customReference: + $ref: '#/components/schemas/customReference' + isHidden: + $ref: '#/components/schemas/isHidden' + title: Update Address Request + type: object + updatedDateTime: + description: The updated date time in ISO 8601 format. + example: '2015-03-11T04:09:25.399Z' + type: string useCase: example: 2FA maxLength: 500 @@ -15042,6 +16317,47 @@ components: items: type: string type: array + validateAddressLink: + properties: + href: + description: URI of the link. + example: /accounts/{accountId}/addresses + type: string + method: + description: HTTP method to be used. + example: POST + type: string + rel: + description: Specifies the link to create the address. + example: RelatedResource + type: string + title: Validate Address Link + type: object + validateAddressLinks: + items: + oneOf: + - $ref: '#/components/schemas/selfLink' + - $ref: '#/components/schemas/validateAddressLink' + title: Links + type: array + validateAddressResponse: + properties: + data: + properties: + address: + $ref: '#/components/schemas/createAddressRequest' + unsupportedFeatures: + $ref: '#/components/schemas/unsupportedFeatures' + type: object + errors: + example: [] + items: + $ref: '#/components/schemas/error' + type: array + links: + $ref: '#/components/schemas/validateAddressLinks' + title: Validate Address Response + type: object verificationRequest: properties: additionalInformation: @@ -15196,8 +16512,11 @@ info: Bandwidth's Account and Number Management API - For the previous documentation visit - [v2.dev.bandwidth.com](https://v2.dev.bandwidth.com/numbers/apiReference.html). + ## Early Access Feature + + The V2 APIs are still in early access phase and are not ready for general + use. Please contact your Bandwidth Account Manager or Bandwidth Support to + request access to these APIs. ### Disclaimer @@ -15290,114 +16609,248 @@ paths: summary: Retrieve account tags: - Account - /accounts/{accountId}/addresses: + /accounts/{accountId}/activationRequirements: get: - description: GET is used to retrieve all addresses. - operationId: GetAllAddresses - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: >- - Search criterion for address by its locationid. Cannot be combined - with type. Always returns E911 addresses. - example: 47950147-9c58-407c-bcc4-e88743b20db5 - in: query - name: e911locationid - required: false - schema: - type: string - - description: Search criterion for addresses by their type. - example: e911 - in: query - name: type - required: true - schema: - type: string - - description: >- - An ID of the first element in a page. This value will indicate the - first value, not the page number, of the initial entry in the page - being requested.
It can be an id of address. The initial page is - tagged with the ID `1`. - example: '3' - in: query - name: page - required: false - schema: - default: '1' - type: string - - description: The number of items to include in a page. - example: 5000 - in: query - name: size - required: false - schema: - default: 500 - type: integer - - description: The text to search simultaneously through e911locationIds. - example: name - in: query - name: suggestions - required: false - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 1 - - Link=<http://admin.localhost:8080/api/accounts/8000259/addresses?type=e911&page=1&size=500>;rel="first"; - Link=<http://localhost:8080/api/accounts/8000259/addresses?type=E911&page=501&size=500>;rel="next"; - - -
- 207 - - - Elmastar - AlternateStar - - - Carpinteriaaly - NY - 93019 - - - United States - E911 - 2 - VALID -
-
-
- schema: - $ref: '#/components/schemas/AddressesResponseWrapper' + description: >- + Some numbers have to be activated before the service can be enabled by + Bandwidth. Activating a number is done by providing an activation that + links to the number, and a proof of residency if required. This API + provides all countries and number types that need activation. + operationId: ListActivationRequirements + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/countryCodeA3QueryParam' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + + + BEL + GEOGRAPHIC + WORLDWIDE + false + true + + + ITA + GEOGRAPHIC + WORLDWIDE + false + true + + + ZAF + GEOGRAPHIC + WORLDWIDE + false + true + + + TUR + GEOGRAPHIC + WORLDWIDE + false + true + + + + schema: + $ref: '#/components/schemas/ActivationRequirementResponse' description: >- - OK - the addresses retrieval request will return a list of all - addresses having specified type. + This response returns the list of cities, along with the Rate + Centers that serve those Activation Requirements. If available is + specified then the number of TNs available in that city / RC + combination is also included. '404': content: application/xml: examples: - example: + AccountNotFound: + description: >- + Below is an example of response API will produce when given + account is not found or locked. value: |- - - - The resource does not exist - - + + + 4022 + Account '2' does not exist or is locked + + + GlobalServicesNotEnabled: + description: >- + Below is an example of response API will produce when Global + Services are not enabled for an account. + value: |- + + + + 4026 + Global Services are currently disabled for the account. Please contact support if you believe Global Services should be enabled. + + schema: - $ref: '#/components/schemas/AddressesResponseNotFound' + $ref: '#/components/schemas/ActivationRequirementErrorResponse' description: >- - Not Found - if the account specified does not exist or is locked or - there are no addresses for specified search criteria it will result - in a not found. - summary: Retrieve all addresses + This error response is returned when Activation Requirements can not + be fetched for given customer/account because Global Services are + not enabled. In order to get activation requirement information, + Global Services setting must be enabled for the account. + summary: List Activation Requirements + tags: + - Compliance + /accounts/{accountId}/addresses: + get: + description: >- + List all addresses. The results are sorted by last updated time in + reverse chronological order by default without any query filters. + operationId: listAddresses + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/customReferenceQueryParam_eq_startsWith' + - $ref: '#/components/parameters/countryCodeA3QueryParam_eq' + - $ref: '#/components/parameters/cityQueryParam_eq_startsWith' + - $ref: '#/components/parameters/postalCodeQueryParam_eq_startsWith' + - $ref: '#/components/parameters/isHiddenQueryParam_eq' + - $ref: '#/components/parameters/beforeCursorQueryParam_eq' + - $ref: '#/components/parameters/afterCursorQueryParam_eq' + - $ref: '#/components/parameters/limitQueryParam_eq' + responses: + '200': + $ref: '#/components/responses/listAddressesResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: List Addresses + tags: + - Addresses + post: + description: >- + Create an address. Use GET /adddresses/fields for a full list of country + specific address fields. + operationId: addAddress + requestBody: + $ref: '#/components/requestBodies/addAddressRequest' + responses: + '201': + $ref: '#/components/responses/createAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: Add Address + tags: + - Addresses + /accounts/{accountId}/addresses/validator: + post: + description: >- + Returns features that will NOT work for the entered address. Please note + that if a feature is absent from unsupportedFeatures, it does not + guarantee that it will pass validation and can be used. + operationId: validateAddress + requestBody: + $ref: '#/components/requestBodies/addAddressRequest' + responses: + '200': + $ref: '#/components/responses/validateAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: Validate Address + tags: + - Addresses + /accounts/{accountId}/addresses/{addressId}: + get: + description: Get an address. + operationId: getAddress + parameters: + - $ref: '#/components/parameters/addressIdPathParam' + responses: + '200': + $ref: '#/components/responses/getAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: Get Address + tags: + - Addresses + patch: + description: >- + Update an address. Use GET /adddresses/fields for a full list of country + specific address fields that can be updated. + operationId: updateAddress + parameters: + - $ref: '#/components/parameters/addressIdPathParam' + requestBody: + $ref: '#/components/requestBodies/updateAddressRequest' + responses: + '200': + $ref: '#/components/responses/updateAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: Update Address tags: - Addresses /accounts/{accountId}/aeuis: @@ -16115,7 +17568,7 @@ paths: name: areaCode required: false schema: - type: integer + type: string - description: Returns only the NPA NXX information within the specified state. example: NC in: query @@ -16178,17 +17631,118 @@ paths: $ref: >- #/components/schemas/SearchResultForAvailableNpaNxxErrorWrapper description: There are no phone numbers within the specified scope. - summary: Retrieves available Npa-Nxx tns + summary: Retrieves available Npa-Nxx tns [NANPA] tags: - Available Tns /accounts/{accountId}/availableNumbers: get: - description: |- + description: >- Retrieves the phone numbers according to the input parameters. -

In this table are presented combinations of path parameters for different type of search:

Search TypeRequired ParametersCombinational ParametersOptional Parameters
Area CodeareaCoderateCenter (state required), city (state required), state, lata, zipquantity, enableTNDetail, protected
NPA-NXXnpaNxxrateCenter (state required), city (state required), state, lata, zip, orderByquantity, enableTNDetail, protected
NPA-NXX with Local Calling AreanpaNxxquantity, LCA, enableTNDetail, protected
NPA-NXX-XnpaNxxxrateCenter (state required), city (state required), state, lata, zip, orderByquantity, enableTNDetail, protected
NPA-NXX-X with Local Calling AreanpaNxxxrateCenter (state required), city (state required), state, lata, zipquantity, LCA, enableTNDetail, protected
RateCenterrateCenter, statecity, areaCode/npaNxx/npaNxxx, lata, zip, orderByquantity, enableTNDetail, protected
RateCenter with Local Calling ArearateCenter, statequantity, LCA, enableTNDetail, protected
StatestaterateCenter, city, areaCode/npaNxx/npaNxxx, lata, zipquantity, enableTNDetail, protected
Citystate, cityrateCenter, state, areaCode/npaNxx/npaNxxx, lata, zip, orderByquantity, enableTNDetail, protected
Zip CodeziprateCenter (state required), city (state required), state, areaCode/npaNxx/npaNxxx, lata, orderByquantity, enableTNDetail, protected
LATAlatarateCenter (state required), city (state required), state, areaCode/npaNxx/npaNxxx, zipquantity, enableTNDetail, protected
Local VanitylocalVanitystate, areaCodeendsIn, quantity, protected, enableTNdetails
TollFree VanitytollFreeVanityorderByquantity
TollFree WildCardtollFreeWildCardPatternorderByquantity
+ + + In this table are presented combinations of path parameters for non US + and Canadian countries: + + | Search | Required Parameters | Combinational Parameters | Optional + Parameters | + + |:-------|:--------------------|:-------------------------|:--------------------| + + |Phone Number Type|phoneNumberType|areaCode, city, features|quantity, + enableTNDetail| + + |Area Code|areaCode|phoneNumberType, city, features|quantity, + enableTNDetail| + + |City|city|phoneNumberType, areaCode, features|quantity, enableTNDetail| + + |Product Features|features|phoneNumberType, areaCode, city|quantity, + enableTNDetail| + + + In this table are presented combinations of path parameters for + different type of search when countryCodeA3 is configured, or defaulted, + to USA and/or CAN: + + | Search | Required Parameters | Combinational Parameters | Optional + Parameters | + + |:-------|:--------------------|:-------------------------|:--------------------| + + |Area Code|areaCode|rateCenter (state required), city (state required), + state, lata, zip|quantity, enableTNDetail, protected| + + |NPA-NXX|npaNxx|rateCenter (state required), city (state required), + state, lata, zip, orderBy|quantity, enableTNDetail, protected| + + |NPA-NXX with Local Calling Area|npaNxx||quantity, LCA, enableTNDetail, + protected| + + |NPA-NXX-X|npaNxxx|rateCenter (state required), city (state required), + state, lata, zip, orderBy|quantity, enableTNDetail, protected| + + |NPA-NXX-X with Local Calling Area|npaNxxx|rateCenter (state required), + city (state required), state, lata, zip|quantity, LCA, enableTNDetail, + protected| + + |RateCenter|rateCenter, state|city, areaCode/npaNxx/npaNxxx, lata, zip, + orderBy|quantity, enableTNDetail, protected| + + |RateCenter with Local Calling Area|rateCenter, state||quantity, LCA, + enableTNDetail, protected| + + |State|state|rateCenter, city, areaCode/npaNxx/npaNxxx, lata, + zip|quantity, enableTNDetail, protected| + + |City|state, city|rateCenter, state, areaCode/npaNxx/npaNxxx, lata, zip, + orderBy|quantity, enableTNDetail, protected| + + |Zip Code|zip|rateCenter (state required), city (state required), state, + areaCode/npaNxx/npaNxxx, lata, orderBy|quantity, enableTNDetail, + protected| + + |LATA|lata|rateCenter (state required), city (state required), state, + areaCode/npaNxx/npaNxxx, zip|quantity, enableTNDetail, protected| + + |Local Vanity|localVanity|state, areaCode|endsIn, quantity, protected, + enableTNdetails| + + |TollFree Vanity|tollFreeVanity|orderBy|quantity| + + |TollFree WildCard|tollFreeWildCardPattern|orderBy|quantity| operationId: GetAvailableTns parameters: - $ref: '#/components/parameters/AccountIdPathParam' + - description: >- + Country code of the country in its ISO 3166-1 alpha-3 format. Note + that only one country code (i.e. USA, CAN, GBR etc.) is allowed when + configured by the user. The system defaults country code to search + for numbers in both United States and Canada (i.e. USA,CAN). + example: GBR + in: query + name: countryCodeA3 + required: false + schema: + default: USA,CAN + type: string + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + - $ref: '#/components/parameters/areaCodeQueryParam' + - $ref: '#/components/parameters/cityQueryParam' + - description: >- + The product features supported by number such as VOICE, + VOICE_OUTBOUND_NATIONAL, VOICE_OUTBOUND_INTERNATIONAL, + VOICE_OUTBOUND_TOLLFREE, EMERGENCY, MESSAGING_SMS. The query can be + used if you want to only list phone numbers that support certain + features. The system defaults to return phone numbers of all + features when the query parameter is not passed. Note that you can + specify multiple features by repeating the query parameter i.e. + features=VOICE&features=EMERGENCY. + example: VOICE + in: query + name: features + required: false + schema: + type: string - description: The desired quantity of requested numbers. example: 30 in: query @@ -16227,16 +17781,6 @@ paths: schema: default: false type: boolean - - description: >- -

The 3-digit area code associated with the TN.

  • Allowed - number ranges are [2-9] for the first digit and [0-9] for both the - second and third digits.
- example: 435 - in: query - name: areaCode - required: false - schema: - type: integer - description: >-

The 6-digit prefix associated with the TN.

  • Allowed number ranges for NPA are [2-9] for the first digit and [0-9] for @@ -16273,15 +17817,6 @@ paths: required: false schema: type: string - - description: >- -

    The name of the city. NOTE: `State` becomes a required - parameter when searching by `city`.

    - example: RALEIGH - in: query - name: city - required: false - schema: - type: string - description:

    The two-letter abbreviation of the state the RateCenter is in

    example: NC in: query @@ -16332,27 +17867,157 @@ paths: responses: '200': content: + application/json: + examples: + NANPA TN Detail: + value: |- + { + "resultCount": 2, + "telephoneNumberDetailList": [ + { + "countryCodeA3": "USA", + "phoneNumberType": "GEOGRAPHIC", + "city": "CARY-RESEARCH TRIANGLE PARK", + "LATA": 426, + "rateCenter": "CARY-RTP", + "state": "NC", + "fullNumber": "+19193716651", + "tier": 0, + "vendorId": 49, + "vendorName": "Bandwidth CLEC" + }, + { + "countryCodeA3": "USA", + "phoneNumberType": "GEOGRAPHIC", + "city": "CARY-RESEARCH TRIANGLE PARK", + "LATA": 426, + "rateCenter": "CARY-RTP", + "state": "NC", + "fullNumber": "+19193716675", + "tier": 0, + "vendorId": 49, + "vendorName": "Bandwidth CLEC" + } + ] + } + Other TN Detail: + value: |- + { + "resultCount": 2, + "telephoneNumberDetailList": [ + { + "countryCodeA3": "NLD", + "phoneNumberType": "GEOGRAPHIC", + "city": "AMSTERDAM", + "areaCode": 20, + "tier": 0, + "fullNumber": "+131208908115" + }, + { + "countryCodeA3": "NLD", + "phoneNumberType": "NATIONAL", + "city": "AMSTERDAM", + "areaCode": 20, + "tier": 0, + "fullNumber": "+131208908116" + } + ] + } + TN Detail Disabled: + value: |- + { + "resultCount": 2, + "telephoneNumberList": [ + "+14354776112" + ] + } + schema: + $ref: '#/components/schemas/SearchResult' application/xml: examples: - example: + NANPA TN Detail: value: |- - 384 + 2 + + + USA + GEOGRAPHIC + CARY-RESEARCH TRIANGLE PARK + 426 + CARY-RTP + NC + +19193716651 + 0 + 49 + Bandwidth CLEC + + + USA + GEOGRAPHIC + CARY-RESEARCH TRIANGLE PARK + 426 + CARY-RTP + NC + +19193716675 + 0 + 49 + Bandwidth CLEC + + + + Other TN Detail: + value: |- + + + 2 + + + NLD + GEOGRAPHIC + AMSTERDAM + 20 + 0 + +31208908115 + + + NLD + NATIONAL + AMSTERDAM + 20 + 0 + +31208908116 + + + + TN Detail Disabled: + value: |- + + + 2 +14354776112 - +14357095160 schema: $ref: '#/components/schemas/SearchResult' - description: >- -

    A list of available numbers is provided. Additional information - is available if the queryParameter enableTNDetail is true. If no - numbers are available an empty SearchResult element is returned.

    + description: Created '400': content: + application/json: + examples: + example: + value: |- + { + "error": { + "code": 4010, + "description": "One of more required search parameters are null or empty, please refer to the api documentation" + } + } + schema: + $ref: '#/components/schemas/SearchResultError' application/xml: examples: example: @@ -16365,204 +18030,11 @@ paths: schema: - $ref: '#/components/schemas/SearchResultErrorWrapper' + $ref: '#/components/schemas/SearchResultError' description:

    Invalid/missing input parameter

    summary: Retrieve available tns tags: - Available Tns - /accounts/{accountId}/bdrs: - post: - deprecated: true - description: >- -

    Note - this API is being replaced with the /billingreports API - - we strongly recommend that you use that endpoint.

    This API - allows the retrieval of a ZIP file containing BDR records for a - specified date range. These BDR records are delivered as a ZIP - compressed comma separated values (CSV) file. The general flow of the - API calls required to retrieve these records is:

    1. POST a - request to the /bdrs resource, describing the date range for which the - BDR records are wished. This will initiate the construction of the zip - file.
    2. Examine the response from the POST. If the payload is - understandable and valid then a 202 accepted HTTP result code will be - returned indicating that the response file is being created.
    3. -
    4. Retrieve the Location Header from the Response to the POST. This - location header will contain the resource ID for the collection of BDRs - that will be returned once complete. Note that the fact that the ID has - been issued does not mean that the ZIP file is complete.
    5. -
    6. Interrogate the resource ID to check the status of the request. If a - 303 See Other response is received then the Location Header will contain - the resource path to the file. A typical browser response will be to - download the file. If a 200 OK is returned then the request is - considered valid, but the file is not ready for distribution.
    7. -
    8. Fetching the file can be done by issuing a GET to the resources path - in the Location Header mentioned above
    - operationId: CreateBDR - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - requestBody: - content: - application/xml: - examples: - example: - value: |- - - - 2015-04-01 - 2015-04-30 - - schema: - $ref: '#/components/schemas/Bdr' - responses: - '202': - content: - application/xml: - examples: - example: - value: |- - - - Your BDR archive is currently being constructed - - schema: - $ref: '#/components/schemas/BdrCreationResponse' - description: > - A 202 Accepted means that the request has been received and will be - processed. Processing the request takes time, so this does not - indicate that the information is available, it simply indicates that - the request has started processing. - - The response also includes header information in the Location Header - that can be used for retrieving the state of the request. - - An informative payload is also included in success and failure - cases. - '400': - content: - application/xml: - examples: - example: - value: |- - - - - 15501 - Invalid date range. Start date 2015-06-01 must be before end date 2015-04-30 - - - schema: - $ref: '#/components/schemas/BdrCreationErrorResponse' - description: > - A 400 response indicates that there was an error in processing the - payload, perhaps something like incorrectly formatted or chosen - dates. - summary: Create BDR in range - tags: - - Reports - /accounts/{accountId}/bdrs/{bdrid}: - get: - deprecated: true - description: >- -

    The bdr id resource will query the status of the bdr file that is - being generated. There are essentially two responses...

    • not - yet ready
    • ready, in which case the request is redirected to the - URL to actually download the file.

    A GET on the BDR ID will - return a still processing indication if the file creation has not - completed, or will redirect to the file to be downloaded.

    - operationId: GetBDRStatus - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: '' - in: path - name: bdrid - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - The requested BDR archive is still being constructed, please check back later - - schema: - $ref: '#/components/schemas/BdrRetrievalResponse' - description: > - A 200 OK means that the request is valid, but that the file is not - yet ready. The payload indicates the status. - '303': - description: > - A 303 response indicates that the file is ready. The 303 should - redirect the request to the URL in the Location header, which will, - in most cases, initiate the file download. - '400': - content: - application/xml: - examples: - example: - description: example - value: |- - - - - 1008 - '44a90e00-a7b6asdfsdafasdfdasf-6659-9112-e7f5dfa48231' is not a valid UUID - - - schema: - $ref: '#/components/schemas/BdrRetrievalErrorResponse' - description: | - A 400 indicates that the BDR id is malformed.

    - '404': - content: - application/xml: - examples: - example: - description: example - value: |- - - - - 15001 - BDR archive was not found - - - schema: - $ref: '#/components/schemas/BdrRetrievalErrorResponse' - description: | - A 404 indicates that the BDR id cannot be found. - summary: Retrieve BDR status or redirect to download - tags: - - Reports - /accounts/{accountId}/bdrs/{bdrid}/file: - get: - deprecated: true - description: >- - A GET on the /file resource subtending a BDR ID will cause the download - of the file. Executing this resource path within a browser will cause - the download of the file. - operationId: DownloadBDR - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: '' - in: path - name: bdrid - required: true - schema: - type: string - responses: - '200': - content: - application/xml: {} - description: >- - A 200 OK indicates that the request for the file download was - accepted and will be processed. - summary: Download BDR - tags: - - Reports /accounts/{accountId}/billingreports: get: description: >- @@ -19674,43 +21146,10 @@ paths: operationId: GetDisconnectedTns parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: >- - The first disconnected number on the desired page. `1` is used as a - convention for the first disconnected number in the collection. - in: query - name: page - required: true - schema: - default: '1' - type: string - - description: The number of records that should be returned by the query - example: 30 - in: query - name: size - required: true - schema: - default: 300 - maximum: 5000 - minimum: 1 - type: integer - - description: >- - The starting date of a search in yy-mm-dd format. startdate and - enddate must be used as a pair. - example: 22-10-31 - in: query - name: startdate - required: false - schema: - type: string - - description: >- - The ending date of a search in yy-mm-dd format. startdate and - enddate must be used as a pair. - example: 22-11-31 - in: query - name: enddate - required: false - schema: - type: string + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' responses: '200': content: @@ -19739,24 +21178,8 @@ paths: operationId: GetTotalNumberDisconnects parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: >- - The starting date of a search in yy-mm-dd format. startdate and - enddate must be used as a pair. - example: 22-10-31 - in: query - name: startdate - required: false - schema: - type: string - - description: >- - The end date of a search in yy-mm-dd format. startdate and enddate - must be used as a pair. - example: 22-11-31 - in: query - name: enddate - required: false - schema: - type: string + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' responses: '200': content: @@ -19784,27 +21207,10 @@ paths: operationId: ReadDisconnectOrders parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: >- - The disconnect order-id of the first record on the page. "1" is - used as a convention for the first disconnect order in the - collection - example: 59e69657-44d2-4e7e-90f8-777988be4aef - in: query - name: page - required: false - schema: - default: '1' - type: string - - description: The number of records that should be returned by the query - example: 30 - in: query - name: size - required: false - schema: - default: 300 - maximum: 5000 - minimum: 1 - type: integer + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' - description: The user ID associated with disconnected phone numbers example: jbm in: query @@ -19819,24 +21225,6 @@ paths: required: false schema: type: string - - description: >- - Retrieves all phone numbers disconnected after this date. The start - date also requires the end date to be specified. - example: 22-10-31 - in: query - name: startdate - required: false - schema: - type: string - - description: >- - Retrieves all phone numbers disconnected before this date. The end - date also requires the start date to be specified. - example: 22-11-31 - in: query - name: enddate - required: false - schema: - type: string responses: '200': content: @@ -19898,9 +21286,24 @@ paths: - Disconnecting Numbers post: description: >- - Use this method to disconnect telephone numbers from the account. Please - visit Guides and - Tutorials + Use this method to disconnect telephone numbers from the account. + + + In this table are presented capabilities that are not universally + available. The following request parameters are only allowed for numbers + from specific region/country and users of specific type: + + | Number Region | User Scope | Request Parameter | + + |:--------------|:-----------|:------------------| + + |NANPA|-|Protected| + + |-|Bandwidth Internal|DisconnectMode = "PURGE"| + + + Please visit Guides and + Tutorials for more details. operationId: CreateDisconnectOrder parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -20908,6 +22311,107 @@ paths: summary: Fetch DLDA order history tags: - DLDA + /accounts/{accountId}/e911Addresses: + get: + description: GET is used to retrieve all e911 addresses. + operationId: GetAllE911Addresses + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - description: Search criterion for e911 address by its locationid. + example: 47950147-9c58-407c-bcc4-e88743b20db5 + in: query + name: e911locationid + required: false + schema: + type: string + - description: >- + An ID of the first element in a page. This value will indicate the + first value, not the page number, of the initial entry in the page + being requested.
    It can be an id of address. The initial page is + tagged with the ID `1`. + example: '3' + in: query + name: page + required: false + schema: + default: '1' + type: string + - description: The number of items to include in a page. + example: 5000 + in: query + name: size + required: false + schema: + default: 500 + type: integer + - description: The text to search simultaneously through e911locationIds. + example: name + in: query + name: suggestions + required: false + schema: + type: string + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + 1 + + Link=<http://admin.localhost:8080/api/accounts/8000259/addresses?page=1&size=500>;rel="first"; + Link=<http://localhost:8080/api/accounts/8000259/addresses?page=501&size=500>;rel="next"; + + +
    + 207 + + + Elmastar + AlternateStar + + + Carpinteriaaly + NY + 93019 + + + United States + E911 + 2 + VALID +
    +
    +
    + schema: + $ref: '#/components/schemas/AddressesResponseWrapper' + description: >- + OK - the addresses retrieval request will return a list of all + addresses having specified search criteria. + '404': + content: + application/xml: + examples: + example: + value: |- + + + + The resource does not exist + + + schema: + $ref: '#/components/schemas/AddressesResponseNotFound' + description: >- + Not Found - if the account specified does not exist or is locked or + there are no addresses for specified search criteria it will result + in a not found. + summary: List E911 addresses [NANPA] + tags: + - Addresses /accounts/{accountId}/e911s: get: description: >- @@ -23648,358 +25152,6 @@ paths: summary: Update emergency notification recipient tags: - Emergency Notification - /accounts/{accountId}/externalTns: - get: - description: >- -

    Retrieve a list of the externalTns orders that are associated with - the account.

    A maximum of 1,000 orders can be retrieved per - request. If no date range or specific query parameter (marked by * below) is provided, the order results will be - limited to the last two years.

    - operationId: ListExternalTnsOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: The status of the TN Option order being searched for. - example: PARTIAL - in: query - name: status - required: false - schema: - items: - type: string - type: array - - description: A Telephone Number (TN) that is referenced in the order. - example: '+19199918388' - in: query - name: tn - required: true - schema: - type: string - - description: >- - The Customer Order ID is an ID assigned by the account owner to - provide a reference number for the TN Option order. - example: ABCCorp12345 - in: query - name: customerOrderId - required: true - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date after this date will be included. Format is - yyyy-MM-dd. - example: '2013-10-22' - in: query - name: createdDateFrom - required: false - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date before this date will be included. Format is - yyyy-MM-dd. - example: '2013-10-25' - in: query - name: createdDateTo - required: false - schema: - type: string - - description: >- - This search parameter represents the internal Bandwidth Dashboard - API ID that has been assigned to the TN Option Order. This - parameter is the first few characters of the internal ID - the - entire ID does not need to be specified. - example: ed1c0bed-e2 - in: query - name: orderIdFragment - required: true - schema: - type: string - - description: >- - Whether or not the results should be restricted to IMPORT or REMOVE - orders. - example: REMOVE - in: query - name: action - required: false - schema: - type: string - - description: >- - Whether or not the results should be restricted to CARRIER or - SUBSCRIBER orders. - example: SUBSCRIBER - in: query - name: loaType - required: false - schema: - default: ALL - type: string - - description: >- - For Date-based searches, the starting date of a date range - (inclusive) that will be used to find External Tn Orders that were - modified within the date range. It is in the form yyyy-MM-dd. - example: '2013-10-22' - in: query - name: modifiedDateFrom - required: false - schema: - type: string - - description: >- - For Date-based searches, the ending date of a date range (inclusive) - that will be used to find External Tn Orders that were modified - within the date range. It is in the form yyyy-MM-dd. - example: '2013-10-25' - in: query - name: modifiedDateTo - required: false - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 2 - - 2018-01-09T02:58:04.615Z - 9900012 - sjm - bf1305b8-8998-1111-2222-51ba3ce52d4e - 2018-01-09T02:58:05.298Z - 65487 - - +12106078250 - +12109678273 - +12109678331 - +12109678337 - +12266401468 - - IMPORT - SUBSCRIBER - PARTIAL - - - 13552 - Telephone numbers already exist. - - +12262665583 - - - - 885544 - - - 2018-01-09T02:58:04.609Z - 9900012 - sjm - b63d342b-9400-4da9-1111-ca7a3889e5ec - 2018-01-09T02:58:04.962Z - 12345 - - +13068035413 - +13068035414 - +13437003595 - +14387977665 - - IMPORT - PARTIAL - - - 13552 - Telephone numbers already exist. - - +14387977665 - +15817036252 - - - - 666555 - - - schema: - $ref: '#/components/schemas/ExternalTnsOrders' - description: >- - The descriptive payload for the externalTns Orders query provides - information about the externalTns Orders found by the query, - including the data associated with the order, the state of the - order, and a list of the successfully uploaded Telephone Numbers, - and descriptions of any encountered errors. - '404': - content: - application/xml: - schema: - $ref: '#/components/schemas/ExternalTnsOrdersError' - description: No externalTns orders can be found that match the query parameters. - summary: List external tns orders - tags: - - External Tn - post: - description: >- -

    Create a externalTns order to add or remove telephone numbers - provided by the customer from the Bandwidth network.

    Note: the - attempt to import a telephone number that is already present in the - account will not create an error, but will reset all of the - attributes of that telephone number in the Dashboard system as if the - telephone number was being imported for the first time.

    - operationId: CreateExternalTnsOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - requestBody: - content: - application/xml: - examples: - example: - value: |- - - - ICPA123ABC - 743 - 303716 - [ IMPORT | REMOVE ] - [ CARRIER | SUBSCRIBER ] - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - - - schema: - $ref: '#/components/schemas/ExternalTnsOrderRequest' - responses: - '201': - content: - application/xml: - examples: - example: - value: |- - - - - SJM000001 - 2018-01-20T02:59:54.000Z - 9900012 - smckinnon - b05de7e6-0cab-4c83-81bb-9379cba8efd0 - 2018-01-20T02:59:54.000Z - 202 - 520565 - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - - IMPORT - CARRIER - RECEIVED - - - - schema: - $ref: '#/components/schemas/ExternalTnsOrderResponse' - description: A 201 response indicates that an order has been created. - '400': - content: - application/xml: - examples: - example: - value: |- - - - - 5081 - Action is absent or invalid. Possible values IMPORT, REMOVE - - - schema: - $ref: '#/components/schemas/ExternalTnsOrderErrorResponse' - description: >- - Bad Request - Indicates that the order could not be created. Error - text and an error code will be provided in the ErrorList element. - summary: Create external tns order - tags: - - External Tn - /accounts/{accountId}/externalTns/{orderId}: - get: - description:

    Retrieve information about a externalTns order with specified ID.

    - operationId: GetExternalTnsOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: '' - in: path - name: orderId - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 2016-01-15T11:36:52.727Z - 1 - jbm - 65e03a35-6b97-48a5-8126-f47bad02df2a - 2018-01-10T05:20:47.661Z - PARTIAL - ICPA123ABC - 743 - 303716 - [ IMPORT | REMOVE ] - [ CARRIER | SUBSCRIBER ] - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - - - - [int] - [string] - - +19199918388 - - - - - schema: - $ref: '#/components/schemas/ExternalTnsOrderResponse' - description: >- -

    The descriptive payload for the externalTns query provides a - broad range of information about the externalTns order identified in - the URL. Included amongst the information - is...

    • ErrorList - the errors discovered with codes and - explanations
    • ProcessingStatus(RECEIVED, PROCESSING, - COMPLETE, PARTIAL, FAILED) - the overall status of the - order
    - '404': - content: - application/xml: - examples: - example: - value: |- - - - - The resource does not exist - - - schema: - $ref: '#/components/schemas/ExternalTnsOrderErrorResponse' - description:

    NOT FOUND - the order id does not exist in the system

    - summary: Retrieve external tns order - tags: - - External Tn /accounts/{accountId}/geocodeRequest: post: description: >- @@ -24163,7 +25315,7 @@ paths: description: >-

    Service unavailable - for some reason service is temporary unavailable.

    - summary: Validate address + summary: Validate E911 address [NANPA] tags: - Addresses /accounts/{accountId}/hosts: @@ -24229,9 +25381,9 @@ paths: /accounts/{accountId}/importTnChecker: post: description: >- -

    Request portability information on a set of TNs. SipPeerId is an + Request importability information on a set of TNs. SipPeerId is an optional value. If SipPeerId is not specified, the id of the default - Sip-Peer for the provided SiteId will be used.

    + Sip-Peer for the provided SiteId will be used. operationId: CreateRequestImportTnChecker parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -24292,11 +25444,11 @@ paths: 7201 - +161746052083 is not a valid NANPA telephone number. + +161746052083 is not a valid NANP telephone number. 7201 - +161746052082 is not a valid NANPA telephone number. + +161746052082 is not a valid NANP telephone number. schema: @@ -24307,84 +25459,37 @@ paths: empty.
  • List of TNs is more than 5000 TNs.
  • The account does not have the necessary (IMPORT_TNS) flag.
  • TNs are invalid (they are not actual TNs, and there are duplicates).
- summary: Check Tns hostability + summary: Check Tns importability tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders: + /accounts/{accountId}/importTnOrders/messaging: get: description: > Retrieves the importtnorders requests for the given account ID. A maximum of 1,000 orders can be retrieved per request. If no date range - or specific query parameter (marked by * below) - is provided, the order results will be limited to the last two years. - operationId: ReadImportTnOrders + or required query parameter is provided, the order results will be + limited to the last two years. + + + In this table are presented capabilities that are not universally + available. The following request query parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANP|loaType| + operationId: ReadImportMessagingTnOrders parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: The status of the importTnOrder being searched for. - example: PARTIAL - in: query - name: status - required: false - schema: - items: - type: string - type: array - - description: A Telephone Number (TN) that is referenced in the order - example: '+19199918388' - in: query - name: tn - required: true - schema: - type: string - - description: >- - The Customer Order ID is an ID assigned by the account owner to - provide a reference number for the importTnOrder. - example: ABCCorp12345 - in: query - name: customerOrderId - required: true - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date after this date will be included. Format is - yyyy-MM-dd - example: '2013-10-22' - in: query - name: createdDateFrom - required: false - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date before this date will be included. Format is - yyyy-MM-dd - example: '2013-10-25' - in: query - name: createdDateTo - required: false - schema: - type: string - - description: >- - For Date-based searches, the starting date of a date range - (inclusive) that will be used to find Import Tn Orders that were - modified within the date range. It is in the form yyyy-MM-dd. - example: '2013-10-22' - in: query - name: modifiedDateFrom - required: false - schema: - type: string - - description: >- - For Date-based searches, the ending date of a date range (inclusive) - that will be used to find Import Tn Orders that were modified within - the date range. It is in the form yyyy-MM-dd. - example: '2013-10-25' - in: query - name: modifiedDateTo - required: false - schema: - type: string + - $ref: '#/components/parameters/StatusQueryParam' + - $ref: '#/components/parameters/TnQueryParam' + - $ref: '#/components/parameters/CustomerOrderIdQueryParam' + - $ref: '#/components/parameters/CreatedDateFromQueryParam' + - $ref: '#/components/parameters/CreatedDateToQueryParam' + - $ref: '#/components/parameters/ModifiedDateFromQueryParam' + - $ref: '#/components/parameters/ModifiedDateToQueryParam' - description: Indentify the LoaType on TNs. example: SUBSCRIBER in: query @@ -24438,7 +25543,7 @@ paths: associated with the order, the state of the order, and a list of the successfully imported Telephone Numbers, and descriptions of any encountered errors. - summary: List Import Tn orders + summary: List Import Messaging Tn orders tags: - Hosted Messaging post: @@ -24451,7 +25556,21 @@ paths: the telephone numbers were successfully imported and "PARTIAL" if some of the telephone numbers were imported. A failed order with will have a staus of "FAILED" and no telephone numbers would have been imported. - operationId: CreateImportTnOrder + + + The following request parameters are only required for numbers from + specific region/country: + + | Number Region | Request Parameter | + + |:--------------|:------------------------| + + |NANP|LoaAuthorizingPerson| + + |NANP|LoaType| + + |NANP|Subscriber| + operationId: CreateImportMessagingTnOrder parameters: - $ref: '#/components/parameters/AccountIdPathParam' requestBody: @@ -24462,28 +25581,28 @@ paths: value: |- - ICPA123ABC + ICPA123ABC 743 - 303716 - - ABC Inc. - - 11235 - Back - Denver - CO - 27541 - Canyon - - - The Authguy - CARRIER - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - + 303716 + + ABC Inc. + + 11235 + Back + Denver + CO + 27541 + Canyon + + + The Authguy + CARRIER + + +19199918388 + +14158714245 + +14352154439 + +14352154466 + schema: $ref: '#/components/schemas/ImportTnOrderRequest' @@ -24557,426 +25676,16 @@ paths: The order failed; one of the input parameters is invalid. The error text and an error code will be provided in the ErrorList element.

- summary: Import Tn order + summary: Import Messaging Tn order tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders/voice: - get: - description: > - Retrieves the ImportVoiceTnOrder requests for the given account ID. A - maximum of 1,000 orders can be retrieved per request. If no date range - or specific query parameter (marked by * below) - is provided, the order results will be limited to the last two years. - operationId: ReadImportVoiceTnOrders - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/StatusQueryParam' - - $ref: '#/components/parameters/TnQueryParam' - - $ref: '#/components/parameters/CustomerOrderIdQueryParam' - - $ref: '#/components/parameters/CreatedDateFromQueryParam' - - $ref: '#/components/parameters/CreatedDateToQueryParam' - - $ref: '#/components/parameters/ModifiedDateFromQueryParam' - - $ref: '#/components/parameters/ModifiedDateToQueryParam' - - $ref: '#/components/parameters/SipPeerIdQueryParam' - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 2 - - 14 - 1 - CustomerOrderId - systemUser - 2019-01-24T11:08:09.770Z - 2019-01-24T11:08:09.770Z - import_voice_tn_orders - COMPLETE - 211a103c-5f9c-4117-8833-c574bdc390fd - - - 14 - 2 - CustomerOrderId - systemUser - 2019-01-24T10:43:16.934Z - 2019-01-24T10:43:16.934Z - import_voice_tn_orders - PARTIAL - 8dc32f09-2329-4c73-b702-526f46b02712 - - - schema: - $ref: '#/components/schemas/ImportVoiceTnOrdersResponseList' - description: >- - The descriptive payload for the importVoiceTnOrders query provides - information about the orders found by the query, including the data - associated with the order, the state of the order, and a list of the - successfully imported Telephone Numbers, and descriptions of any - encountered errors. - summary: List Import Voice Tn orders - tags: - - Hosted Voice - post: - description: >- - Creates an ImportVoiceTnOrders request to add numbers under the given - site ID and sipPeer ID as specified in the body. - - A successfully submitted order will have a status of "RECEIVED". A - successfully completed order will have a status of "COMPLETE" if all of - the telephone numbers were successfully imported and "PARTIAL" if some - of the telephone numbers were imported. A failed order with will have a - staus of "FAILED" and no telephone numbers would have been imported. - operationId: CreateVoiceImportTnOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - requestBody: - content: - application/xml: - examples: - example: - value: |- - - - ICPA123ABC - 743 - 303716 - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - - - schema: - $ref: '#/components/schemas/ImportVoiceTnOrderRequest' - responses: - '201': - content: - application/xml: - examples: - example: - value: |- - - - - SJM000001 - 2018-01-20T02:59:54.000Z - 9900012 - smckinnon - b05de7e6-0cab-4c83-81bb-9379cba8efd0 - 2018-01-20T02:59:54.000Z - 202 - 520565 - - +19199918388 - +14158714245 - +14352154439 - +14352154466 - - PROCESSING - - - - schema: - $ref: '#/components/schemas/ImportVoiceTnOrderResponse' - description: >- - The order has been created and an order ID will be specified in the - payload and in the header. - '400': - content: - application/xml: - examples: - example: - value: |- - - - FAILED - - 7309 - The site id was not supplied or is invalid. - - - 7312 - The sippeer id is invalid. - - - schema: - $ref: '#/components/schemas/ImportVoiceTnOrderError' - description: >- - The order failed; one of the input parameters is invalid. The error - text and an error code will be provided in the ErrorList - element.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- ErrorCode -

-
-

- Description -

-
-

- 25010 -

-
-

- The account does not have permission to use the endpoint requested, please contact support if you believe you should have permission. -

-
-

- 5052 -

-
-

- Customer order ID is invalid. Only alphanumeric values, dashes and spaces are allowed. Max length is 255 characters. -

-

- 1003 -

-
-

- SiteId is required. -

-
-

- 5073 -

-
-

- Telephone number is required. -

-
-

- 5095 -

-
-

- The count of telephone numbers in order exceeds the maximum size of 5000. -

-
-

- 1003 -

-
-

- TelephoneNumbers is required. -

-

- 5070 -

-
-

- Telephone number is invalid. -

-

- 5093 -

-
-

- Order cannot contain duplicate telephone numbers. -

- summary: Import Voice Tn order - tags: - - Hosted Voice - /accounts/{accountId}/importTnOrders/voice/{orderId}: - get: - description: Retrieve information about a importVoiceTnOrder with specified ID. - operationId: ReadImportVoiceTnOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/OrderIdPathParam' - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 2018-01-09T02:58:04.615Z - 9900012 - sjm - bf1305b8-8998-1111-2222-51ba3ce52d4e - 2018-01-09T02:58:05.298Z - 65487 - 885544 - - +12106078250 - +12109678273 - +12109678331 - +12109678337 - +12266401468 - - PARTIAL - - - 7518 - Telephone Number Not Active. - - +12262665583 - - - - - schema: - $ref: '#/components/schemas/ImportVoiceTnOrderResponse' - description: >- - The information has been successfully retrieved and displayed in the - payload. - - - - - - - - - - - - - - - - - - -
-

- ErrorCode -

-
-

- Description -

-
-

- 19014 -

-
-

- Numbers cannot be imported by this account at this time. -

-
-

- 5061 -

-
-

- The SiteId submitted is invalid. -

-

- 5023 -

-
-

- SIP peer submitted is invalid. -

-
- summary: Fetch Import Voice Tn order status - tags: - - Hosted Voice - /accounts/{accountId}/importTnOrders/voice/{orderId}/history: - get: - description: Retrieves the history of the specified importVoiceTnOrder. - operationId: ReadImportVoiceTnOrderHistory - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/OrderIdPathParam' - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - - 2015-06-16T14:03:10.225Z - Import Voice TN order is received. - admin - RECEIVED - - - 2015-06-16T14:03:10.330Z - Import TN order is processing. - admin - PROCESSING - - - 2015-06-16T14:03:10.789Z - Import Voice TN order is partial. - admin - PARTIAL - - - schema: - $ref: '#/components/schemas/OrderHistoryWrapper' - description: >- - The history has been successfully retrieved and displayed in the - payload. - summary: Fetch Import Voice Tn order history - tags: - - Hosted Voice - /accounts/{accountId}/importTnOrders/{orderId}: + /accounts/{accountId}/importTnOrders/messaging/{orderId}: get: description: Retrieve information about a importTnOrder with specified ID. - operationId: ReadImportTnOrder + operationId: ReadImportMessagingTnOrder parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID - example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 - in: path - name: orderId - required: true - schema: - type: string + - $ref: '#/components/parameters/OrderIdPathParam' responses: '200': content: @@ -25029,22 +25738,16 @@ paths: description: >- The information has been successfully retrieved and displayed in the payload. - summary: Fetch Import Tn order status + summary: Fetch Import Messaging Tn order status tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders/{orderId}/history: + /accounts/{accountId}/importTnOrders/messaging/{orderId}/history: get: description: Retrieves the history of the specified importTnOrder. - operationId: ReadImportTnOrderHistory + operationId: ReadImportMessagingTnOrderHistory parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID - example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 - in: path - name: orderId - required: true - schema: - type: string + - $ref: '#/components/parameters/OrderIdPathParam' responses: '200': content: @@ -25078,18 +25781,18 @@ paths: description: >- The history has been successfully retrieved and displayed in the payload. - summary: Fetch Import Tn order history + summary: Fetch Import Messaging Tn order history tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders/{orderId}/loas: + /accounts/{accountId}/importTnOrders/messaging/{orderId}/loas: get: description: >- Retrieves the list of the loa (and other) files associated with the order. - operationId: ReadImportTnOrderLoas + operationId: ReadImportMessagingTnOrderLoas parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25129,7 +25832,7 @@ paths: description: >- The list of all files is being returned. This response includes the case where the list is empty. - summary: Fetch Import Tn order loas + summary: Fetch Import Messaging Tn order loas [NANP] tags: - Hosted Messaging post: @@ -25171,10 +25874,10 @@ paths:
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • - operationId: CreateImportTnOrderLoas + operationId: CreateImportMessagingTnOrderLoas parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25226,16 +25929,16 @@ paths: on the identified resource. '400': description: A 400 indicates that the requested upload failed. - summary: Import Tn order loas + summary: Import Messaging Tn order loas [NANP] tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders/{orderId}/loas/{fileId}: + /accounts/{accountId}/importTnOrders/messaging/{orderId}/loas/{fileId}: delete: description: Deletes the file associated with the order - operationId: DeleteImportTnOrderLoasFile + operationId: DeleteImportMessagingTnOrderLoasFile parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25256,15 +25959,15 @@ paths: description: >- a 404 indicates that the indicated file was not found in conjunction with the order id. - summary: Removing Import Tn order loas file + summary: Removing Import Messaging Tn order loas file [NANP] tags: - Hosted Messaging get: description: Retrieves the file associated with the order. - operationId: ReadImportTnOrderLoasFile + operationId: ReadImportMessagingTnOrderLoasFile parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25291,17 +25994,17 @@ paths: description: >- a 404 indicates that the indicated file was not found in conjunction with the order id. - summary: Fetch Import Tn order loas file + summary: Fetch Import Messaging Tn order loas file [NANP] tags: - Hosted Messaging put: description: >- A PUT on the filename will update / replace the identified file id. The format of the PUT is identical to that of the POST. - operationId: UpdateImportTnOrderLoasFile + operationId: UpdateImportMessagingTnOrderLoasFile parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25340,16 +26043,16 @@ paths: description: A 400 indicates that the requested upload failed. '404': description: A 404 indicates that the file was not available for replacement. - summary: Updating Import Tn order loas file + summary: Updating Import Messaging Tn order loas file [NANP] tags: - Hosted Messaging - /accounts/{accountId}/importTnOrders/{orderId}/loas/{fileId}/metadata: + /accounts/{accountId}/importTnOrders/messaging/{orderId}/loas/{fileId}/metadata: delete: description: Deletes the metadata previously associated with the identified file. - operationId: RemoveImportTnOrderLoasFileMetadata + operationId: RemoveImportMessagingTnOrderLoasFileMetadata parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25372,15 +26075,15 @@ paths: description: >- A 404 indicates that the indicated file was not found in conjunction with the order id.cd - summary: Removing Import Tn order loas file metadata + summary: Removing Import Messaging Tn order loas file metadata [NANP] tags: - Hosted Messaging get: description: Retrieves the metadata associated with the file. - operationId: ReadImportTnOrderLoasFileMetadata + operationId: ReadImportMessagingTnOrderLoasFileMetadata parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25413,7 +26116,7 @@ paths: description: >- a 404 indicates that the indicated file was not found in conjunction with the order id. - summary: Fetch Import Tn order loas file metadata + summary: Fetch Import Messaging Tn order loas file metadata [NANP] tags: - Hosted Messaging put: @@ -25421,10 +26124,10 @@ paths: Associate metadata with the file named in the resource path. This will describe the file, and declare the data that is contained in the file, selected from a list of [LOA | INVOICE | CSR | OTHER]. - operationId: UpdateImportTnOrderLoasFileMetadata + operationId: UpdateImportMessagingTnOrderLoasFileMetadata parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: Import Tn order's ID + - description: Import Messaging Tn order's ID example: 093a9f9b-1a78-4e47-b6e2-776a484596f4 in: path name: orderId @@ -25462,9 +26165,412 @@ paths: file. '400': description: Some error has occured as a result of the attempt. - summary: Updating Import Tn order loas file metadata + summary: Updating Import Messaging Tn order loas file metadata [NANP] tags: - Hosted Messaging + /accounts/{accountId}/importTnOrders/voice: + get: + description: > + Retrieves the ImportVoiceTnOrder requests for the given account ID. A + maximum of 1,000 orders can be retrieved per request. If no date range + or specific query parameter (marked by * below) + is provided, the order results will be limited to the last two years. + operationId: ReadImportVoiceTnOrders + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/StatusQueryParam' + - $ref: '#/components/parameters/TnQueryParam' + - $ref: '#/components/parameters/CustomerOrderIdQueryParam' + - $ref: '#/components/parameters/CreatedDateFromQueryParam' + - $ref: '#/components/parameters/CreatedDateToQueryParam' + - $ref: '#/components/parameters/ModifiedDateFromQueryParam' + - $ref: '#/components/parameters/ModifiedDateToQueryParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + 2 + + 14 + 1 + CustomerOrderId + systemUser + 2019-01-24T11:08:09.770Z + 2019-01-24T11:08:09.770Z + import_voice_tn_orders + COMPLETE + 211a103c-5f9c-4117-8833-c574bdc390fd + + + 14 + 2 + CustomerOrderId + systemUser + 2019-01-24T10:43:16.934Z + 2019-01-24T10:43:16.934Z + import_voice_tn_orders + PARTIAL + 8dc32f09-2329-4c73-b702-526f46b02712 + + + schema: + $ref: '#/components/schemas/ImportVoiceTnOrdersResponseList' + description: >- + The descriptive payload for the importVoiceTnOrders query provides + information about the orders found by the query, including the data + associated with the order, the state of the order, and a list of the + successfully imported Telephone Numbers, and descriptions of any + encountered errors. + summary: List Import Voice Tn orders + tags: + - Hosted Voice + post: + description: >- + Creates an ImportVoiceTnOrders request to add numbers under the given + site ID and sipPeer ID as specified in the body. + + A successfully submitted order will have a status of "RECEIVED". A + successfully completed order will have a status of "COMPLETE" if all of + the telephone numbers were successfully imported and "PARTIAL" if some + of the telephone numbers were imported. A failed order with will have a + staus of "FAILED" and no telephone numbers would have been imported. + operationId: CreateImportVoiceTnOrder + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + requestBody: + content: + application/xml: + examples: + example: + value: |- + + + ICPA123ABC + 743 + 303716 + + +19199918388 + +14158714245 + +14352154439 + +14352154466 + + + schema: + $ref: '#/components/schemas/ImportVoiceTnOrderRequest' + responses: + '201': + content: + application/xml: + examples: + example: + value: |- + + + + SJM000001 + 2018-01-20T02:59:54.000Z + 9900012 + smckinnon + b05de7e6-0cab-4c83-81bb-9379cba8efd0 + 2018-01-20T02:59:54.000Z + 202 + 520565 + + +19199918388 + +14158714245 + +14352154439 + +14352154466 + + PROCESSING + + + + schema: + $ref: '#/components/schemas/ImportVoiceTnOrderResponse' + description: >- + The order has been created and an order ID will be specified in the + payload and in the header. + '400': + content: + application/xml: + examples: + example: + value: |- + + + FAILED + + 7309 + The site id was not supplied or is invalid. + + + 7312 + The sippeer id is invalid. + + + schema: + $ref: '#/components/schemas/ImportVoiceTnOrderError' + description: >- + The order failed; one of the input parameters is invalid. The error + text and an error code will be provided in the ErrorList + element.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + ErrorCode +

    +
    +

    + Description +

    +
    +

    + 25010 +

    +
    +

    + The account does not have permission to use the endpoint requested, please contact support if you believe you should have permission. +

    +
    +

    + 5052 +

    +
    +

    + Customer order ID is invalid. Only alphanumeric values, dashes and spaces are allowed. Max length is 255 characters. +

    +

    + 1003 +

    +
    +

    + SiteId is required. +

    +
    +

    + 5073 +

    +
    +

    + Telephone number is required. +

    +
    +

    + 5095 +

    +
    +

    + The count of telephone numbers in order exceeds the maximum size of 5000. +

    +
    +

    + 1003 +

    +
    +

    + TelephoneNumbers is required. +

    +

    + 5070 +

    +
    +

    + Telephone number is invalid. +

    +

    + 5093 +

    +
    +

    + Order cannot contain duplicate telephone numbers. +

    + summary: Import Voice Tn order + tags: + - Hosted Voice + /accounts/{accountId}/importTnOrders/voice/{orderId}: + get: + description: Retrieve information about a importVoiceTnOrder with specified ID. + operationId: ReadImportVoiceTnOrder + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/OrderIdPathParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + 2018-01-09T02:58:04.615Z + 9900012 + sjm + bf1305b8-8998-1111-2222-51ba3ce52d4e + 2018-01-09T02:58:05.298Z + 65487 + 885544 + + +12106078250 + +12109678273 + +12109678331 + +12109678337 + +12266401468 + + PARTIAL + + + 7518 + Telephone Number Not Active. + + +12262665583 + + + + + schema: + $ref: '#/components/schemas/ImportVoiceTnOrderResponse' + description: >- + The information has been successfully retrieved and displayed in the + payload. + + + + + + + + + + + + + + + + + + +
    +

    + ErrorCode +

    +
    +

    + Description +

    +
    +

    + 19014 +

    +
    +

    + Numbers cannot be imported by this account at this time. +

    +
    +

    + 5061 +

    +
    +

    + The SiteId submitted is invalid. +

    +

    + 5023 +

    +
    +

    + SIP peer submitted is invalid. +

    +
    + summary: Fetch Import Voice Tn order status + tags: + - Hosted Voice + /accounts/{accountId}/importTnOrders/voice/{orderId}/history: + get: + description: Retrieves the history of the specified importVoiceTnOrder. + operationId: ReadImportVoiceTnOrderHistory + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/OrderIdPathParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + + 2015-06-16T14:03:10.225Z + Import Voice TN order is received. + admin + RECEIVED + + + 2015-06-16T14:03:10.330Z + Import TN order is processing. + admin + PROCESSING + + + 2015-06-16T14:03:10.789Z + Import Voice TN order is partial. + admin + PARTIAL + + + schema: + $ref: '#/components/schemas/OrderHistoryWrapper' + description: >- + The history has been successfully retrieved and displayed in the + payload. + summary: Fetch Import Voice Tn order history + tags: + - Hosted Voice /accounts/{accountId}/importToAccount: get: description: > @@ -25566,48 +26672,6 @@ paths: summary: List Import to Account orders tags: - Import Tn to Account - post: - description: > - Import a large number of previously ported or otherwise acquired numbers - into the account - operationId: CreateImportToAccountOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - requestBody: - content: - application/xml: - examples: - example: - value: "\n\n\t\n\t\t10D\n\t\t\n\t\t\t+14158714244\n\t\t\t+16105330709\n\t\t\n\t\tNOCHARGE\n\t\tAvailable\n\t\t\n\t\t\tProtected\n\t\t\n\t\tLevel 3\n\t\tTestId1234\n\t\t2\n\t\n\t1\n\t12345\n\t" - schema: - $ref: '#/components/schemas/ImportToAccountOrderRequest' - responses: - '201': - content: - application/xml: - examples: - example: - value: "\n\n\t\n\t\tc5986599-3a7c-4eed-a5c4-9121c17d54ab\n\t\t2014-04-01T21:54:18.796Z\n\t\t\n\t\t\tSJM00001\n\t\t\t2\n\t\t\tNOCHARGE\n\t\t\t10D\n\t\t\tAvailable\n\t\t\t\n\t\t\t\tProtected\n\t\t\t\n\t\t\t\n\t\t\t\t+14158714245\n\t\t\t\t+16105330710\n\t\t\t\n\t\t\tLevel 3\n\t\t\n\t\t743\n\t\t12345\n\t\n\t" - schema: - $ref: '#/components/schemas/ImportToAccountNumberOrderResponse' - description: >- - The order has been created and an order ID will be specified in the - payload and in the header. - '400': - content: - application/xml: - examples: - example: - value: "\n\n\t \n\t\t \n\t\t\t 7309\n\t\t\t The site id was not supplied or is invalid.\n\t\t \n\t\t \n\t\t\t 7312\n\t\t\t The sippeer id is invalid.\n\t\t \n\t \n " - schema: - $ref: '#/components/schemas/ImportToAccountNumberOrderErrorResponse' - description: >- - The order failed; one of the input parameters is invalid. The error - text and an error code will be provided in the ErrorList - element.

    - summary: Import to Account order - tags: - - Import Tn to Account /accounts/{accountId}/importToAccount/batches: get: description: >- @@ -25726,41 +26790,67 @@ paths: get: description: >- Retrieves a list of in-service phone numbers associated with the account - ID + ID. + + + In this table are presented capabilities that are not universally + available. The following request query parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANPA|city| + + |NANPA|tier| + + |NANPA|npaNxx| + + |NANPA|npaNxxx| + + |NANPA|lata| + + |NANPA|state| + + |NANPA|ratecenter| + + + When the query parameters listed in the table above are passed, only + inservice the North American Numbering Plan phone numbers from are + returned. operationId: ReadInserviceTns parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: The `page` to fetch in a paginated collection - example: 1 - in: query - name: page - required: false - schema: - default: 1 - type: integer - - description: The number of TNs to retrieve - example: 300 - in: query - name: size - required: false - schema: - default: 300 - type: integer + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' + - $ref: '#/components/parameters/countryCodeA3QueryParam' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + - $ref: '#/components/parameters/areaCodeQueryParam' + - $ref: '#/components/parameters/cityQueryParam' + - $ref: '#/components/parameters/tierQueryParam' - description: >- - An Area Code search filter - all returned TNs will be in the entered - Area Code - example: 919 +

    The 6-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXX are [2-9] for the first digit and [0-9] for both the second and + third digits.
    + example: 919859 in: query - name: areacode + name: npaNxx required: false schema: type: integer - description: >- - An NPA NXX search filter - all returned TNs will be in the entered - NPA NXX dial plan - example: 919859 +

    The 7-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXXX are [2-9] for the first digit and [0-9] the rest of the (X) + digits.
    in: query - name: npanxx + name: npaNxxx required: false schema: type: integer @@ -25793,24 +26883,6 @@ paths: required: false schema: type: string - - description: >- - The starting date of a date range that will filter numbers based on - activation or other change date. - example: yy-mm-dd - in: query - name: startdate - required: false - schema: - format: date - type: string - - description: The ending date of a date range - example: yy-mm-dd - in: query - name: enddate - required: false - schema: - format: date - type: string responses: '200': content: @@ -25824,9 +26896,10 @@ paths: 59 ( a link goes here ) + ( a link goes here ) - 59 + 15 +18043024183 +18042121778 +18042146066 @@ -25836,7 +26909,6 @@ paths: +18043326094 +18042121771 +18043024182 - +18043814900 +18047672642 +18043024368 @@ -26824,7 +27896,7 @@ paths: 0 team_ua FAILED - 919238466 + +19192384661 ATT-011515-324234%$ Jim Hopkins @@ -27940,25 +29012,10 @@ paths: operationId: ListOrders parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: >- - All Order retrievals must be paginated, using page and size - indicators. The page parameter contains the order-id that is to - start the page, or "1" in the case of the first page - example: cbdcfc94-81b1-4ce9-8b6d-f8d6b85381ba - in: query - name: page - required: true - schema: - type: string - - description: >- - The size parameter indicates the number of orders to return in the - payload - example: 20 - in: query - name: size - required: true - schema: - type: integer + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' - description: The order ID that the Customer / Account assigned to the Order example: ORD12345 in: query @@ -27980,26 +29037,6 @@ paths: required: false schema: type: string - - description: >- - The first day of the search date range for a date-range-limited - search of net number orders. The format is YY-MM-DD - example: 13-12-15 - in: query - name: startdate - required: false - schema: - format: date - type: string - - description: >- - The last day of the search date range for a date-range-limited - search of net number orders. The format is YY-MM-DD - example: 13-12-31 - in: query - name: enddate - required: false - schema: - format: date - type: string responses: '200': content: @@ -28115,7 +29152,47 @@ paths: the Bandwidth Dashboard API to the request. A well-formed POST on the /orders resource will create an order record, and return an order-id string that can be used to uniquely identify the new number order - request.

    Please visit Please visit Guides and Tutorials to learn more.

    operationId: CreateOrder @@ -28125,7 +29202,7 @@ paths: content: application/xml: examples: - AreaCodeSearchAndOrderType: + AreaCodeSearchAndOrderType [NANPA]: description: >- Allowed ranges ~ [2-9] for the first digit and [0, 9] for both the second and third digits. @@ -28142,7 +29219,7 @@ paths: true 743 - CitySearchAndOrderType: + CitySearchAndOrderType [NANPA]: description: Specify the City and State to be ordered from. value: |- @@ -28158,36 +29235,7 @@ paths: true 743 - CombinedSearchAndOrderType: - description: >- - Specify the any combination of: AreaCode, RateCenter, State, - NpaNxx, NpaNxxX, Lata, City, Zip. But with following - limitations: AreaCode, NpaNxx and NpaNxxX are mutually - exclusive, LCA search is supported only for one of the - following criteria: NpaNxx, NpaNxxX, RateCenter and State. If - City or RateCenter is specified, then State is required. - value: |- - - - 123456789 - Area Code Order - false - - 1 - 617 - RALEIGH - NC - 919439 - 9194391 - 224 - RALEIGH - 27606 - false - - true - 743 - - CombinedSearchAndOrderType (local vanity): + CombinedSearchAndOrderType (local vanity) [NANPA]: description: >- Specify AreaCode and LocalVanity to order telephone numbers matching a specific alphanumeric pattern between 4 and 7 @@ -28209,7 +29257,7 @@ paths: 743 - CombinedSearchAndOrderType (protected status): + CombinedSearchAndOrderType (protected status) [NANPA]: description: CombinedSearchAndOrderType with established Protected status value: |- @@ -28232,6 +29280,35 @@ paths: true 743 + CombinedSearchAndOrderType [NANPA]: + description: >- + Specify the any combination of: AreaCode, RateCenter, State, + NpaNxx, NpaNxxX, Lata, City, Zip. But with following + limitations: AreaCode, NpaNxx and NpaNxxX are mutually + exclusive, LCA search is supported only for one of the + following criteria: NpaNxx, NpaNxxX, RateCenter and State. If + City or RateCenter is specified, then State is required. + value: |- + + + 123456789 + Area Code Order + false + + 1 + 617 + RALEIGH + NC + 919439 + 9194391 + 224 + RALEIGH + 27606 + false + + true + 743 + ExistingTelephoneNumberOrderType: description: >- Order a set of numbers known to be available. This often @@ -28273,7 +29350,7 @@ paths: 518824 - LATASearchAndOrderType: + LATASearchAndOrderType [NANPA]: description: Specify the LATA to order telephone numbers from. value: |- @@ -28288,7 +29365,7 @@ paths: true 743 - NPANXXSearchAndOrderType: + NPANXXSearchAndOrderType [NANPA]: description: >- Specify the NpaNxx combination to be ordered. Valid Npa values ~ [2-9] for the first digit, and [0-9] for both the second and @@ -28316,7 +29393,7 @@ paths: true 743 - RateCenterSearchAndOrderType: + RateCenterSearchAndOrderType [NANPA]: description: Specify the Rate Center and the State. value: |- @@ -28332,7 +29409,7 @@ paths: true 743 - StateSearchAndOrderType: + StateSearchAndOrderType [NANPA]: description: Specify the State to be searched for telephone numbers. value: |- @@ -28347,7 +29424,7 @@ paths: true 743 - TollFreeVanitySearchAndOrderType: + TollFreeVanitySearchAndOrderType [NANPA]: description: >- Specify a Toll Free Vanity search, where the numbers ordered match a specific alphanumeric pattern between 4 and 7 @@ -28365,7 +29442,7 @@ paths: true 743 - TollFreeWildCharSearchAndOrderType: + TollFreeWildCharSearchAndOrderType [NANPA]: description: >- Specify the Toll Free wild card pattern. To be ordered, comprised of 3 digits beginning with '8'. Examples are 8**, @@ -28383,7 +29460,7 @@ paths: true 743 - ZIPSearchAndOrderType: + ZIPSearchAndOrderType [NANPA]: description: Specify the Zip Code to be ordered from. value: |- @@ -28401,16 +29478,16 @@ paths: schema: oneOf: - $ref: '#/components/schemas/ExistingTelephoneNumberOrder' - - $ref: '#/components/schemas/RateCenterSearchAndOrder' - - $ref: '#/components/schemas/AreaCodeSearchAndOrder' - - $ref: '#/components/schemas/NPANXXSearchAndOrder' - - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder' - - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder' - - $ref: '#/components/schemas/LATASearchAndOrder' - - $ref: '#/components/schemas/ZIPSearchAndOrder' - - $ref: '#/components/schemas/CitySearchAndOrder' - - $ref: '#/components/schemas/StateSearchAndOrder' - - $ref: '#/components/schemas/CombinedSearchAndOrder' + - $ref: '#/components/schemas/RateCenterSearchAndOrder_NANPA' + - $ref: '#/components/schemas/AreaCodeSearchAndOrder_NANPA' + - $ref: '#/components/schemas/NPANXXSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeWildCharSearchAndOrder_NANPA' + - $ref: '#/components/schemas/TollFreeVanitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/LATASearchAndOrder_NANPA' + - $ref: '#/components/schemas/ZIPSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CitySearchAndOrder_NANPA' + - $ref: '#/components/schemas/StateSearchAndOrder_NANPA' + - $ref: '#/components/schemas/CombinedSearchAndOrder_NANPA' responses: '201': content: @@ -28586,7 +29663,7 @@ paths: - Orders put: description: >- - With the introduction of Backorder capabilities, new number orders may + For orders that support Backorder capabilities, new number orders may stay in backordered state while the order is filled. While in this state it is possible to update the modifiable fields in the record, as well as to request that backorder processing of the order be ended. @@ -28695,7 +29772,7 @@ paths: schema: $ref: '#/components/schemas/TelephoneDetailsAreaCodes' description: '' - summary: List Telephone Number order area codes + summary: List Telephone Number order area codes [NANPA] tags: - Orders /accounts/{accountId}/orders/{orderId}/history: @@ -28993,7 +30070,7 @@ paths: schema: $ref: '#/components/schemas/TelephoneDetailsNpaNxx' description: '' - summary: List Telephone Number order Npa-Nxx + summary: List Telephone Number order Npa-Nxx [NANPA] tags: - Orders /accounts/{accountId}/orders/{orderId}/tns: @@ -29235,7 +30312,7 @@ paths: content: application/xml: examples: - Portins in FOC: + Portins containing NANP numbers: description: List of portin orders with FOC processing status value: |- @@ -29283,7 +30360,35 @@ paths: 979E019287CDF6A1 - RespOrg exception toll-free portin order: + Portins containing non-NANP numbers: + description: List containing a single portin order with global numbers + value: |- + + + 2 + + Link=<https://test.dashboard.bandwidth.com:443/v1.0/accounts/9900012/portins?page=1&size=10&date=2020-01-15&status=foc>;rel="first"; + + + 9900012 + 1 + gforrest + 2023-03-29T19:06:10.085Z + 2023-03-29T19:06:10.085Z + b2190bcc-0272-4a51-ba56-7c3d628e8706 + port_in + 2023-04-01T01:00:00.000Z + WandEDemo + 1290 + SFR + SUBMITTED + 2023-03-29 + ?? + ?? + 979E019287CDF6A1 + + + RespOrg exception toll-free order containing NANP numbers: description: >- List containing a single RespOrg exception toll-free portin order @@ -29320,7 +30425,7 @@ paths: tags: - Porting post: - description: >- + description: > Creates a port-in order for the specified telephone number(s) and account number.
    Please visit How to Create @@ -29335,28 +30440,121 @@ paths: content: application/xml: examples: - Automated Toll-Free Port-in: + Automated NANP Toll-Free Port-in: value: "\n\n\tMy order id\n\t2021-06-16Z\n\t2439\n\t23432\n\tThe Authgal\n\tJYT01\n\t\n\t\t+18774809871\n\t\n" - Regular Port-in: - value: "\n\n\t2016-03-25T21:15:00.000Z\n\tX455\n\t+19195551234\n\t+19175131245\n\t SITE ID \n\t SIPPEER ID \n\t\n\t\tBUSINESS\n\t\tFirst\n\t\tLast\n\t\t\n\t\t\t11235\n\t\t\tBack\n\t\t\tDenver\n\t\t\tCO\n\t\t\t27541\n\t\t\tCanyon\n\t\t\n\t\n\tThe Authguy\n\t\n\t\t771297665AABC\n\t\t1234\n\t\n\t\n\t\tProtected\n\t\tExternal\n\t\tImported\n\t\n\t\n\t\t+19194809871\n\t\n\tmyOrder\n\ttrue\n\ttrue\n\tDRAFT\n" + Global Port-in, Business Subscriber: + value: |- + + + 2023-09-01 + 13078 + 553906 + British Telecom + + BUSINESS + Acme, Inc. + IE1234567T + ba4bb1f3-4358-4a46-883f-6376539ff94e + + + +3237470444 + + myOrder + + Global Port-in, Residential Subscriber: + value: |- + + + 2023-09-01 + 13078 + 553906 + British Telecom + + RESIDENTIAL + Jane + Doe + M + ba4bb1f3-4358-4a46-883f-6376539ff94e + + + +3237470444 + + myOrder + + On-net NANP Port-in: + value: "\n\n\t2016-03-25T21:15:00.000Z\n\tX455\n\t+19195551234\n\t+19175131245\n\t2439\n\t23432\n\t\n\t\tBUSINESS\n\t\tFirst\n\t\tLast\n\t\t\n\t\t\t11235\n\t\t\tBack\n\t\t\tDenver\n\t\t\tCO\n\t\t\t27541\n\t\t\tCanyon\n\t\t\n\t\n\tThe Authguy\n\t\n\t\t771297665AABC\n\t\t1234\n\t\n\t\n\t\tProtected\n\t\tExternal\n\t\tImported\n\t\n\t\n\t\t+19194809871\n\t\n\tmyOrder\n\ttrue\n\ttrue\n\tDRAFT\n" schema: oneOf: - - $ref: '#/components/schemas/OnNetLnpOrderRequest' - - $ref: '#/components/schemas/ManualTollFreeLnpOrderRequest' - - $ref: '#/components/schemas/AutomatedTollFreeLnpOrderRequest' - - $ref: '#/components/schemas/OffNetLnpOrderRequest' - - $ref: '#/components/schemas/InternalLnpOrderRequest' + - $ref: '#/components/schemas/OnNetNANPLnpOrderRequest' + - $ref: '#/components/schemas/ManualNANPTollFreeLnpOrderRequest' + - $ref: '#/components/schemas/AutomatedNANPTollFreeLnpOrderRequest' + - $ref: '#/components/schemas/OffNetNANPLnpOrderRequest' + - $ref: '#/components/schemas/InternalNANPLnpOrderRequest' + - $ref: '#/components/schemas/ManualGlobalLnpOrderRequest' responses: '201': content: application/xml: examples: - Automated Toll-Free Order Response: + Automated NANP Toll-Free Port-in Order Response: value: "\n\n\t03f194d5-3932-4e9f-8ba1-03ef767985e5\n\t\n\t\t201\n\t\tOrder request received. Please use the order id to check the status of your order later.\n\t\n\tVALIDATE_TFNS\n\t2016-03-25T21:15:00.000Z\n\tThe Authguy\n\t\n\t\t+18774809871\n\t\n\tPROCESSING\n\tPHASE_1_TOLLFREE\n\tJYT01\n" - Regular Order Response: + Global Port-in Order Response, Business Subscriber: + value: |- + + + 03f194d5-3932-4e9f-8ba1-03ef767985e5 + + 201 + Order request received. Please use the order id to check the status of your order later. + + 2023-09-01 + The Authguy + + BUSINESS + Acme, Inc. + IE1234567T + ba4bb1f3-4358-4a46-883f-6376539ff94e + + 13078 + 553906 + British Telecom + + +3237470444 + + myOrder + + Global Port-in Order Response, Residential Subscriber: + value: |- + + + 03f194d5-3932-4e9f-8ba1-03ef767985e5 + + 201 + Order request received. Please use the order id to check the status of your order later. + + 2023-09-01 + The Authguy + + RESIDENTIAL + Jane + Doe + M + ba4bb1f3-4358-4a46-883f-6376539ff94e + + 13078 + 553906 + British Telecom + + +3237470444 + + myOrder + + On-net NANP Port-in Order Response: value: "\n\n\t03f194d5-3932-4e9f-8ba1-03ef767985e5\n\t\n\t\t201\n\t\tOrder request received. Please use the order id to check the status of your order later.\n\t\n\tPENDING_DOCUMENTS\n\t2016-03-25T21:15:00.000Z\n\tThe Authguy\n\t\n\t\tBUSINESS\n\t\tFirst\n\t\tLast\n\t\t\n\t\t\t11235\n\t\t\tBack\n\t\t\tDenver\n\t\t\tCO\n\t\t\t27541\n\t\t\tCanyon\n\t\t\tUnited States\n\t\t\n\t\n\t\n\t\t771297665AABC\n\t\t1234\n\t\n\t\n\t\tProtected\n\t\tExternal\n\t\tImported\n\t\n\t+19195551234\n\t+19175131245\n\t SITE ID \n\t SIPPEER ID \n\t\n\t\t+19194809871\n\t\n\tmyOrder\n\ttrue\n\ttrue\n" schema: - $ref: '#/components/schemas/LnpOrderResponse' + oneOf: + - $ref: '#/components/schemas/LnpOrderResponse' + - $ref: '#/components/schemas/ManualGlobalLnpOrderResponse' description: >- The order has been created and an order ID is specified in the payload and in the header. @@ -29574,6 +30772,40 @@ paths: content: application/xml: examples: + Manual Global Port-in in SUBMITTED state: + value: |- + + + SUBMITTED + 2023-06-30T00:00:00Z + + BUSINESS + Acme, Inc + IE1234567T + ba4bb1f3-4358-4a46-883f-6376539ff94e + + + +441171261486 + +441171261487 + +441171261488 + +441171261489 + +441171261580 + + 9912829 + 13078 + 553906 + British Telecom + International porting vendor + 2023-06-23T20:02:20.042Z + 2023-06-23T20:02:21.000Z + systemUser + systemUser + port-001 + PORTIN + MANUAL + GBR + GEOGRAPHIC + Port-in in CANCELLED state: value: |- @@ -29672,6 +30904,7 @@ paths: oneOf: - $ref: '#/components/schemas/LnpOrderResponse' - $ref: '#/components/schemas/LnpOrderResponseAutomatedTollFree' + - $ref: '#/components/schemas/ManualGlobalLnpOrderResponse' description: >- The information has been successfully retrieved and displayed in the payload. @@ -29730,6 +30963,27 @@ paths: TestName TestLastName JYT01 + Manual Global Request: + value: |- + + + port-001 + 2023-09-01 + 13078 + 553906 + + +441171261486 + +441171261487 + +441171261488 + + British Telecom + + BUSINESS + Acme, Inc. + IE1234567T + ba4bb1f3-4358-4a46-883f-6376539ff94e + + Regular Request: value: |- @@ -29803,13 +31057,18 @@ paths: - properties: LnpOrderSupp: $ref: '#/components/schemas/LnpOrderSuppAutomatedOnNetWireless' - title: Automated On-Net wireless to wireless + title: Automated On-Net (wireless to wireless) type: object - properties: LnpOrderSupp: $ref: '#/components/schemas/LnpOrderSuppInternal' title: Internal type: object + - properties: + LnpOrderSupp: + $ref: '#/components/schemas/LnpOrderSuppGlobalManual' + title: Manual Global + type: object responses: '200': content: @@ -29836,6 +31095,18 @@ paths: TestName TestLastName JYT01 + Manual Global Response: + value: |- + + + de654fe7-d4ba-4d67-9064-5caa2292b25b + + 200 + Supp request received. Please use the order id to check the status of your order later. + + + REQUESTED_SUPP + Simple Order Response: value: |- @@ -29852,7 +31123,9 @@ paths: false schema: - $ref: '#/components/schemas/LnpOrderPutResponse' + oneOf: + - $ref: '#/components/schemas/LnpOrderPutResponse' + - $ref: '#/components/schemas/ManualGlobalLnpOrderPutResponse' description: >- The order has been successfully updated. The payload includes the fields that were included @@ -31349,10 +32622,96 @@ paths: responses: '200': content: + application/json: + examples: + example: + value: |- + { + "products": [ + { + "name": "Termination", + "features": [ + "TermHttpVoice" + ] + }, + { + "name": "TollFree" + }, + { + "name": "Origination", + "features": [ + "CallForwarding", + "DlDa", + "CNAM" + ] + }, + { + "name": "MESSAGING", + "features": [ + "SMS", + "MMS", + "HTTPV2", + "TollFree" + ] + }, + { + "name": "NumberManagement", + "features": [ + "Ordering", + "LNP", + "HostedTNS", + "IMPORT_TNS", + "HostedVoice", + "TN_ASSIGNMENT", + "RESERVATION", + "LSR" + ] + "countrySettings": [ + { + "countryCodeA3": "FRA", + "phoneNumberType": "GEOGRAPHIC", + "features": [ + { + "featureName": "LNP", + "isDisabled": true + }, + { + "featureName": "Ordering", + "isDisabled": true + } + ] + }, + { + "countryCodeA3": "DEU", + "phoneNumberType": "NATIONAL", + "features": [ + { + "featureName": "HostedTNS", + "isDisabled": true + }, + { + "featureName": "IMPORT_TNS", + "isDisabled": true + }, + { + "featureName": "HostedVoice", + "isDisabled": true + }, + { + "featureName": "Ordering", + "isDisabled": false + } + ] + } + ] + } + ] + } + schema: + $ref: '#/components/schemas/AccountProductsResponse' application/xml: examples: example: - description: example value: |- @@ -31363,9 +32722,6 @@ paths: TermHttpVoice - - VirtualInventory - TollFree @@ -31375,7 +32731,6 @@ paths: CallForwarding DlDa CNAM - OrigHttpVoice @@ -31383,7 +32738,6 @@ paths: SMS MMS - HTTP HTTPV2 TollFree @@ -31391,14 +32745,53 @@ paths: NumberManagement - ORDERING + Ordering LNP - EXTERNAL_TNS - PROTECTED_TNS + HostedTNS + IMPORT_TNS + HostedVoice TN_ASSIGNMENT RESERVATION LSR + + + FRA + GEOGRAPHIC + + + LNP + true + + + Ordering + true + + + + + DEU + NATIONAL + + + HostedTNS + true + + + IMPORT_TNS + true + + + HostedVoice + true + + + Ordering + true + + + + @@ -33016,11 +34409,11 @@ paths: summary: Update Realm tags: - Sip Registrar - /accounts/{accountId}/removeImportedTnOrders: + /accounts/{accountId}/removeImportedTnOrders/messaging: get: description: >- - Retrieves the Remove Imported Tn Orders requests for the given account - ID. + Retrieves the Remove Imported Messaging Tn Orders requests for the given + account ID. A maximum of 1,000 orders can be retrieved per request. If no date range or specific query parameter as required is provided, the order results @@ -33028,76 +34421,13 @@ paths: operationId: ListRemoveImportedTnOrders parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: The status of the Remove Imported Tn Orders being searched for - example: PARTIAL - in: query - name: status - required: false - schema: - items: - enum: - - PROCESSING - - COMPLETE - - PARTIAL - - FAILED - type: string - type: array - - description: A Telephone Number (TN) that is referenced in the order - example: '+19199918388' - in: query - name: tn - required: true - schema: - type: string - - description: >- - The Customer Order Id is an Id assigned by the account owner to - provide a reference number for the Remove Imported Tn Order - example: ABCCorp12345 - in: query - name: customerOrderId - required: true - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date after this date will be included. Format is - yyyy-MM-dd - example: '2022-04-19' - in: query - name: createdDateFrom - required: false - schema: - type: string - - description: >- - Checks the order's creation date against this value. Orders that - have a creation date before this date will be included. Format is - yyyy-MM-dd - example: '2022-04-19' - in: query - name: createdDateTo - required: false - schema: - type: string - - description: >- - For Date-based searches, the starting date of a date range - (inclusive) that will be used to find Remove Imported Tn Orders that - were modified within the date range. It is in the form yyyy-MM-dd - example: '2022-04-19' - in: query - name: modifiedDateFrom - required: false - schema: - type: string - - description: >- - For Date-based searches, the ending date of a date range (inclusive) - that will be used to find Remove Imported Tn Orders that were - modified within the date range. It is in the form yyyy-MM-dd - example: '2022-04-19' - in: query - name: modifiedDateTo - required: false - schema: - type: string + - $ref: '#/components/parameters/StatusQueryParam' + - $ref: '#/components/parameters/TnQueryParam' + - $ref: '#/components/parameters/CustomerOrderIdQueryParam' + - $ref: '#/components/parameters/CreatedDateFromQueryParam' + - $ref: '#/components/parameters/CreatedDateToQueryParam' + - $ref: '#/components/parameters/ModifiedDateFromQueryParam' + - $ref: '#/components/parameters/ModifiedDateToQueryParam' responses: '200': content: @@ -33134,23 +34464,24 @@ paths: schema: $ref: '#/components/schemas/RemoveImportedTnOrders' description: >- - The descriptive payload for the Remove Imported Tn Orders query - provides information about the orders found by the query, including - the data associated with the order, the state of the order, and a - list of the successfully removed Telephone Numbers, and descriptions - of any encountered errors - summary: List Remove Imported Tn Orders + The descriptive payload for the Remove Imported Messaging Tn Orders + query provides information about the orders found by the query, + including the data associated with the order, the state of the + order, and a list of the successfully removed Telephone Numbers, and + descriptions of any encountered errors + summary: List Remove Imported Messaging Tn Orders tags: - Hosted Messaging post: description: >- - Creates a Remove Imported Tn Orders request to remove imported telephone - numbers from the given site ID and sippeer ID as specified in the body. - A successfully submitted order will have a status of "PROCESSING". A - successfully completed order will have a status of "COMPLETE" if all of - the telephone numbers were successfully removed and "PARTIAL" if some - of the telephone numbers were removed. A failed order with will have a - status of "FAILED" and no telephone numbers would have been removed + Creates a Remove Imported Messaging Tn Orders request to remove imported + telephone numbers from the given site ID and sippeer ID as specified in + the body. A successfully submitted order will have a status of + "PROCESSING". A successfully completed order will have a status of + "COMPLETE" if all of the telephone numbers were successfully removed + and "PARTIAL" if some of the telephone numbers were removed. A failed + order with will have a status of "FAILED" and no telephone numbers would + have been removed operationId: CreateRemoveImportedTnOrder parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -33220,7 +34551,136 @@ paths: description: >- The order failed. One of the input parameters is invalid. The error text and an error code will be provided in the ErrorList element - summary: Create Remove Imported Tn Order + summary: Create Remove Imported Messaging Tn Order + tags: + - Hosted Messaging + /accounts/{accountId}/removeImportedTnOrders/messaging/{orderId}: + get: + description: Retrieve information about a removeImportedTnOrder with specified ID + operationId: RetrieveRemoveImportedTnOrder + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - $ref: '#/components/parameters/OrderIdPathParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + 2018-01-09T02:58:04.615Z + 9900012 + sjm + bf1305b8-8998-1111-2222-51ba3ce52d4e + 2018-01-09T02:58:05.298Z + + +12106078250 + +12109678273 + +12109678331 + +12109678337 + +12266401468 + + PARTIAL + + + 7518 + Telephone Number Not Active. + + +12262665583 + + + + + schema: + $ref: '#/components/schemas/RemoveImportedTnOrdersResponse' + description: >- + The information has been successfully retrieved and displayed in the + payload + '400': + content: + application/xml: + examples: + example: + value: |- + + + + The resource does not exist + + + schema: + $ref: '#/components/schemas/RemoveImportedTnOrdersHistoryResponse' + description: Order id is not valid + summary: Retrieve Remove Imported Messaging Tn Order + tags: + - Hosted Messaging + /accounts/{accountId}/removeImportedTnOrders/messaging/{orderId}/history: + get: + description: >- + Retrieves the history of the specified Remove Imported Messaging Tn + Order + operationId: RetrieveRemoveImportedTnOrderHistory + parameters: + - $ref: '#/components/parameters/AccountIdPathParam' + - description: ID of `RemoveImportedTnOrder` to retrieve history + example: bf1305b8-8998-1111-2222-51ba3ce52d4e + in: path + name: orderId + required: true + schema: + type: string + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + + 2015-06-16T14:03:10.225Z + Remove Imported TN order is received. + admin + RECEIVED + + + 2015-06-16T14:03:10.330Z + Remove Imported TN order is processing. + admin + PROCESSING + + + 2015-06-16T14:03:10.789Z + Remove Imported TN order is partial. + admin + PARTIAL + + + schema: + $ref: '#/components/schemas/OrderHistoryWrapper' + description: >- + The history has been successfully retrieved and displayed in the + payload + '400': + content: + application/xml: + examples: + example: + value: |- + + + + 1008 + 'some_invalid_uuid' is not a valid UUID + + + schema: + $ref: '#/components/schemas/RemoveImportedTnOrdersHistoryResponse' + description: Order id is not valid + summary: Retrieve Remove Imported Messaging Tn Order history tags: - Hosted Messaging /accounts/{accountId}/removeImportedTnOrders/voice: @@ -33242,7 +34702,6 @@ paths: - $ref: '#/components/parameters/CreatedDateToQueryParam' - $ref: '#/components/parameters/ModifiedDateFromQueryParam' - $ref: '#/components/parameters/ModifiedDateToQueryParam' - - $ref: '#/components/parameters/SipPeerIdQueryParam' responses: '200': content: @@ -33585,140 +35044,6 @@ paths: summary: Retrieve Remove Imported Voice Tn Order history tags: - Hosted Voice - /accounts/{accountId}/removeImportedTnOrders/{orderId}: - get: - description: Retrieve information about a removeImportedTnOrder with specified ID - operationId: RetrieveRemoveImportedTnOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: ID of `RemoveImportedTnOrder` to retrieve - example: bf1305b8-8998-1111-2222-51ba3ce52d4e - in: path - name: orderId - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 2018-01-09T02:58:04.615Z - 9900012 - sjm - bf1305b8-8998-1111-2222-51ba3ce52d4e - 2018-01-09T02:58:05.298Z - - +12106078250 - +12109678273 - +12109678331 - +12109678337 - +12266401468 - - PARTIAL - - - 7518 - Telephone Number Not Active. - - +12262665583 - - - - - schema: - $ref: '#/components/schemas/RemoveImportedTnOrdersResponse' - description: >- - The information has been successfully retrieved and displayed in the - payload - '400': - content: - application/xml: - examples: - example: - value: |- - - - - 1008 - 'some_invalid_uuid' is not a valid UUID - - - schema: - $ref: '#/components/schemas/RemoveImportedTnOrdersHistoryResponse' - description: Order id is not valid - summary: Retrieve Remove Imported Tn Order - tags: - - Hosted Messaging - /accounts/{accountId}/removeImportedTnOrders/{orderId}/history: - get: - description: Retrieves the history of the specified Remove Imported Tn Order - operationId: RetrieveRemoveImportedTnOrderHistory - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: ID of `RemoveImportedTnOrder` to retrieve history - example: bf1305b8-8998-1111-2222-51ba3ce52d4e - in: path - name: orderId - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - - 2015-06-16T14:03:10.225Z - Remove Imported TN order is received. - admin - RECEIVED - - - 2015-06-16T14:03:10.330Z - Remove Imported TN order is processing. - admin - PROCESSING - - - 2015-06-16T14:03:10.789Z - Remove Imported TN order is partial. - admin - PARTIAL - - - schema: - $ref: '#/components/schemas/OrderHistoryWrapper' - description: >- - The history has been successfully retrieved and displayed in the - payload - '400': - content: - application/xml: - examples: - example: - value: |- - - - - 1008 - 'some_invalid_uuid' is not a valid UUID - - - schema: - $ref: '#/components/schemas/RemoveImportedTnOrdersHistoryResponse' - description: Order id is not valid - summary: Retrieve Remove Imported Tn Order history - tags: - - Hosted Messaging /accounts/{accountId}/reports: get: description: >- @@ -33729,6 +35054,43 @@ paths: and creation of an instance of the report. Items of this list are sorted by display priority in ascending order and alphabetically by name within priority groups (display priority is displayed only for admin endpoint) + + + In this table are presented valid report types. Some are applicable + universally, and some are only applicable for numbers of specific + region. + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Report TypeReport IDReport NameDescriptionNumber Region
    Numbers37Bandwidth Phone Number InventoryA list of all telephone numbers in 'Available' status at the time that the report was compiledNANPA
    Numbers4Phone Number InventoryA list of all phone numbers associated with an account
    Numbers34End-User Phone Number AssignmentA list of phone numbers and their end-user assignment statusesNANPA
    Numbers50Protected Phone NumbersThis report will provide a simple report that lists all of the protected TNs on an account, as well as their status.NANPA
    Voice Enabled Numbers2Voice Phone Number DetailsComplete information about all phone numbers within the report’s scope
    Voice Enabled Numbers65Phone Number Route PlanThis report lists all of the route plans that are active for the indicated accountNANPA
    Voice Enabled Numbers48Phone Number UtilizationThis account report will provide insight into the current utilization and assignment data associated with the Bandwidth Dashboard TN inventoryNANPA
    Voice Enabled Numbers47Under-Utilized and Unassigned Phone NumbersThis report will list all of the Telephone Numbers that appear to be under-utilized and unassigned.NANPA
    Messaging Enabled Numbers67Messaging Phone Number DetailsDetails of phone numbers with active messaging for particular snapshot date
    Messaging Enabled Numbers31External Phone Number DetailsComplete information about customer provided phone numbers within the report’s scopeNANPA
    Emergency Enabled Numbers6Emergency Services Phone Number DetailsEmergency Service information associated with phone numbers within the report’s scopeNANPA
    Emergency Enabled Numbers36Alternate Caller ID E911 ReportE911 detail information for accounts that use an alternative identifier for the end userNANPA
    Emergency Enabled Numbers42E911 Dynamic Location Routing AddressesA list of all E911 addresses provisioned to an account. The list of addresses shown are only for Dynamic Location Routing-enabled accounts.NANPA
    Orders59New Number OrdersPhone number details for historic or current new number orders
    Orders30Disconnect OrdersInformation about all phone numbers that have been disconnected from the account
    Orders14Port-in OrdersPhone number details for historic or current port-in orders
    Orders8Port-out OrdersPhone number details for historic or current port-out orders
    Account16UC Account SummaryDetailed account information for a given UC accountNANPA
    Users24User InformationInformation about all active and inactive users for a given account
    + + + When reports tagged NANPA in table above are retrieved, only the North + American Numbering Plan phone numbers from are returned in the report. operationId: ListReports parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -35554,105 +36916,100 @@ paths: get: description: >- Retrieves all the telephone numbers currently in-service for the given - Site + Site. + + + In this table are presented capabilities that are not universally + available. The following request query parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANPA|city| + + |NANPA|tier| + + |NANPA|npaNxx| + + |NANPA|npaNxxx| + + |NANPA|lata| + + |NANPA|state| + + |NANPA|ratecenter| + + + When the query parameters listed in the table above are passed, only + inservice the North American Numbering Plan phone numbers from are + returned. operationId: RetrieveSiteInserviceNumbers parameters: - $ref: '#/components/parameters/AccountIdPathParam' - - description: ID of the Site to retrieve all INSERVICE numbers - example: '407' - in: path - name: siteId - required: true - schema: - type: string + - $ref: '#/components/parameters/SiteIdPathParam' + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/startdateQueryParam' + - $ref: '#/components/parameters/enddateQueryParam' + - $ref: '#/components/parameters/countryCodeA3QueryParam' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + - $ref: '#/components/parameters/areaCodeQueryParam' + - $ref: '#/components/parameters/cityQueryParam' + - $ref: '#/components/parameters/tierQueryParam' - description: >- - The first in-service number displayed on the page. "1" is used as a - convention for the first number on the list. - example: 15555551845 +

    The 6-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXX are [2-9] for the first digit and [0-9] for both the second and + third digits.
    + example: 919859 in: query - name: page + name: npaNxx required: false schema: - default: 1 type: integer - - description: The count of in-service numbers displayed on the page. - example: 30 + - description: >- +

    The 7-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXXX are [2-9] for the first digit and [0-9] the rest of the (X) + digits.
    in: query - name: size + name: npaNxxx required: false schema: - default: 300 type: integer - - description: A maximum five-digit number - example: 371 + - description: >- + A Rate Center search filter - all returned TNs will be in the + entered Rate Center. Typically this is a 3 or 5 digit value. + example: 435 in: query name: lata required: false schema: type: integer - - description: '' - example: 1 - in: query - name: tier - required: false - schema: - type: integer - - description: '' - example: ST GEORGE + - description: >- + A Rate Center search filter - all returned TNs will be in the + entered Rate Center. This `ratecenter` must be combined with a + `state` in the query. If State is not included in the query then + the query will fail. + example: PLANO in: query name: rateCenter required: false schema: type: string - - description: '' - example: Raleigh - in: query - name: city - required: false - schema: - type: string - - description: A two-letter representation of the State - example: NC + - description: >- + A State search filter - all returned TNs will be in the entered + State. This is a 2-character State or Province abbreviation. + example: TX in: query name: state required: false schema: type: string - - description: '' - example: '435' - in: query - name: areaCode - required: false - schema: - type: string - - description: '' - example: '435215' - in: query - name: npaNxx - required: false - schema: - type: string - - description: '' - example: '4352154' - in: query - name: npaNxxx - required: false - schema: - type: string - - description: Startdate and Enddate must be together - example: 12-01-01 - in: query - name: startdate - required: false - schema: - type: string - - description: Startdate and Enddate must be together - example: 14-01-01 - in: query - name: enddate - required: false - schema: - type: string responses: '200': content: @@ -35684,214 +37041,6 @@ paths: summary: Retrieve Site in-service numbers tags: - In-service Numbers - /accounts/{accountId}/sites/{siteId}/orders: - get: - description: Retrieves all orders associated with the given Site - operationId: RetrieveSiteOrders - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: ID of the Site to retrieve associated Orders - example: '407' - in: path - name: siteId - required: true - schema: - type: string - - description: Sets the amount of responses per page - example: 30 - in: query - name: size - required: true - schema: - type: integer - - description: >- - The first orders ID to show on the page. "1" is used as a convention - for the first page - example: 1 - in: query - name: page - required: true - schema: - type: integer - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - - 47 - - Link=<https://dashboard.bandwidth.com/api/accounts/12346099/sites/743/orders?page=1&size=30>;rel="first"; - Link=<https://dashboard.bandwidth.com/api/accounts/12346099/sites/743/orders?page=fa7bc01a-cb4d-4eae-9621-560020f45105&size=30>;rel="next"; - - - 1 - jbm - 2014-01-06T19:09:44.027Z - new_number - 2014-01-06T19:09:43.695Z - 13c97416-9eee-4da3-aff8-ba85d1297ef2 - COMPLETE - - - - VA - 1 - - - - - 1 - GLOUCESTER - - - - - GLOUCESTER - 1 - - - - - 0 - 1 - - - - - 49 - Bandwidth CLEC - 1 - - - - - - - schema: - $ref: '#/components/schemas/SiteOrdersResponse' - description: '' - '404': - content: - application/xml: - examples: - example: - value: |- - - - Link=<https://dashboard.bandwidth.com/api/accounts/12346099/sites/3013/orders?page=1&size=300>;rel="first"; - - description: >- - Orders cannot be found for that Site. Possible explanations: - -
    • There are no orders associated with that Site.
    • The - given parameters are invalid.
    - summary: Retrieve Site Orders - tags: - - Orders - /accounts/{accountId}/sites/{siteId}/orders/{orderId}: - get: - description: Retrieves order information associated with the given Site - operationId: RetrieveSiteOrder - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: Site ID of the order - example: '407' - in: path - name: siteId - required: true - schema: - type: string - - description: ID of the Order to retrieve - example: ca8065d1-ec1a-43da-af40-1dcee43becb5 - in: path - name: orderId - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 1 - jbm - 2014-01-06T19:09:44.027Z - 2014-01-06T19:09:44.041Z - - 123456789 - Area Code Order - 2014-01-06T19:09:43.695Z - 303716 - 743 - false - - 804 - 1 - - true - 743 - - COMPLETE - - - +18042105666 - - - 0 - - schema: - $ref: '#/components/schemas/TnOrderUpdatedResponse' - description: A successful result that contains the response data - summary: Retrieve Site Order - tags: - - Orders - /accounts/{accountId}/sites/{siteId}/orders/{orderId}/tns: - get: - description: Retrieves order TNs associated with the given Site - operationId: RetrieveSiteOrderTns - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - description: Site ID of the order - example: '407' - in: path - name: siteId - required: true - schema: - type: string - - description: ID of the Order to retrieve a list of TNs - example: ca8065d1-ec1a-43da-af40-1dcee43becb5 - in: path - name: orderId - required: true - schema: - type: string - responses: - '200': - content: - application/xml: - examples: - example: - value: |- - - - 1 - +18042105666 - - schema: - $ref: '#/components/schemas/OrderTelephoneNumbersResponse' - description: A successful result that contains the response data - summary: Retrieve Order TNs of Site - tags: - - Tns /accounts/{accountId}/sites/{siteId}/portins: get: description: Retrieves Port-in orders associated with the given Site @@ -36744,45 +37893,6 @@ paths: summary: Update Sip Peer tags: - SipPeer Management - /accounts/{accountId}/sites/{siteId}/sippeers/{sipPeerId}/movetns: - post: - description: >- - The POST method moves all telephone numbers specified in the body to the - given SIP peer.
    The source SIP peer is determined by the Telephone - Number, i.e. the PUT method can move multiple numbers from different - source SIP peers.
    The destination SIP peer is specified in the - URL.
    NOTE: only a maximum of 5000 Telephone Numbers can be moved in - one operation. - operationId: CreateSipPeerTelephoneNumberBulk - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/SiteIdPathParam' - - $ref: '#/components/parameters/SipPeerIdPathParam' - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/SipPeerTelephoneNumberBulk' - responses: - '200': - content: - application/xml: - schema: - $ref: '#/components/schemas/SipPeerTelephoneNumberBulkResponse' - description: The request has been successfully received. - '400': - content: - application/xml: - schema: - $ref: '#/components/schemas/SipPeerTelephoneNumberBulkErrorResponse' - description: >- - Bad Request. Possible errors in response:
    • Shared TNs with - messaging cannot be moved to a sippeer without the SMS feature - enabled.
    • Shared TNs with voice cannot be moved to a - sippeer with the SMS feature enabled.
    - summary: Move bulk tns to sipper - tags: - - Move Tns /accounts/{accountId}/sites/{siteId}/sippeers/{sipPeerId}/products: get: description: A list of products associated with a Sip Peer @@ -38340,6 +39450,8 @@ paths: parameters: - $ref: '#/components/parameters/AccountIdPathParam' - $ref: '#/components/parameters/SiteIdPathParam' + - $ref: '#/components/parameters/SipPeerTnsPageQueryParam' + - $ref: '#/components/parameters/SipPeerTnsSizeQueryParam' - description: ID of the Sip Peer to retrieve TNs information example: '500017' in: path @@ -38366,6 +39478,10 @@ paths: value: |- + + ( a link goes here ) + ( a link goes here ) + +12052160148 @@ -38401,7 +39517,7 @@ paths: - Tns /accounts/{accountId}/sites/{siteId}/sippeers/{sippeerId}/tns/{tn}: get: - description: Retrieve information about telephone number on Sip Peer + description: Retrieve information about telephone number on Sip Peer. operationId: ReadSipPeerTn parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -38413,7 +39529,7 @@ paths: required: true schema: type: string - - description: A 10 Digit Telephone Number + - description: A E.164 Telephone Number example: '+15209072451' in: path name: tn @@ -38450,7 +39566,25 @@ paths: tags: - Tns put: - description: Update settings for a TN allocated to their account + description: >- + Update settings for a TN allocated to their account. + + + In this table are presented capabilities that are not universally + available. The following request body parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANPA|TnAttributes| + + |NANPA|CallingNameDisplay| + + + When these request body parameters are provided, only North American + Numbering Plan phone numbers are allowed and updated. operationId: UpdateSipPeerTnSettings parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -38462,7 +39596,7 @@ paths: required: true schema: type: string - - description: A 10 Digit Telephone Number to update + - description: A E.164 Telephone Number example: '+15209072451' in: path name: tn @@ -38478,7 +39612,6 @@ paths: +12052160156 - 10digit 10digit false +17042661720 @@ -38584,6 +39717,8 @@ paths: enum: - CNAM - LIDB + - DLDA + - DA type: string type: array responses: @@ -38596,9 +39731,11 @@ paths: - 4 - 4 - 0 + 10004 + 4 + 0 + 9999 + 0 schema: @@ -38731,6 +39868,7 @@ paths: iris + E164 @@ -38753,6 +39891,7 @@ paths: iris + E164 @@ -38886,6 +40025,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + E164 eventEmailSubscription: @@ -38915,6 +40055,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + E164 orderEmailSubscription: @@ -39042,6 +40183,7 @@ paths: http://customer.com:8087/path/BandwidthHandler +14283455101 200 OK + E164 @@ -39073,6 +40215,7 @@ paths: http://customer.com:8087/path/BandwidthHandler +14283455101 200 OK + E164 @@ -39138,6 +40281,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + E164 eventEmailSubscription: @@ -39167,6 +40311,7 @@ paths: LS0tLS1CRUdJTiBDRVJUSU [...] kQgQ0VSVElGSUNBVEUtLS0tLQ0K + E164 orderEmailSubscription: @@ -39623,72 +40768,203 @@ paths: tags: - Tn Option post: - description: >- - Create TN Option order to assign line features to the telephone - number.

    Attribute description:
    • for A2pSettings - attribute
    • Number - attributeAction valueDescription of - action
      LongCodesystemDefaultRemoves - the per-TN A2P attributes, and it reverts to the Location/SIP Peer - characteristics. Any values for Class or Campaign ID are not - valid
      LongCodeasSpecifiedSets - the message class and campaign ID - this is the default if - unspecified
      LongCodeoffWill - set the TN as a 'P' TN. Any values for Class or Campaign ID are not - valid
      LongCodedeleteWill - delete the campaign ID from TN. Any values for Class or Campaign ID are - not valid
      LongCodeunchangedDo - nothing with respect to - A2P
      TollFreesystemDefaultRemoves - the per-TN A2P attributes, and it reverts to the Location/SIP Peer - characteristics. Any values for Class or Campaign ID are not - valid
      TollFreeasSpecifiedSets - the message class and campaign ID - this is the default if - unspecified
      TollFreeoffIf the - Togglz value is set to 'on' this is invalid for Toll Free telephone - numbers. Any values for Class or Campaign ID in the payload are invalid. - If the Togglz value is set to off this behaves like and A2P TN, where - the characteristics of the TNs is set to - 'P'
      TollFreeunchangedDo - nothing with respect to A2P
    • for Origination - Route plan attribute
    • Action - valueDescription of - action
      asSpecifiedCreates/updates the - origination route plan for the TN with route plan details provided in - the request
      offRemoves the origination route - plan for the TN. Route list is the request must be - empty
      unchangedDoesn't update/create the - origination route plan, even when route plan details exist in the - request
      • Origination route plan is - validated against CallForward and RewriteUser
        • Route plan and CallForward cannot co-exist. Order is - accepted but will respond with error messages on GET.
        • Route plan and RewriteUser cannot co-exist. Order is - accepted but will respond with error messages on - GET.
    • for Pindrop Enabled attribute
    • Action valueDescription of - action
      trueEnables Pindrop integration on each - phone number in the option - group
      falseExplicitly disables Pindrop - integration on each phone number in the option - group
    • for Call Verification Enabled - attribute
    • Action - valueDescription of - action
      trueEnables Call Verification on each - phone number in the option - group
      falseExplicitly disables Call - Verification on each phone number in the option - group
    • for other attribute
      • systemDefault - implies that the element profile - value should be removed so that the TN changes back to the default - system behavior;
      • unchanged - the value - should remain unchanged - implies a read before write model.
      • Leaving the element out of the payload is equivalent to - unchanged.
    + description: > + Create TN Option order to assign line features to the telephone number. + + + The two data elements in the submission are - + +
      +
    • TnOptionGroups - A list of TnOptionGroup objects, which contain list of telephone numbers and set of TN options you want to assign to all TNs in the list.
    • +
    • CustomerOrderId - Optional value for Id set by customer. Only alphanumeric values, dashes and spaces are allowed. Max length is 40 characters.
    • +
    + + + In this table are presented valid attributes for TnOptionGroup object. + Some are applicable universally, and some are only applicable for + numbers of specific region. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeProductNumber Region
    TelephoneNumbers
    PortOutPasscodeNumbersNANPA
    ProtectedNumbersNANPA
    OriginationRoutePlanVoice
    NumberFormatVoice
    RPIDFormatVoice
    RewriteUserVoice
    CallForwardVoice
    FinalDestinationURIVoice
    PindropEnabledVoiceNANPA
    ESPIDVoiceNANPA
    CallingNameDisplayVoiceNANPA
    SmsMessaging
    A2pSettingsMessagingNANPA
    NNIDMessagingNANPA
    + + + When attributes tagged NANPA are passed in request body, only North + American Numbering Plan phone numbers are allowed and updated. + + + The values for each TnOptionGroup object attribute are: + +
      +
    • for TelephoneNumbers attribute
    • +
        +
      • A list of TelephoneNumber as Array of strings
      • +
          +
        • An E.164 formatted telephone number string. Assumes NANPA 10 digit format number if string is not E.164 formatted.
        • +
        +
      +
    • for PortOutPasscode attribute
    • +
        +
      • [ string | unchanged | systemDefault]
      • +
      +
    • for Protected attribute
    • +
        +
      • [ true | false | unchanged | systemDefault]
      • +
      +
    • for NumberFormat attribute
    • +
        +
      • [ 10digit | 11digit | e164 | unchanged | systemDefault ]
      • +
      +
    • for RPIDFormat attribute
    • +
        +
      • [ 10digit | 11digit | e164 | unchanged | systemDefault ]
      • +
      +
    • for RewriteUser attribute
    • +
        +
      • [ string | unchanged | systemDefault]
      • +
      +
    • for CallingNameDisplay attribute
    • +
        +
      • [ on | off | unchanged | systemDefault ]
      • +
      +
    • for Sms attribute
    • +
        +
      • [ on | off | unchanged]
      • +
      +
    • for NNID attribute
    • +
        +
      • [ integer | unchanged | systemDefault ]
      • +
      +
    • for ESPID attribute
    • +
        +
      • [ string | unchanged | systemDefault ]
      • +
      +
    • for CallForward attribute
    • +
        +
      • [ string | unchanged | systemDefault ]
      • +
          +
        • An E.164 formatted telephone number string. Assumes NANPA 10 digit format number if string is not E.164 formatted.
        • +
        +
      +
    • for FinalDestinationURI attribute
    • +
        +
      • [ string | unchanged | systemDefault]
      • +
          +
        • An E.164 formatted telephone number string. Assumes NANPA 10 digit format number if string is not E.164 formatted.
        • +
        • a SIP URI ( without the sip: prefix )
        • +
            +
          • in the form address-string@host IP:port, where
          • +
          • the host IP is an IPv4 address in the standard numerical n.n.n.n. form, and
          • +
          • the port is numeric, and optional
          • +
          • containing [a-z,A-Z,0-9], with ':', '.' and '@' to delimit the components of the overall string, and
          • +
          • less than 60 characters long.
          • +
          +
        +
      +
    • for all the above attribute
    • +
        +
      • systemDefault - implies that the element profile value should be removed so that the TN changes back to the default system behavior;
      • +
      • unchanged - the value should remain unchanged - implies a read before write model.
      • +
      • Leaving the element out of the payload is equivalent to unchanged.
      • +
      +
    • for A2pSettings attribute
    • +
      Number attributeAction valueDescription of action
      LongCodesystemDefaultRemoves the per-TN A2P attributes, and it reverts to the Location/SIP Peer characteristics. Any values for Class or Campaign ID are not valid
      LongCodeasSpecifiedSets the message class and campaign ID - this is the default if unspecified
      LongCodeoffWill set the TN as a ''P'' TN. Any values for Class or Campaign ID are not valid
      LongCodedeleteWill delete the campaign ID from TN. Any values for Class or Campaign ID are not valid
      LongCodeunchangedDo nothing with respect to A2P
      TollFreesystemDefaultRemoves the per-TN A2P attributes, and it reverts to the Location/SIP Peer characteristics. Any values for Class or Campaign ID are not valid
      TollFreeasSpecifiedSets the message class and campaign ID - this is the default if unspecified
      TollFreeoffIf the Togglz value is set to ''on'' this is invalid for Toll Free telephone numbers. Any values for Class or Campaign ID in the payload are invalid. If the Togglz value is set to off this behaves like and A2P TN, where the characteristics of the TNs is set to ''P''
      TollFreeunchangedDo nothing with respect to A2P
      +
    • for Origination Route plan attribute
    • +
      Action valueDescription of action
      asSpecifiedCreates/updates the origination route plan for the TN with route plan details provided in the request
      offRemoves the origination route plan for the TN. Route list is the request must be empty
      unchangedDoesn''t update/create the origination route plan, even when route plan details exist in the request
      +
        +
      • Origination route plan is validated against CallForward and RewriteUser
      • +
          +
        • Route plan and CallForward cannot co-exist. Order is accepted but will respond with error messages on GET.
        • +
        • Route plan and RewriteUser cannot co-exist. Order is accepted but will respond with error messages on GET.
        • +
        +
      +
    • for Pindrop Enabled attribute
    • +
      Action valueDescription of action
      trueEnables Pindrop integration on each phone number in the option group
      falseExplicitly disables Pindrop integration on each phone number in the option group
      +
    operationId: CreateTnOptionOrder parameters: - $ref: '#/components/parameters/AccountIdPathParam' @@ -41189,81 +42465,34 @@ paths: summary: Retrieve the total number of seats on account tags: - Account - /accounts/{accountId}/{orderType}/{orderId}/adminparameters: - delete: - description: Remove order admin parameters - operationId: RemoveOrderAdminParameters - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/OrderTypePathParam' - - $ref: '#/components/parameters/OrderIdPathParam' - responses: - '200': - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersResponse' - description: Order admin parameters have been successfully deleted/cancelled - '400': - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersErrorResponse' - description: >- - Order id is invalid, order does not exist or the port-in order is - already processed, and therefore cannot be deleted - summary: Remove Order Admin Parameters - tags: - - Orders + /addresses/fields: get: - description: Get order admin parameters - operationId: GetOrderAdminParameters - parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/OrderTypePathParam' - - $ref: '#/components/parameters/OrderIdPathParam' - responses: - '200': - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersResponse' - description: >- - The information has been successfully retrieved and displayed in the - payload - summary: Get Order Admin Parameters - tags: - - Orders - put: - description: Update order admin parameters - operationId: UpdateOrderAdminParameters + description: >- + Get a list of address fields that is supported per country and feature + specific requirements. + operationId: getAddressFields parameters: - - $ref: '#/components/parameters/AccountIdPathParam' - - $ref: '#/components/parameters/OrderTypePathParam' - - $ref: '#/components/parameters/OrderIdPathParam' - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersRequest' + - $ref: '#/components/parameters/countryCodeA3RequiredQueryParam' responses: '200': - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersResponse' - description: >- - The information has been successfully retrieved and displayed in the - payload + $ref: '#/components/responses/getAddressFieldsResponse' '400': - content: - application/xml: - schema: - $ref: '#/components/schemas/AdminParametersErrorResponse' - description: Wrong input - summary: Update Order Admin Parameters + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + summary: Get Address Fields tags: - - Orders + - Addresses /admin/data/a2pClasses: get: description: Retrieves A2P Classes. @@ -42216,9 +43445,98 @@ paths: Centers that serve those Cities. If 'available' is specified then the number of TNs available in that city / RC combination is also included. - summary: List Cities + summary: List Cities [NANPA] tags: - - Cities + - Coverage + /coverage/countries: + get: + description: >- + Get countries, number types and cities in Bandwidth's available phone + number inventory. This endpoint is only applicable for non-NANPA number + inventory. Please use `/cities` endpoint for Banwidth's NANPA available + phone number inventory coverage. + operationId: countryCoverage + parameters: + - $ref: '#/components/parameters/countryCodeA3QueryParam' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + - $ref: '#/components/parameters/cityQueryParam' + - $ref: '#/components/parameters/areaCodeQueryParam' + responses: + '200': + content: + application/json: + examples: + example: + value: |- + { + "countryCoverages": [ + { + "countryCodeA3": "USA", + "phoneNumberType": "MOBILE", + "regions": [ + { + "city": "Woodinville", + "areaCode": "435" + } + ] + } + ] + } + schema: + $ref: '#/components/schemas/CountryCoverageResponseSuccess' + application/xml: + examples: + example: + value: |- + + + + + USA + MOBILE + + + Woodinville + 435 + + + + + + schema: + $ref: '#/components/schemas/CountryCoverageResponseSuccess' + description: Created + '400': + content: + application/json: + examples: + example: + value: |- + { + "responseStatus": { + "errorCode": 4010, + "description": "A supplied phoneNumberType within '[SPECIALLL]' is invalid." + } + } + schema: + $ref: '#/components/schemas/CountryCoverageResponseError' + application/xml: + examples: + example: + value: |- + + + + 4010 + A supplied phoneNumberType within '[SPECIALLL]' is invalid. + + + schema: + $ref: '#/components/schemas/CountryCoverageResponseError' + description: Bad Request + summary: List Country Coverage + tags: + - Coverage /coveredRateCenters: get: description: >- @@ -42556,6 +43874,27 @@ paths: summary: Retrieve Covered Rate Centers tags: - Rate Centers + /porting/losingCarriers: + get: + description: > +

    List losing carriers that a number can be ported from. This endpoint + is only relevant for non-NANP number portin orders, which require a + losing carrier to be specified.

    + operationId: portingLosingCarriers + parameters: + - $ref: '#/components/parameters/countryCodeA3QueryParam_eq' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam_eq' + - $ref: '#/components/parameters/areaCodeQueryParam_eq' + responses: + '200': + $ref: '#/components/responses/listOfLosingCarriersResponse' + '400': + $ref: '#/components/responses/badRequestError' + '502': + $ref: '#/components/responses/internalServerError' + summary: List losing carriers + tags: + - Porting /rateCenters: get: description: >- @@ -42721,34 +44060,97 @@ paths: summary: List Rate Centers tags: - Rate Centers + /restrictions: + get: + description: >- + Information about how services work in various countries and which + restrictions and rules apply. Please consult this information before + buying and configuring your numbers. + operationId: ListRestrictions + parameters: + - $ref: '#/components/parameters/countryCodeA3QueryParam' + responses: + '200': + content: + application/xml: + examples: + example: + value: |- + + + + + BEL + LEGAL + Number portability + Lorem ipsum + + + BEL + PURCHASE + Address or identification requirements + Lorem ipsum + + + BEL + SERVICE + Compatibility issues + Lorem ipsum + + + + schema: + $ref: '#/components/schemas/RestrictionResponse' + description: >- + This response returns the list of cities, along with the Rate + Centers that serve those Restrictions. If 'available' is specified + then the number of TNs available in that city / RC combination is + also included. + summary: List Restrictions + tags: + - Compliance /tns: get: description: >- Retrieve information about one or more Telephone Numbers (TNs), where the TNs are chosen based on the search parameters provided in the API Call. + + + In this table are presented capabilities that are not universally + available. The following request query parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANPA|city| + + |NANPA|tier| + + |NANPA|npaNxx| + + |NANPA|npaNxxx| + + |NANPA|lata| + + |NANPA|state| + + |NANPA|ratecenter| + + + When the query parameters listed in the table above are passed, only + North American Numbering Plan phone numbers from are returned. operationId: ListTnsByGet parameters: - - description: >- - An ID of the first element in a page. This value will indicate the - first value, not the count, of the initial entry in the page being - requested. Note in the example that the page is the TN that begins - the page. The initial page is tagged with the ID "1" - example: '5' - in: query - name: page - required: true - schema: - default: '1' - type: string - - description: The number of items to include in a page. - example: 250 - in: query - name: size - required: true - schema: - default: 500 - type: integer + - $ref: '#/components/parameters/pageQueryParam' + - $ref: '#/components/parameters/sizeQueryParam' + - $ref: '#/components/parameters/countryCodeA3QueryParam' + - $ref: '#/components/parameters/phoneNumberTypeQueryParam' + - $ref: '#/components/parameters/areaCodeQueryParam' + - $ref: '#/components/parameters/cityQueryParam' + - $ref: '#/components/parameters/tierQueryParam' - description: The internal account id assigned to the customer that "owns" the TN. example: 5000125 in: query @@ -42756,18 +44158,7 @@ paths: required: false schema: type: integer - - description: >- - The geographic city most likely to serve the Telephone Number. City - and other geographic data is determined statistically, and is not as - reliable as Rate Center information for pinpointing the service - location of a TN. - example: CARY - in: query - name: city - required: false - schema: - type: string - - description: A 10 Digit TN. + - description: A E.164 TN. example: '+19199918388' in: query name: fullNumber @@ -42783,75 +44174,69 @@ paths: required: false schema: type: string - - description: >- - The LATA (Local Access Transport Area) that the TN is served from, - typically 3 digits (5 in FLA). - example: 423 - in: query - name: lata - required: false - schema: - type: integer - - description: The first 3 digits of a 10 Digit NA Telephone Number, the Area Code. - example: '919' + - description: A service type value to filter the TNs returned in the payload. + example: E911 in: query - name: npa + name: service required: false schema: + enum: + - E911 + - Voice + - Hosted_E911 type: string - - description: The first 6 digits of a 10 Digit NA Telephone Number. - example: '919991' + - description: >- +

    The 6-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXX are [2-9] for the first digit and [0-9] for both the second and + third digits.
    + example: 919859 in: query name: npaNxx required: false schema: - type: string - - description: The first 7 digits of a 10 Digit NA Telephone Number. - example: '9199918' + type: integer + - description: >- +

    The 7-digit prefix associated with the TN.

    • Allowed + number ranges for NPA are [2-9] for the first digit and [0-9] for + both the second and third digits.
    • Allowed number ranges for + NXXX are [2-9] for the first digit and [0-9] the rest of the (X) + digits.
    in: query - name: npaNxxX + name: npaNxxx required: false schema: - type: string - - description: A service type value to filter the TNs returned in the payload. - example: E911 + type: integer + - description: >- + A Rate Center search filter - all returned TNs will be in the + entered Rate Center. Typically this is a 3 or 5 digit value. + example: 435 in: query - name: service + name: lata required: false schema: - enum: - - E911 - - Voice - - Hosted_E911 - type: string + type: integer - description: >- - The Rate Center designation that the number is served from. If not - combined with a State search the results will span states. - example: RALEIGH + A Rate Center search filter - all returned TNs will be in the + entered Rate Center. This `ratecenter` must be combined with a + `state` in the query. If State is not included in the query then + the query will fail. + example: PLANO in: query name: rateCenter required: false schema: type: string - description: >- - A 2 character State or Province designation - TX for Texas for - example. + A State search filter - all returned TNs will be in the entered + State. This is a 2-character State or Province abbreviation. example: TX in: query name: state required: false schema: type: string - - description: >- - A service tier indicating the the vendor class that the TN is - associated with. Tier indicates whether the TN is on-net, domestic - offnet, Canadian, etc. - example: 5 - in: query - name: tier - required: false - schema: - type: integer responses: '200': content: @@ -42943,10 +44328,8 @@ paths: $ref: '#/components/schemas/TelephoneNumbersHistoryResponse' description: >- The descriptive payload for the TNs query provides information about - the TN(s) that were found in the Query. Information about the City, - State, LATA, Rate Center, Tier, Vendor, Status, Owning Account and - Last Modified Date is provided for each TN in the payload. Links to - assist in pagination are also provided. + the TN(s) that were found in the Query. Links to assist in + pagination are also provided. '400': content: application/xml: @@ -42973,8 +44356,49 @@ paths: description: >- Retrieve information about one or more Telephone Numbers (TNs), where the TNs are specified in POST body. + + + In this table are presented capabilities that are not universally + available. The following request query parameters are only allowed for + numbers from specific region/country: + + | Number Region | Request Query Parameter | + + |:--------------|:------------------------| + + |NANPA|city| + + |NANPA|tier| + + |NANPA|npaNxx| + + |NANPA|npaNxxx| + + |NANPA|lata| + + |NANPA|state| + + |NANPA|ratecenter| + + + When the query parameters listed in the table above are passed, only + North American Numbering Plan phone numbers from are returned. operationId: ListTnsByPost - parameters: [] + parameters: + - description: A service type value to filter the TNs returned in the payload. + example: Voice + in: query + name: service + required: false + schema: + enum: + - Voice + - Hosted_Voice + - Messaging + - Hosted_Messaging + - E911 + - Hosted_E911 + type: string requestBody: content: application/xml: @@ -43097,13 +44521,10 @@ paths: $ref: '#/components/schemas/TelephoneNumbersHistoryResponse' description: >- The descriptive payload for the TNs query provides information about - the TN(s) that were found in the Query. Information about the City, - State, LATA, Rate Center, Tier, Vendor, Status, Owning Account and - Last Modified Date is provided for each TN in the payload. The - Payload also can contain where invalid or non-existing - on account(s) TNs are specified. Aging numbers will be displayed if - user has access to the previous accountId. Pagination doesn't work - in this case. + the TN(s) that were found in the Query. The Payload also can contain + where invalid or non-existing on account(s) TNs are + specified. Aging numbers will be displayed if user has access to the + previous accountId. Pagination doesn't work in this case. '400': content: application/xml: @@ -43167,12 +44588,14 @@ paths: is "protected" only the account owning the TN can order it, otherwise it should be generally available.
  • Aging: The TN is disconnected by the customer owning the TN. At this time, the TN - will go into aging for some period of time (typically 30 days) and - the customer owning the TN can order it again. If the allotted time - has passed and the TN is not ordered by the owning customer, the TN - will go back to Available.
  • PortInPendingFoc: TN is in FOC - and waiting for the FOC date.
  • Reserved: A TN is reserved by - a customer to order at a later time.
  • + will go into aging for some period of time and the customer owning + the TN can order it again. If the allotted time has passed and the + TN is not ordered by the owning customer, the TN will go back to + Available.
  • PortInPendingFoc: TN is in process of porting and + waiting for the porting completion date. The term FOC is short for + Firm Order Commitment and applies to NANPA number + ports.
  • Reserved: A TN is reserved by a customer to order at + a later time.
  • summary: Retrieve tn tags: - Tns @@ -43231,7 +44654,7 @@ paths: description: >- Bad Request - failed to get available NnRoutes information for the current phone number. - summary: Retrieve routes for that tn + summary: Retrieve routes for that tn [NANPA] tags: - Tns /tns/{tn}/e911: @@ -43272,7 +44695,7 @@ paths: schema: $ref: '#/components/schemas/TnE911AddressResponse' description: The e911 address have been successfully retrieved and displayed - summary: Retrieve e911 for that tn + summary: Retrieve e911 for that tn [NANPA] tags: - Tns /tns/{tn}/lata: @@ -43303,7 +44726,7 @@ paths: schema: $ref: '#/components/schemas/TelephoneNumberLataResponse' description: The lata have been successfully retrieved. - summary: Retrieve lata for that tn + summary: Retrieve lata for that tn [NANPA] tags: - Tns /tns/{tn}/lca: @@ -43352,7 +44775,7 @@ paths: schema: $ref: '#/components/schemas/NpaNxxRcLcaSearchResult' description: The LCAs have been successfully retrieved and displayed. - summary: Retrieve LCA for that tn + summary: Retrieve LCA for that tn [NANPA] tags: - Tns /tns/{tn}/ratecenter: @@ -43385,7 +44808,7 @@ paths: schema: $ref: '#/components/schemas/TelephoneNumberRateCenterResponse' description: The rate centers have been successfully retrieved and displayed. - summary: Retrieve rate center for that tn + summary: Retrieve rate center for that tn [NANPA] tags: - Tns /tns/{tn}/sippeers: @@ -43451,8 +44874,28 @@ paths: /tns/{tn}/tndetails: get: description: >- - Retrieves detailed information about the phone number. TnAttributes - - Does this telephone number is protected or not. + Retrieves detailed information about the phone number. + + + In this table are presented capabilities that are not universally + available. The following response body attributes are only returned for + numbers from specific region/country: + + | Number Region | Response Body Attributes | + + |:--------------|:------------------------| + + |NANPA|LATA| + + |NANPA|State| + + |NANPA|RateCenter| + + |NANPA|E911| + + + These parameters are only applicable and hence returned in response body + for North American Numbering Plan phone numbers. operationId: RetrieveTnDetails parameters: - description: '' @@ -43467,35 +44910,6 @@ paths: content: application/xml: examples: - Non-NANP details: - value: |- - - - - +33140289562 - FR - geographic - 49 - Bandwidth CLEC - true - Inservice - 12345678 - - 123 - site - - - 500001 - sippeer - false - - - Voice - - 2020-03-03T15:30:07.000Z - 2020-03-03T15:30:07.518Z - - Shared TN details: value: |- @@ -43829,8 +45243,7 @@ paths: $ref: '#/components/schemas/TelephoneNumberDetailHistoryResponse' description: >- OK - the detailed information about the phone number has been - successfully retrieved and displayed.
    TnAttributes is not - required in the response. + successfully retrieved and displayed. '400': content: application/xml: @@ -43902,7 +45315,8 @@ tags: url: /docs/numbers/porting/port-ins/bulkPortIns name: Bulk Port-In - name: Callbacks - - name: Cities + - name: Compliance + - name: Coverage - description: >- DLDA = Directory Listing and Directory Assistance. A DLDA resource associates a TN with a Street Address. This gets updated in a Network @@ -43933,7 +45347,6 @@ tags: description: Emergency notification guide url: /docs/emergency/dashboard/notifications/ name: Emergency Notification - - name: External Tn - name: Hosted Messaging - name: Hosted Voice - name: Import Tn to Account diff --git a/site/specs/phone-number-lookup.yml b/site/specs/phone-number-lookup.yml index 8f1ee46f9..ba3a07899 100644 --- a/site/specs/phone-number-lookup.yml +++ b/site/specs/phone-number-lookup.yml @@ -99,36 +99,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.phonenumberlookup.models.OrderRequest; - import com.bandwidth.phonenumberlookup.models.OrderResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.util.ArrayList; - import java.util.List; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.PhoneNumberLookupApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .phoneNumberLookupBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - List numbers = new ArrayList<>(); - numbers.add("+15553334444"); + ApiClient defaultClient = Configuration.getDefaultApiClient(); - OrderRequest request = new OrderRequest(numbers); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + LookupRequest lookupRequest = new LookupRequest(); // LookupRequest | Phone number lookup request. try { - CompletableFuture> completableFuture = client.getPhoneNumberLookupClient().getAPIController().createLookupRequestAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + CreateLookupResponse result = apiInstance.createLookup(accountId, lookupRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PhoneNumberLookupApi#createLookup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -213,40 +211,28 @@ paths: print(e.response_code) - lang: Ruby source: > - require 'bandwidth' - - include Bandwidth - - include Bandwidth::Voice - - - BW_USERNAME = "api-username" - - BW_PASSWORD = "api-password" - - BW_ACCOUNT_ID = "12345" - + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - phone_number_lookup_basic_auth_user_name: BW_USERNAME, - phone_number_lookup_basic_auth_password: BW_PASSWORD - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - phone_number_lookup_client = - bandwidth_client.phone_number_lookup_client.client + api_instance = Bandwidth::PhoneNumberLookupApi.new - body = OrderRequest.new + account_id = '12345' - body.tns = ["+15554443333"] + lookup_request = Bandwidth::LookupRequest.new({ tns: + ['+15554443333'] }) begin - result = phone_number_lookup_client.create_lookup_request(BW_ACCOUNT_ID, body) - puts result.data.request_id - rescue APIException => e - puts e.response_code + result = api_instance.create_lookup(account_id, lookup_request) + p result.request_id + rescue Bandwidth::ApiError => e + p "Error when calling PhoneNumberLookupApi->create_lookup: #{e}" end /accounts/{accountId}/tnlookup/{requestId}: get: @@ -315,30 +301,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.phonenumberlookup.models.OrderStatus; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.PhoneNumberLookupApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .phoneNumberLookupBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + ApiClient defaultClient = Configuration.getDefaultApiClient(); - String requestId = "8a358296-e188-4a3a-b974-8e4d12001dd8"; + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String requestId = "004223a0-8b17-41b1-bf81-20732adf5590"; // String | The phone number lookup request ID from Bandwidth. try { - CompletableFuture> completableFuture = client.getPhoneNumberLookupClient().getAPIController().getLookupRequestStatusAsync(ACCOUNT_ID, requestId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + LookupStatus result = apiInstance.getLookupStatus(accountId, requestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PhoneNumberLookupApi#getLookupStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -415,39 +405,23 @@ paths: except APIException as e: print(e.response_code) - lang: Ruby - source: > - require 'bandwidth' - - include Bandwidth - - include Bandwidth::Voice - - - BW_USERNAME = "api-username" - - BW_PASSWORD = "api-password" - - BW_ACCOUNT_ID = "12345" - - - bandwidth_client = Bandwidth::Client.new( - phone_number_lookup_basic_auth_user_name: BW_USERNAME, - phone_number_lookup_basic_auth_password: BW_PASSWORD - ) - - - phone_number_lookup_client = - bandwidth_client.phone_number_lookup_client.client - + source: | + require 'bandwidth-sdk' - request_id = "1234-abcd" + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end + api_instance = Bandwidth::PhoneNumberLookupApi.new + account_id = '12345' + request_id = '004223a0-8b17-41b1-bf81-20732adf5590' begin - result = phone_number_lookup_client.get_lookup_request_status(BW_ACCOUNT_ID, request_id) - puts result.data.status - rescue APIException => e - puts e.response_code + result = api_instance.get_lookup_status(account_id, request_id) + p result.status + rescue Bandwidth::ApiError => e + p "Error when calling PhoneNumberLookupApi->get_lookup_status: #{e}" end components: schemas: diff --git a/site/specs/voice.yml b/site/specs/voice.yml index 7292ea8ff..1ebc18a31 100644 --- a/site/specs/voice.yml +++ b/site/specs/voice.yml @@ -145,41 +145,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.CreateCallRequest; - import com.bandwidth.voice.models.CreateCallResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.CallsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String voiceApplicationId = "1234-qwer"; - String to = "+15553334444"; - String from = "+15554443333"; - String baseUrl = "https://sample.com"; - String answerUrl = baseUrl.concat("/callbacks/answer"); - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - CreateCallRequest request = new CreateCallRequest(); - request.setApplicationId(voiceApplicationId); - request.setTo(to); - request.setFrom(from); - request.setAnswerUrl(answerUrl); + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + CallsApi apiInstance = new CallsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().createCallAsync(ACCOUNT_ID, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + CreateCallResponse result = apiInstance.createCall(accountId, createCall); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CallsApi#createCall"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -310,30 +304,76 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Voice + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" + api_instance = Bandwidth::CallsApi.new + account_id = '12345' + create_call = Bandwidth::CreateCall.new( + { + to: '+15553334444', + from: '+15554443333', + application_id: '1234-qwer', + answer_url: 'https://sample.com' + } ) - voice_client = bandwidth_client.voice_client.client - - body = CreateCallRequest.new - body.from = "+15554443333" - body.to = "+15553334444" - body.answer_url = "http://www.myapp.com/hello" - body.application_id = "7fc9698a-b04a-468b-9e8f-91238c0d0086" - begin - result = voice_client.create_call("12345", body) - puts result.data.call_id - rescue APIException => e - puts e.response_code + result = api_instance.create_call(account_id, create_call) + p result.call_id + rescue Bandwidth::ApiError => e + p "Error when calling CallsApi->create_call: #{e}" end + get: + tags: + - Calls + summary: Get Calls + description: >- + Returns a max of 10000 calls, sorted by `createdTime` from oldest to + newest. + + + **NOTE:** If the number of calls in the account is bigger than + `pageSize`, a `Link` header (with format `<{url}>; rel="next"`) will be + returned in the response. The url can be used to retrieve the next page + of call records. + + Also, call information is kept for 7 days after the calls are hung up. + If you attempt to retrieve information for a call that is older than 7 + days, you will get an empty array [] in response. + operationId: listCalls + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/to' + - $ref: '#/components/parameters/from' + - $ref: '#/components/parameters/minStartTimeCalls' + - $ref: '#/components/parameters/maxStartTimeCalls' + - $ref: '#/components/parameters/disconnectCause' + - $ref: '#/components/parameters/pageSizeCalls' + - $ref: '#/components/parameters/pageToken' + responses: + '200': + $ref: '#/components/responses/listCallsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' /accounts/{accountId}/calls/{callId}: get: tags: @@ -414,31 +454,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.CallState; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.CallsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + CallsApi apiInstance = new CallsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getCallAsync(ACCOUNT_ID, callId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + CallState result = apiInstance.getCallState(accountId, callId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CallsApi#getCallState"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -525,26 +568,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - - call_id = "c-1234" + api_instance = Bandwidth::CallsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - #result = voice_client.get_call("12345", call_id) - #puts result.data.state - puts "Method broke" - rescue APIException => e - puts e.response_code + result = api_instance.get_call_state(account_id, call_id) + p result.state + rescue Bandwidth::ApiError => e + p "Error when calling CallsApi->get_call_state: #{e}" end post: tags: @@ -642,34 +681,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.ModifyCallRequest; - import com.bandwidth.voice.models.StateEnum; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.CallsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - ModifyCallRequest request = new ModifyCallRequest(); - request.setState(StateEnum.COMPLETED); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + CallsApi apiInstance = new CallsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + UpdateCall updateCall = new UpdateCall(); // UpdateCall | JSON object containing information to redirect an existing call to a new BXML document try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().modifyCallAsync(ACCOUNT_ID, callId, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.updateCall(accountId, callId, updateCall); + } catch (ApiException e) { + System.err.println("Exception when calling CallsApi#updateCall"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -780,28 +819,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client - - body = ModifyCallRequest.new - body.redirect_url = "http://www.myapp.com/new" - body.state = "active" + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" + api_instance = Bandwidth::CallsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + update_call = Bandwidth::UpdateCall.new begin - voice_client.modify_call("12345", call_id, body) - rescue APIException => e - puts e.response_code + api_instance.update_call(account_id, call_id, update_call) + rescue Bandwidth::ApiError => e + p "Error when calling CallsApi->update_call: #{e}" end /accounts/{accountId}/calls/{callId}/bxml: put: @@ -836,6 +869,62 @@ paths: $ref: '#/components/responses/voiceTooManyRequestsError' '500': $ref: '#/components/responses/voiceInternalServerError' + x-codeSamples: + - lang: Java + source: | + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.CallsApi; + + public class Sample { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + CallsApi apiInstance = new CallsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String body = "This is a test sentence. "; // String | + try { + apiInstance.updateCallBxml(accountId, callId, body); + } catch (ApiException e) { + System.err.println("Exception when calling CallsApi#updateCallBxml"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + source: | + require 'bandwidth-sdk' + + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end + + api_instance = Bandwidth::CallsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + body = ' + + This is a test sentence. + ' + + begin + api_instance.update_call_bxml(account_id, call_id, body) + rescue Bandwidth::ApiError => e + p "Error when calling CallsApi->update_call_bxml: #{e}" + end /accounts/{accountId}/conferences: get: tags: @@ -916,29 +1005,40 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.ConferenceState; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; import java.util.List; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String name = "my-custom-name"; // String | Filter results by the `name` field. + String minCreatedTime = "2022-06-21T19:13:21Z"; // String | Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). + String maxCreatedTime = "2022-06-21T19:13:21Z"; // String | Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). + Integer pageSize = 1000; // Integer | Specifies the max number of conferences that will be returned. + String pageToken = "pageToken_example"; // String | Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. try { - CompletableFuture>> completableFuture = client.getVoiceClient().getAPIController().getConferencesAsync(ACCOUNT_ID, null, null, null, null, null); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + List result = apiInstance.listConferences(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#listConferences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1022,25 +1122,25 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + opts = { + min_created_time: '2022-06-21T19:13:21Z', + page_size: 500 + } begin - response = voice_client.get_conferences("12345") - if response.data.length > 0 - puts response.data[0].id - end - rescue APIException => e - puts e.response_code + result = api_instance.list_conferences(account_id, opts) + p result[0].id if result.length.positive? + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->list_conferences: #{e}" end /accounts/{accountId}/conferences/{conferenceId}: get: @@ -1113,31 +1213,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.ConferenceState; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Conference id is returned after successfully creating a conference. - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getConferenceAsync(ACCOUNT_ID, conferenceId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + Conference result = apiInstance.getConference(accountId, conferenceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#getConference"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1234,25 +1337,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - - conference_id = "conf-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' begin - response = voice_client.get_conference("12345", conference_id) - print(response.data.name) - rescue APIException => e - puts e.response_code + result = api_instance.get_conference(account_id, conference_id) + p result.name + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->get_conference: #{e}" end post: tags: @@ -1343,33 +1443,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.*; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - ModifyConferenceRequest request = new ModifyConferenceRequest(); - request.setStatus(StatusEnum.COMPLETED); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + UpdateConference updateConference = new UpdateConference(); // UpdateConference | try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().modifyConferenceAsync(ACCOUNT_ID, conferenceId, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.updateConference(accountId, conferenceId, updateConference); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#updateConference"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1489,27 +1591,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + require 'bandwidth-sdk' - body = ModifyConferenceRequest.new - body.status = StatusEnum::ACTIVE + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - conference_id = "conf-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + update_conference = Bandwidth::UpdateConference.new begin - voice_client.modify_conference("12345", conference_id, body) - rescue APIException => e - puts e.response_code + api_instance.update_conference(account_id, conference_id, update_conference) + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->update_conference: #{e}" end /accounts/{accountId}/conferences/{conferenceId}/bxml: put: @@ -1542,6 +1639,62 @@ paths: $ref: '#/components/responses/voiceTooManyRequestsError' '500': $ref: '#/components/responses/voiceInternalServerError' + x-codeSamples: + - lang: Java + source: | + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; + + public class Sample { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String body = ""; // String | + try { + apiInstance.updateConferenceBxml(accountId, conferenceId, body); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#updateConferenceBxml"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - lang: Ruby + source: | + require 'bandwidth-sdk' + + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end + + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + body = ' + + + ' + + begin + api_instance.update_conference_bxml(account_id, conference_id, body) + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->update_conference_bxml: #{e}" + end /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}: get: tags: @@ -1615,31 +1768,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.ConferenceMemberState; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; - String memberId = "c-95ac8d8d-b81437f5-4586-4d5b-9b46-29f8b3fe0aaf"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getConferenceMemberAsync(ACCOUNT_ID, conferenceId, memberId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + ConferenceMember result = apiInstance.getConferenceMember(accountId, conferenceId, memberId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#getConferenceMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -1740,26 +1897,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - conference_id = "conf-1234" - member_id = "m-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + member_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - response = voice_client.get_conference_member("12345", conference_id, member_id) - puts response.data.member_url - rescue APIException => e - puts e.response_code + result = api_instance.get_conference_member(account_id, conference_id, member_id) + p result.member_url + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->get_conference_member: #{e}" end put: tags: @@ -1852,34 +2006,36 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.*; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - ConferenceMemberState conferenceMemberState = new ConferenceMemberState(); - conferenceMemberState.setMute(true); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String memberId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Conference Member ID. + UpdateConferenceMember updateConferenceMember = new UpdateConferenceMember(); // UpdateConferenceMember | try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().modifyConferenceMemberAsync(ACCOUNT_ID, conferenceId, callId, conferenceMemberState); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.updateConferenceMember(accountId, conferenceId, memberId, updateConferenceMember); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#updateConferenceMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -2002,28 +2158,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + require 'bandwidth-sdk' - body = ConferenceMemberState.new - body.mute = true + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - conference_id = "conf-1234" - call_id = "c-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + member_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + update_conference_member = Bandwidth::UpdateConferenceMember.new begin - voice_client.modify_conference_member("12345", conference_id, call_id, body) - rescue APIException => e - puts e.response_code + api_instance.update_conference_member(account_id, conference_id, member_id, update_conference_member) + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->update_conference_member: #{e}" end /accounts/{accountId}/conferences/{conferenceId}/recordings: get: @@ -2098,31 +2249,37 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.ConferenceRecordingMetadata; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; import java.util.List; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture>> completableFuture = client.getVoiceClient().getAPIController().getConferenceRecordingsAsync(ACCOUNT_ID, conferenceId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + ConferenceRecordingMetadata result = apiInstance.getConferenceRecording(accountId, conferenceId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#getConferenceRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -2222,27 +2379,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - conference_id = "conf-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' begin - response = voice_client.get_conference_recordings("12345", conference_id) - if response.data.length > 0 - puts response.body[0].name - end - rescue APIException => e - puts e.response_code + result = api_instance.list_conference_recordings(account_id, conference_id) + p result[0].name if result.length.positive? + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->list_conference_recordings: #{e}" end /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}: get: @@ -2317,31 +2469,36 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.CallRecordingMetadata; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getConferenceRecordingAsync(ACCOUNT_ID, conferenceId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + ConferenceRecordingMetadata result = apiInstance.getConferenceRecording(accountId, conferenceId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#getConferenceRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -2442,26 +2599,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - - conference_id = "conf-1234" - recording_id = "r-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - response = voice_client.get_conference_recording("12345", conference_id, recording_id) - puts response.body.application_id - rescue APIException => e - puts e.response_code + result = api_instance.get_conference_recording(account_id, conference_id, recording_id) + p result.application_id + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->get_conference_recording: #{e}" end /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media: get: @@ -2537,33 +2691,37 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.DynamicResponse; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.ConferencesApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import java.io.File; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Conference id is returned after successfully creating a conference. - String conferenceId = "conf-95ac8d8d-28e06798-2afe-434c-b0f4-666a79cd47f8"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getDownloadConferenceRecordingAsync(ACCOUNT_ID, conferenceId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + File result = apiInstance.downloadConferenceRecording(accountId, conferenceId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConferencesApi#downloadConferenceRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -2659,30 +2817,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Voice - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: BW_USERNAME, - voice_basic_auth_password: BW_PASSWORD - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - conference_id = "conf-1234" - recording_id = "r-1234" + api_instance = Bandwidth::ConferencesApi.new + account_id = '12345' + conference_id = 'conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - result = voice_client.get_download_conference_recording(BW_ACCOUNT_ID, conference_id, recording_id) - downloaded_recording = result.data - rescue APIException => e - puts e.response_code + result = api_instance.download_conference_recording(account_id, conference_id, recording_id) + p result + rescue Bandwidth::ApiError => e + p "Error when calling ConferencesApi->download_conference_recording: #{e}" end /accounts/{accountId}/recordings: get: @@ -2764,29 +2915,40 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.*; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; import java.util.List; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String to = "%2b19195551234"; // String | Filter results by the `to` field. + String from = "%2b19195554321"; // String | Filter results by the `from` field. + String minStartTime = "2022-06-21T19:13:21Z"; // String | Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). + String maxStartTime = "2022-06-21T19:13:21Z"; // String | Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). try { - CompletableFuture>> completableFuture = client.getVoiceClient().getAPIController().getQueryCallRecordingsAsync(ACCOUNT_ID, null, null, null, null); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + List result = apiInstance.listAccountCallRecordings(accountId, to, from, minStartTime, maxStartTime); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#listAccountCallRecordings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -2870,25 +3032,25 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Voice - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + opts = { + to: '%2b19195551234', + from: '%2b19195554321' + } begin - result = voice_client.get_query_call_recordings("12345") - if result.data.length > 0 - puts result.data[0].recording_id - end - rescue APIException => e - puts e.response_code + result = api_instance.list_account_call_recordings(account_id, opts) + p result[0].recording_id if result.length.positive? + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->list_account_call_recordings: #{e}" end /accounts/{accountId}/calls/{callId}/recording: put: @@ -2973,33 +3135,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.*; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - ModifyCallRecordingRequest recordingRequest = new ModifyCallRecordingRequest(); - recordingRequest.setState(State1Enum.PAUSED); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + UpdateCallRecording updateCallRecording = new UpdateCallRecording(); // UpdateCallRecording | try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().modifyCallRecordingStateAsync(ACCOUNT_ID, callId, recordingRequest); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.updateCallRecordingState(accountId, callId, updateCallRecording); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#updateCallRecordingState"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -3106,28 +3270,30 @@ paths: except APIException as e: print(e.response_code) - lang: Ruby - source: | - require 'bandwidth' + source: > + require 'bandwidth-sdk' - include Bandwidth - include Bandwidth::Voice - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - body = ModifyCallRecordingRequest.new - body.state = "paused" + api_instance = Bandwidth::RecordingsApi.new + + account_id = '12345' + + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + + update_call_recording = Bandwidth::UpdateCallRecording.new({ state: + Bandwidth::RecordingStateEnum::PAUSED }) - call_id = "c-1234" begin - voice_client.modify_call_recording_state("12345", call_id, body) - rescue APIException => e - puts e.response_code + api_instance.update_call_recording_state(account_id, call_id, update_call_recording) + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->update_call_recording_state: #{e}" end /accounts/{accountId}/calls/{callId}/recordings: get: @@ -3203,32 +3369,37 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.CallRecordingMetadata; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; import java.util.List; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. try { - CompletableFuture>> completableFuture = client.getVoiceClient().getAPIController().getCallRecordingsAsync(ACCOUNT_ID, callId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + List result = apiInstance.listCallRecordings(accountId, callId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#listCallRecordings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -3319,27 +3490,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - response = voice_client.get_call_recordings("12345", call_id) - if response.data.length > 0 - puts response.data[0].media_url - end - rescue APIException => e - puts e.response_code + result = api_instance.list_call_recordings(account_id, call_id) + p result[0].media_url if result.length.positive? + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->list_call_recordings: #{e}" end /accounts/{accountId}/calls/{callId}/recordings/{recordingId}: get: @@ -3416,33 +3582,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.CallRecordingMetadata; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getCallRecordingAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + CallRecordingMetadata result = apiInstance.getCallRecording(accountId, callId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#getCallRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -3532,26 +3700,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - response = voice_client.get_call_recording("12345", call_id, recording_id) - puts response.data.application_id - rescue APIException => e - puts e.response_code + result = api_instance.get_call_recording(account_id, call_id, recording_id) + p result.application_id + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->get_call_recording: #{e}" end delete: tags: @@ -3635,32 +3800,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().deleteRecordingAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.deleteRecording(accountId, callId, recordingId); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#deleteRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -3749,25 +3916,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - voice_client.delete_recording("12345", call_id, recording_id) - rescue APIException => e - puts e.response_code + api_instance.delete_recording(account_id, call_id, recording_id) + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->delete_recording: #{e}" end /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media: get: @@ -3844,33 +4008,38 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.DynamicResponse; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import java.io.File; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getDownloadCallRecordingAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + File result = apiInstance.downloadCallRecording(accountId, callId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#downloadCallRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -3956,30 +4125,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: BW_USERNAME, - voice_basic_auth_password: BW_PASSWORD - ) + require 'bandwidth-sdk' - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - result = voice_client.get_download_call_recording(BW_ACCOUNT_ID, call_id, recording_id) - downloaded_recording = result.data - rescue APIException => e - puts e.response_code + result = api_instance.download_call_recording(account_id, call_id, recording_id) + p result + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->download_call_recording: #{e}" end delete: tags: @@ -4055,32 +4217,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().deleteRecordingMediaAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.deleteRecordingMedia(accountId, callId, recordingId); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#deleteRecordingMedia"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -4169,25 +4333,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + require 'bandwidth-sdk' - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - voice_client.delete_recording_media("12345", call_id, recording_id) - rescue APIException => e - print(e.response_code) + api_instance.delete_recording_media(account_id, call_id, recording_id) + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->delete_recording_media: #{e}" end /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription: get: @@ -4278,33 +4439,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.TranscriptionResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().getCallTranscriptionAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + TranscriptionList result = apiInstance.getCallTranscription(accountId, callId, recordingId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#getCallTranscription"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -4394,26 +4557,23 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - response = voice_client.get_call_transcription("12345", call_id, recording_id) - puts response.data.transcripts - rescue APIException => e - puts e.response_code + result = api_instance.get_call_transcription(account_id, call_id, recording_id) + p result.transcripts + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->get_call_transcription: #{e}" end post: tags: @@ -4514,34 +4674,35 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.voice.models.*; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; - - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - TranscribeRecordingRequest request = new TranscribeRecordingRequest(); - request.setCallbackUrl("https://sample.com/callbacks/transcribe"); - + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. + TranscribeRecording transcribeRecording = new TranscribeRecording(); // TranscribeRecording | try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().createTranscribeCallRecordingAsync(ACCOUNT_ID, callId, recordingId, request); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.transcribeCallRecording(accountId, callId, recordingId, transcribeRecording); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#transcribeCallRecording"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -4651,31 +4812,25 @@ paths: except APIException as e: print(e.response_code) - lang: Ruby - source: |+ - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice - - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) - - voice_client = bandwidth_client.voice_client.client + source: | + require 'bandwidth-sdk' - call_id = "c-1234" - recording_id = "r-1234" + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - body = TranscribeRecordingRequest.new - body.callback_url = "https://callback-url.com" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + transcribe_recording = Bandwidth::TranscribeRecording.new begin - voice_client.create_transcribe_call_recording("12345", call_id, recording_id, body) - rescue APIException => e - puts e.response_code + api_instance.transcribe_call_recording(account_id, call_id, recording_id, transcribe_recording) + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->transcribe_call_recording: #{e}" end - delete: tags: - Recordings @@ -4757,32 +4912,34 @@ paths: } - lang: Java source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; + import com.bandwidth.sdk.ApiClient; + import com.bandwidth.sdk.ApiException; + import com.bandwidth.sdk.Configuration; + import com.bandwidth.sdk.auth.*; + import com.bandwidth.sdk.model.*; + import com.bandwidth.sdk.api.RecordingsApi; public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - public static void main(String[] args) { - // Call id is returned after successfully creating a call. - String callId = "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"; - // Recording id is returned after retrieving a recording from the call. - String recordingId = "r-d68201ef-d53e-4c6d-a743-1c1283909d41"; + ApiClient defaultClient = Configuration.getDefaultApiClient(); - BandwidthClient client = new BandwidthClient.Builder() - .voiceBasicAuthCredentials(USERNAME, PASSWORD) - .build(); + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + Basic.setUsername("YOUR USERNAME"); + Basic.setPassword("YOUR PASSWORD"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); + String accountId = "9900000"; // String | Your Bandwidth Account ID. + String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. + String recordingId = "r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Recording ID. try { - CompletableFuture> completableFuture = client.getVoiceClient().getAPIController().deleteCallTranscriptionAsync(ACCOUNT_ID, callId, recordingId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); + apiInstance.deleteCallTranscription(accountId, callId, recordingId); + } catch (ApiException e) { + System.err.println("Exception when calling RecordingsApi#deleteCallTranscription"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); } } } @@ -4870,25 +5027,22 @@ paths: print(e.response_code) - lang: Ruby source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::Voice + require 'bandwidth-sdk' - bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" - ) + Bandwidth.configure do |config| + config.username = 'api-username' + config.password = 'api-password' + end - voice_client = bandwidth_client.voice_client.client - - call_id = "c-1234" - recording_id = "r-1234" + api_instance = Bandwidth::RecordingsApi.new + account_id = '12345' + call_id = 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' + recording_id = 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85' begin - voice_client.delete_call_transcription("12345", call_id, recording_id) - rescue APIException => e - puts e.response_code + api_instance.delete_call_transcription(account_id, call_id, recording_id) + rescue Bandwidth::ApiError => e + p "Error when calling RecordingsApi->delete_call_transcription: #{e}" end /accounts/{accountId}/statistics: get: @@ -7297,6 +7451,38 @@ components: default: 1000 description: Specifies the max number of conferences that will be returned. example: 500 + minStartTimeCalls: + name: minStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to calls which have a `startTime` after or including + `minStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + maxStartTimeCalls: + name: maxStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to calls which have a `startTime` before or including + `maxStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + pageSizeCalls: + name: pageSize + in: query + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 10000 + default: 1000 + description: Specifies the max number of calls that will be returned. + example: 500 pageToken: name: pageToken in: query @@ -7307,6 +7493,14 @@ components: Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. + disconnectCause: + name: disconnectCause + in: query + required: false + schema: + type: string + description: Filter results to calls with specified call Disconnect Cause. + example: hangup requestBodies: createCallRequest: description: JSON object containing information to create an outbound call @@ -7406,6 +7600,14 @@ components: application/json: schema: $ref: '#/components/schemas/callState' + listCallsResponse: + description: Calls retrieved successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/callState' getStatisticsResponse: description: Statistics Found content: diff --git a/site/specs/webrtc.yml b/site/specs/webrtc.yml index 9be38445f..a18eb766c 100644 --- a/site/specs/webrtc.yml +++ b/site/specs/webrtc.yml @@ -39,175 +39,6 @@ paths: $ref: '#/components/responses/webrtcForbiddenError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/participants' \ - -X POST \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ - -H 'Content-Type: application/json' \ - -d '{ - "callbackUrl": "https://example.com/callback", - "publishPermissions": [ - "VIDEO", - "AUDIO" - ], - "tag": "participant1", - "deviceApiVersion": "V3" - }' - - lang: C# - source: "\uFEFFusing System;\nusing System.Collections.Generic;\nusing System.Threading.Tasks;\nusing Bandwidth.Standard;\nusing Bandwidth.Standard.Exceptions;\nusing Bandwidth.Standard.WebRtc.Models;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n var username = \"api-username\";\n var password = \"api-pasword\";\n var accountId = \"12345\";\n\n var client = new BandwidthClient.Builder()\n .WebRtcBasicAuthCredentials(username, password)\n .Build();\n\n var participant = new Participant()\n {\n PublishPermissions = new List() { PublishPermissionEnum.AUDIO, PublishPermissionEnum.VIDEO }\n };\n\n try\n {\n var response = await client.WebRtc.APIController.CreateParticipantAsync(accountId, participant);\n Console.WriteLine(response.Data);\n }\n catch (ApiException e)\n {\n Console.WriteLine(e.Message);\n }\n }\n}\n" - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.AccountsParticipantsResponse; - import com.bandwidth.webrtc.models.Participant; - import com.bandwidth.webrtc.models.PublishPermissionEnum; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.util.Arrays; - import java.util.List; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - Participant participant = new Participant(); - List publishPermissions = Arrays.asList(PublishPermissionEnum.AUDIO, PublishPermissionEnum.VIDEO); - participant.setPublishPermissions(publishPermissions); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().createParticipantAsync(ACCOUNT_ID, participant); - } catch (Exception ex) { - System.out.println(ex.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - - const createParticipant = async function() { - try { - const response = await controller.createParticipant(accountId, { - callbackUrl: "http://www.myapp.com/new", - publishPermissions: ["AUDIO"] - }) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - createParticipant(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $body = new BandwidthLib\WebRtc\Models\Participant(); - $body->publishPermissions = array("AUDIO", "VIDEO"); - $body->deviceApiVersion = "V3"; - - try { - $response = $webRtcClient->createParticipant($BW_ACCOUNT_ID, $body); - print_r($response->getResult()->participant->id); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - from bandwidth.webrtc.models.participant import Participant - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Participant() - body.publish_permissions = ["AUDIO", "VIDEO"] - body.device_api_version = "V3" - - try: - response = web_rtc_client.create_participant(BW_ACCOUNT_ID, body) - print(response.body.participant.id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Participant.new - body.publish_permissions = ["AUDIO", "VIDEO"] - body.device_api_version = "V3" - - begin - response = web_rtc_client.create_participant(BW_ACCOUNT_ID, :body => body) - puts response.data.participant.id - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/participants/{participantId}: get: tags: @@ -231,182 +62,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/participants/320e2af6-13ec-498d-8b51-daba52c37853' - \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: |- - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var participantId = "320e2af6-13ec-498d-8b51-daba52c37853"; - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - var response = await client.WebRtc.APIController.GetParticipantAsync(accountId, participantId); - Console.WriteLine(response.Data); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Participant; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().getParticipantAsync(ACCOUNT_ID, participantId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - - const getParticipant = async function() { - try { - const response = await controller.getParticipant(accountId, participantId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - getParticipant(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $participantId = "1234-qwer"; - - try { - $response = $webRtcClient->getParticipant($BW_ACCOUNT_ID, $participantId); - print_r($response->getResult()->id); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - - try: - response = web_rtc_client.get_participant(BW_ACCOUNT_ID, participant_id) - print(response.body.id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - - begin - response = web_rtc_client.get_participant(BW_ACCOUNT_ID, participant_id) - puts response.data.id - rescue APIException => e - puts e.response_code - end delete: tags: - Participants @@ -429,177 +84,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/participants/320e2af6-13ec-498d-8b51-daba52c37853' - \ - -X DELETE \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var participantId = "320e2af6-13ec-498d-8b51-daba52c37853"; - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - await client.WebRtc.APIController.DeleteParticipantAsync(accountId, participantId); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().deleteParticipantAsync(ACCOUNT_ID, participantId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - - const deleteParticipant = async function() { - try { - const response = await controller.deleteParticipant(accountId, participantId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - deleteParticipant(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $participantId = "1234-abcd"; - - try { - $webRtcClient->deleteParticipant($BW_ACCOUNT_ID, $participantId); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - - try: - web_rtc_client.delete_participant(BW_ACCOUNT_ID, participant_id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - - begin - web_rtc_client.delete_participant(BW_ACCOUNT_ID, participant_id) - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/sessions: post: tags: @@ -624,193 +108,6 @@ paths: $ref: '#/components/responses/webrtcForbiddenError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: | - curl 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions' \ - -X POST \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ - -H 'Content-Type: application/json' \ - -d '{ - "tag": "session1" - }' - - lang: C# - source: |- - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - var session = new Session() - { - Tag = "new-session" - }; - - try - { - var response = await client.WebRtc.APIController.CreateSessionAsync(accountId, session); - Console.WriteLine(response.Data); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - import com.bandwidth.*; - import com.bandwidth.webrtc.models.*; - import com.bandwidth.http.response.ApiResponse; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - Session session = new Session(); - session.setTag("new-session"); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().createSessionAsync(ACCOUNT_ID, session); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - - const createSession = async function() { - try { - const response = await controller.createSession(accountId, { - tag: '{"SessionName": "my_session"}' - }) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - createSession(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $body = new BandwidthLib\WebRtc\Models\Session(); - $body->tag = "tag"; - - try { - $response = $webRtcClient->createSession($BW_ACCOUNT_ID, $body); - print_r($response->getResult()->id); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - from bandwidth.webrtc.models.session import Session - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Session() - body.tag = "tag" - - try: - response = web_rtc_client.create_session(BW_ACCOUNT_ID, body) - print(response.body.id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Session.new - body.tag = "tag" - - begin - response = web_rtc_client.create_session(BW_ACCOUNT_ID, :body => body) - puts response.data.id - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/sessions/{sessionId}: get: tags: @@ -834,182 +131,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5' - \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - var response = await client.WebRtc.APIController.GetSessionAsync(accountId, sessionId); - Console.WriteLine(response.Data); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Session; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().getSessionAsync(ACCOUNT_ID, sessionId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - - const getSession = async function() { - try { - const response = await controller.getSession(accountId, sessionId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - getSession(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $sessionId = "1234-qwer"; - - try { - $response = $webRtcClient->getSession($BW_ACCOUNT_ID, $sessionId); - print_r($response->getResult()->id); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - try: - response = web_rtc_client.get_session(BW_ACCOUNT_ID, session_id) - print(response.body.id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - begin - response = web_rtc_client.get_session(BW_ACCOUNT_ID, session_id) - print(response.data.id) - rescue APIException => e - print(e.response_code) - end delete: tags: - Sessions @@ -1032,178 +153,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5' - \ - -X DELETE \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - await client.WebRtc.APIController.DeleteSessionAsync(accountId, sessionId); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().deleteSessionAsync(ACCOUNT_ID, sessionId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - - const deleteSession = async function() { - try { - const response = await controller.deleteSession(accountId, sessionId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - deleteSession(); - - lang: PHP - source: |+ - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $sessionId = "1234-qwer"; - - try { - $webRtcClient->deleteSession($BW_ACCOUNT_ID, $sessionId); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - try: - web_rtc_client.delete_session(BW_ACCOUNT_ID, session_id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - begin - web_rtc_client.delete_session(BW_ACCOUNT_ID, session_id) - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/sessions/{sessionId}/participants: get: tags: @@ -1229,183 +178,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5/participants' - \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - var response = await client.WebRtc.APIController.ListSessionParticipantsAsync(accountId, sessionId); - Console.WriteLine(response.Data); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Participant; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - import java.util.List; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - try { - CompletableFuture>> completableFuture = client.getWebRtcClient().getAPIController().listSessionParticipantsAsync(ACCOUNT_ID, sessionId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - - const listSessionParticipants = async function() { - try { - const response = await controller.listSessionParticipants(accountId, sessionId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - listSessionParticipants(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $sessionId = "1234-qwer"; - - try { - $response = $webRtcClient->listSessionParticipants($BW_ACCOUNT_ID, $sessionId); - print_r($response->getResult()); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - try: - response = web_rtc_client.list_session_participants(BW_ACCOUNT_ID, session_id) - print(response.body) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - - begin - response = web_rtc_client.list_session_participants(BW_ACCOUNT_ID, session_id) - puts response.end - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}: put: tags: @@ -1437,219 +209,6 @@ paths: $ref: '#/components/responses/webrtcConflictError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5/participants/568749d5-04d5-483d-adf5-deac7dd3d521' - \ - -X PUT \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ - -H 'Content-Type: application/json' \ - -d '{ - "sessionId": "d8886aad-b956-4e1b-b2f4-d7c9f8162772", - "participants": [ - { - "participantId": "568749d5-04d5-483d-adf5-deac7dd3d521" - }, - { - "participantId": "0275e47f-dd21-4cf0-a1e1-dfdc719e73a7" - } - ] - }' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using System.Collections.Generic; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - var participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; // Returned via WebRTC's create participant request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - var subscriptions = new Subscriptions() - { - SessionId = sessionId - }; - - try - { - await client.WebRtc.APIController.AddParticipantToSessionAsync(accountId, sessionId, participantId, subscriptions); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Subscriptions; - import com.bandwidth.webrtc.models.ParticipantSubscription; - - import java.util.ArrayList; - import java.util.List; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; // Returned via WebRTC's create participant request. - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - Subscriptions subscriptions = new Subscriptions(); - subscriptions.setSessionId(sessionId); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().addParticipantToSessionAsync(ACCOUNT_ID, sessionId, participantId, subscriptions); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - const subscriptions = { - sessionId: sessionId - }; - - const addParticipantToSession = async function() { - try { - const response = await controller.addParticipantToSession(accountId, sessionId, participantId, subscriptions) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - addParticipantToSession(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $sessionId = "1234-abcd"; - $participantId = "4321-dcba"; - - $body = new BandwidthLib\WebRtc\Models\Subscriptions(); - $body->sessionId = $sessionId; - - try { - $webRtcClient->addParticipantToSession($BW_ACCOUNT_ID, $sessionId, $participantId, $body); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - participant_id = "4321-dcba" - subscriptions = {'sessionId': session_id} - - try: - web_rtc_client.add_participant_to_session(BW_ACCOUNT_ID, session_id, participant_id, subscriptions) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - participant_id = "4321-dcba" - - body = Subscriptions.new - body.session_id = session_id - - begin - web_rtc_client.add_participant_to_session(BW_ACCOUNT_ID, session_id, participant_id, body: body) - rescue APIException => e - puts e.response_code - end delete: tags: - Sessions @@ -1675,184 +234,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5/participants/568749d5-04d5-483d-adf5-deac7dd3d521' - \ - -X DELETE \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: |- - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - var participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; // Returned via WebRTC's create participant request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - await client.WebRtc.APIController.RemoveParticipantFromSessionAsync(accountId, sessionId, participantId); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().removeParticipantFromSessionAsync(ACCOUNT_ID, sessionId, participantId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - - const removeParticipantFromSession = async function() { - try { - const response = await controller.removeParticipantFromSession(accountId, sessionId, participantId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - removeParticipantFromSession(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $sessionId = "1234-abcd"; - $participantId = "4321-dcba"; - - try { - $webRtcClient->removeParticipantFromSession($BW_ACCOUNT_ID, $sessionId, $participantId); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - participant_id = "4312-dbca" - - try: - web_rtc_client.remove_participant_from_session(BW_ACCOUNT_ID, session_id, participant_id) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - session_id = "1234-abcd" - participant_id = "4312-dbca" - - begin - web_rtc_client.remove_participant_from_session(BW_ACCOUNT_ID, session_id, participant_id) - rescue APIException => e - puts e.response_code - end /accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions: get: tags: @@ -1879,188 +260,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5/participants/568749d5-04d5-483d-adf5-deac7dd3d521/subscriptions' - \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - var participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; // Returned via WebRTC's create participant request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - try - { - var response = await client.WebRtc.APIController.GetParticipantSubscriptionsAsync(accountId, sessionId, participantId); - Console.WriteLine(response.Data); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Subscriptions; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().getParticipantSubscriptionsAsync(ACCOUNT_ID, sessionId, participantId); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - - const getParticipantSubscriptions = async function() { - try { - const response = await controller.getParticipantSubscriptions(accountId, sessionId, participantId) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - getParticipantSubscriptions(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $participantId = "1234-abcd"; - $sessionId = "4321-dcba"; - - try { - $response = $webRtcClient->getParticipantSubscriptions($BW_ACCOUNT_ID, $sessionId, $participantId); - print_r($response->getResult()); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - session_id = "4321-dcba" - - try: - response = web_rtc_client.get_participant_subscriptions(BW_ACCOUNT_ID, session_id, participant_id) - print(response.body) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: | - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - participant_id = "1234-abcd" - session_id = "4321-dcba" - - begin - response = web_rtc_client.get_participant_subscriptions(BW_ACCOUNT_ID, session_id, participant_id) - puts response.data - rescue APIException => e - puts e.response_code - end put: tags: - Sessions @@ -2096,224 +295,6 @@ paths: $ref: '#/components/responses/webrtcNotFoundError' '500': $ref: '#/components/responses/webrtcInternalServerError' - x-codeSamples: - - lang: cURL - source: > - curl - 'https://api.webrtc.bandwidth.com/v1/accounts/12345/sessions/75c21163-e110-41bc-bd76-1bb428ec85d5/participants/568749d5-04d5-483d-adf5-deac7dd3d521/subscriptions' - \ - -X PUT \ - -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ - -H 'Content-Type: application/json' \ - -d '{ - "sessionId": "d8886aad-b956-4e1b-b2f4-d7c9f8162772", - "participants": [ - { - "participantId": "568749d5-04d5-483d-adf5-deac7dd3d521" - }, - { - "participantId": "0275e47f-dd21-4cf0-a1e1-dfdc719e73a7" - } - ] - }' - - lang: C# - source: | - using System; - using System.Threading.Tasks; - using Bandwidth.Standard; - using Bandwidth.Standard.Exceptions; - using Bandwidth.Standard.WebRtc.Models; - - class Program - { - static async Task Main(string[] args) - { - var username = "api-username"; - var password = "api-pasword"; - var accountId = "12345"; - - var sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; // Returned via WebRTC's create session request. - var participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; // Returned via WebRTC's create participant request. - - var client = new BandwidthClient.Builder() - .WebRtcBasicAuthCredentials(username, password) - .Build(); - - var subscriptions = new Subscriptions() - { - SessionId = sessionId - }; - - try - { - await client.WebRtc.APIController.UpdateParticipantSubscriptionsAsync(accountId, sessionId, participantId, subscriptions); - } - catch (ApiException e) - { - Console.WriteLine(e.Message); - } - } - } - - lang: Java - source: | - import com.bandwidth.BandwidthClient; - import com.bandwidth.http.response.ApiResponse; - import com.bandwidth.webrtc.models.Subscriptions; - - import java.util.concurrent.CompletableFuture; - import java.util.concurrent.ExecutionException; - - public class Sample { - public static final String USERNAME = "api-username"; - public static final String PASSWORD = "api-password"; - public static final String ACCOUNT_ID = "12345"; - - public static void main(String[] args) { - String sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5"; - String participantId = "568749d5-04d5-483d-adf5-deac7dd3d521"; - - BandwidthClient client = new BandwidthClient.Builder() - .webRtcBasicAuthCredentials(USERNAME, PASSWORD) - .build(); - - Subscriptions subscriptions = new Subscriptions(); - subscriptions.setSessionId(sessionId); - - try { - CompletableFuture> completableFuture = client.getWebRtcClient().getAPIController().updateParticipantSubscriptionsAsync(ACCOUNT_ID, sessionId, participantId, subscriptions); - System.out.println(completableFuture.get().getResult()); - } catch (InterruptedException | ExecutionException e) { - System.out.println(e.getMessage()); - } - } - } - - lang: Node.js - source: | - import { Client, ApiController } from '@bandwidth/webrtc'; - - const BW_USERNAME = "api-username"; - const BW_PASSWORD = "api-password"; - const BW_ACCOUNT_ID = "12345"; - - const client = new Client({ - basicAuthUserName: BW_USERNAME, - basicAuthPassword: BW_PASSWORD - }); - - const controller = new ApiController(client); - - const accountId = BW_ACCOUNT_ID; - const sessionId = "75c21163-e110-41bc-bd76-1bb428ec85d5" - const participantId = "320e2af6-13ec-498d-8b51-daba52c37853" - const body = { "sessionId": "75c21163-e110-41bc-bd76-1bb428ec85d5", - "participants": [{ - "participantId": "568749d5-04d5-483d-adf5-deac7dd3d521" - }, { - "participantId": "0275e47f-dd21-4cf0-a1e1-dfdc719e73a7" - }] - } - - const updateParticipantSubscriptions = async function() { - try { - const response = await controller.updateParticipantSubscriptions(accountId, sessionId, participantId, body) - console.log(response.body); - } catch(error) { - console.error(error); - } - } - - updateParticipantSubscriptions(); - - lang: PHP - source: | - $BW_USERNAME, - 'webRtcBasicAuthPassword' => $BW_PASSWORD, - ) - ); - $client = new BandwidthLib\BandwidthClient($config); - - $webRtcClient = $client->getWebRtc()->getClient(); - - $body = new BandwidthLib\WebRtc\Models\Subscriptions(); - $body->sessionId = "1234-abcd"; - - $sessionId = "1234-abcd"; - $participantId = "4321-dcba"; - - try { - $webRtcClient->updateParticipantSubscriptions($BW_ACCOUNT_ID, $sessionId, $participantId, $body); - } catch (BandwidthLib\APIException $e) { - print_r($e->getResponseCode()); - } - - lang: Python - source: | - from bandwidth.bandwidth_client import BandwidthClient - from bandwidth.exceptions.api_exception import APIException - from bandwidth.webrtc.models.subscriptions import Subscriptions - - import os - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = BandwidthClient( - web_rtc_basic_auth_user_name=BW_USERNAME, - web_rtc_basic_auth_password=BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Subscriptions() - body.session_id = "1234-abcd" - - session_id = "1234-abcd" - participant_id = "4321-dcba" - - try: - web_rtc_client.update_participant_subscriptions(BW_ACCOUNT_ID, session_id, participant_id, body) - except APIException as e: - print(e.response_code) - - lang: Ruby - source: |+ - require 'bandwidth' - - include Bandwidth - include Bandwidth::WebRtc - - BW_USERNAME = "api-username" - BW_PASSWORD = "api-password" - BW_ACCOUNT_ID = "12345" - - bandwidth_client = Bandwidth::Client.new( - web_rtc_basic_auth_user_name: BW_USERNAME, - web_rtc_basic_auth_password: BW_PASSWORD - ) - - web_rtc_client = bandwidth_client.web_rtc_client.client - - body = Subscriptions.new - body.session_id = "1234-abcd" - - session_id = "1234-abcd" - participant_id = "4321-dcba" - - begin - web_rtc_client.update_participant_subscriptions(BW_ACCOUNT_ID, session_id, participant_id, :body => body) - #NOTE: This is currently improperly defined - rescue APIException => e - puts e.response_code - end - components: schemas: publishPermissionsEnum: