# ps.module.DeviceApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionTeammateTeammateIdDeviceDefaultGet**](DeviceApi.md#apiVersionTeammateTeammateIdDeviceDefaultGet) | **GET** /api/{version}/teammate/{teammateId}/device/default | [Only for desktop and mobile] Retrieve default device.
[**apiVersionTeammateTeammateIdDeviceGet**](DeviceApi.md#apiVersionTeammateTeammateIdDeviceGet) | **GET** /api/{version}/teammate/{teammateId}/device | Returns a list of active device.
[**apiVersionTeammateTeammateIdDeviceIdDelete**](DeviceApi.md#apiVersionTeammateTeammateIdDeviceIdDelete) | **DELETE** /api/{version}/teammate/{teammateId}/device/{id} | [Team] Delete Device
[**apiVersionTeammateTeammateIdDeviceIdGet**](DeviceApi.md#apiVersionTeammateTeammateIdDeviceIdGet) | **GET** /api/{version}/teammate/{teammateId}/device/{id} | Retrieve existing device.
[**apiVersionTeammateTeammateIdDeviceIdPut**](DeviceApi.md#apiVersionTeammateTeammateIdDeviceIdPut) | **PUT** /api/{version}/teammate/{teammateId}/device/{id} | [Team] Update existing device
[**apiVersionTeammateTeammateIdDevicePost**](DeviceApi.md#apiVersionTeammateTeammateIdDevicePost) | **POST** /api/{version}/teammate/{teammateId}/device | [Teammates] Add new device
[**apiVersionTenantTenantIdDeviceGet**](DeviceApi.md#apiVersionTenantTenantIdDeviceGet) | **GET** /api/{version}/tenant/{tenantId}/device | Returns a list of active device.

<a name="apiVersionTeammateTeammateIdDeviceDefaultGet"></a>
# **apiVersionTeammateTeammateIdDeviceDefaultGet**
> apiVersionTeammateTeammateIdDeviceDefaultGet(teammateId, version)

[Only for desktop and mobile] Retrieve default device.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionTeammateTeammateIdDeviceDefaultGet(teammateId, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionTeammateTeammateIdDeviceGet"></a>
# **apiVersionTeammateTeammateIdDeviceGet**
> apiVersionTeammateTeammateIdDeviceGet(teammateId, version, opts)

Returns a list of active device.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | 
let version = "version_example"; // String | 
let opts = { 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'pageNum': 56, // Number | 
  'limit': 56, // Number | 
  'isDeskphone': true // Boolean | 
};
apiInstance.apiVersionTeammateTeammateIdDeviceGet(teammateId, version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**|  | 
 **version** | **String**|  | 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **isDeskphone** | **Boolean**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionTeammateTeammateIdDeviceIdDelete"></a>
# **apiVersionTeammateTeammateIdDeviceIdDelete**
> apiVersionTeammateTeammateIdDeviceIdDelete(teammateId, id, version)

[Team] Delete Device

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | The unique id of the teammate
let id = "id_example"; // String | The unique id of the device object
let version = "version_example"; // String | 

apiInstance.apiVersionTeammateTeammateIdDeviceIdDelete(teammateId, id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**| The unique id of the teammate | 
 **id** | **String**| The unique id of the device object | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionTeammateTeammateIdDeviceIdGet"></a>
# **apiVersionTeammateTeammateIdDeviceIdGet**
> apiVersionTeammateTeammateIdDeviceIdGet(teammateId, id, version)

Retrieve existing device.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | 
let id = "id_example"; // String | 
let version = "version_example"; // String | 

apiInstance.apiVersionTeammateTeammateIdDeviceIdGet(teammateId, id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**|  | 
 **id** | **String**|  | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionTeammateTeammateIdDeviceIdPut"></a>
# **apiVersionTeammateTeammateIdDeviceIdPut**
> apiVersionTeammateTeammateIdDeviceIdPut(teammateIdidversion)

[Team] Update existing device

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | The unique id of the teammate
let id = "id_example"; // String | The unique id of the device object
let version = "version_example"; // String | 

apiInstance.apiVersionTeammateTeammateIdDeviceIdPut(teammateIdidversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**| The unique id of the teammate | 
 **id** | **String**| The unique id of the device object | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreDevicesUpdateDeviceQuery**](PhoneSpeakServiceCoreDevicesUpdateDeviceQuery.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionTeammateTeammateIdDevicePost"></a>
# **apiVersionTeammateTeammateIdDevicePost**
> apiVersionTeammateTeammateIdDevicePost(teammateId, version)

[Teammates] Add new device

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let teammateId = "teammateId_example"; // String | The unique id of the teammate
let version = "version_example"; // String | 

apiInstance.apiVersionTeammateTeammateIdDevicePost(teammateId, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **teammateId** | **String**| The unique id of the teammate | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionTenantTenantIdDeviceGet"></a>
# **apiVersionTenantTenantIdDeviceGet**
> apiVersionTenantTenantIdDeviceGet(tenantId, version, opts)

Returns a list of active device.

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.DeviceApi();
let tenantId = "tenantId_example"; // String | 
let version = "version_example"; // String | 
let opts = { 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'pageNum': 56, // Number | 
  'limit': 56 // Number | 
};
apiInstance.apiVersionTenantTenantIdDeviceGet(tenantId, version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **tenantId** | **String**|  | 
 **version** | **String**|  | 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 
 **limit** | **Number**|  | [optional] 

### Return type

null (empty response body)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

