Skip to content

Latest commit

 

History

History
312 lines (228 loc) · 11.1 KB

File metadata and controls

312 lines (228 loc) · 11.1 KB

DynamicEmergencyEndpointsApi

All URIs are relative to https://api.telnyx.com/v2

Method HTTP request Description
createDynamicEmergencyEndpoint POST /dynamic_emergency_endpoints Create a dynamic emergency endpoint.
deleteDynamicEmergencyEndpoint DELETE /dynamic_emergency_endpoints/{id} Delete a dynamic emergency endpoint
getDynamicEmergencyEndpoint GET /dynamic_emergency_endpoints/{id} Get a dynamic emergency endpoint
listDynamicEmergencyEndpoints GET /dynamic_emergency_endpoints List dynamic emergency endpoints

createDynamicEmergencyEndpoint

CreateDynamicEmergencyEndpoint201Response createDynamicEmergencyEndpoint(dynamicEmergencyEndpoint)

Create a dynamic emergency endpoint.

Creates a dynamic emergency endpoints.

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.DynamicEmergencyEndpointsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        DynamicEmergencyEndpointsApi apiInstance = new DynamicEmergencyEndpointsApi(defaultClient);
        DynamicEmergencyEndpoint dynamicEmergencyEndpoint = new DynamicEmergencyEndpoint(); // DynamicEmergencyEndpoint | 
        try {
            CreateDynamicEmergencyEndpoint201Response result = apiInstance.createDynamicEmergencyEndpoint(dynamicEmergencyEndpoint);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DynamicEmergencyEndpointsApi#createDynamicEmergencyEndpoint");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
dynamicEmergencyEndpoint DynamicEmergencyEndpoint

Return type

CreateDynamicEmergencyEndpoint201Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Dynamic Emergency Endpoint Response -
401 Unauthorized -
404 Resource not found -
422 Unprocessable entity. Check message field in response for details. -

deleteDynamicEmergencyEndpoint

CreateDynamicEmergencyEndpoint201Response deleteDynamicEmergencyEndpoint(id)

Delete a dynamic emergency endpoint

Deletes the dynamic emergency endpoint based on the ID provided

Example

import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.DynamicEmergencyEndpointsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        DynamicEmergencyEndpointsApi apiInstance = new DynamicEmergencyEndpointsApi(defaultClient);
        UUID id = UUID.randomUUID(); // UUID | Dynamic Emergency Endpoint id
        try {
            CreateDynamicEmergencyEndpoint201Response result = apiInstance.deleteDynamicEmergencyEndpoint(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DynamicEmergencyEndpointsApi#deleteDynamicEmergencyEndpoint");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id UUID Dynamic Emergency Endpoint id

Return type

CreateDynamicEmergencyEndpoint201Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Dynamic Emergency Endpoint Response -
401 Unauthorized -
404 Resource not found -
422 Unprocessable entity. Check message field in response for details. -

getDynamicEmergencyEndpoint

CreateDynamicEmergencyEndpoint201Response getDynamicEmergencyEndpoint(id)

Get a dynamic emergency endpoint

Returns the dynamic emergency endpoint based on the ID provided

Example

import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.DynamicEmergencyEndpointsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        DynamicEmergencyEndpointsApi apiInstance = new DynamicEmergencyEndpointsApi(defaultClient);
        UUID id = UUID.randomUUID(); // UUID | Dynamic Emergency Endpoint id
        try {
            CreateDynamicEmergencyEndpoint201Response result = apiInstance.getDynamicEmergencyEndpoint(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DynamicEmergencyEndpointsApi#getDynamicEmergencyEndpoint");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
id UUID Dynamic Emergency Endpoint id

Return type

CreateDynamicEmergencyEndpoint201Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Dynamic Emergency Endpoint Response -
401 Unauthorized -
404 Resource not found -
422 Unprocessable entity. Check message field in response for details. -

listDynamicEmergencyEndpoints

ListDynamicEmergencyEndpoints200Response listDynamicEmergencyEndpoints(filterStatus, filterCountryCode, pageNumber, pageSize)

List dynamic emergency endpoints

Returns the dynamic emergency endpoints according to filters

Example

// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.DynamicEmergencyEndpointsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.telnyx.com/v2");
        
        // Configure HTTP bearer authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        DynamicEmergencyEndpointsApi apiInstance = new DynamicEmergencyEndpointsApi(defaultClient);
        String filterStatus = "pending"; // String | Filter by status.
        String filterCountryCode = "filterCountryCode_example"; // String | Filter by country code.
        Integer pageNumber = 1; // Integer | The page number to load
        Integer pageSize = 20; // Integer | The size of the page
        try {
            ListDynamicEmergencyEndpoints200Response result = apiInstance.listDynamicEmergencyEndpoints(filterStatus, filterCountryCode, pageNumber, pageSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DynamicEmergencyEndpointsApi#listDynamicEmergencyEndpoints");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
filterStatus String Filter by status. [optional] [enum: pending, activated, rejected]
filterCountryCode String Filter by country code. [optional]
pageNumber Integer The page number to load [optional] [default to 1]
pageSize Integer The size of the page [optional] [default to 20]

Return type

ListDynamicEmergencyEndpoints200Response

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Dynamic Emergency Endpoints Responses -
401 Unauthorized -
404 Resource not found -
422 Unprocessable entity. Check message field in response for details. -