# ps.module.ResourceApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionResourceGet**](ResourceApi.md#apiVersionResourceGet) | **GET** /api/{version}/resource | Returns a list of your Resource.
[**apiVersionResourceIdDelete**](ResourceApi.md#apiVersionResourceIdDelete) | **DELETE** /api/{version}/resource/{id} | Delete existing Resource.
[**apiVersionResourceIdGet**](ResourceApi.md#apiVersionResourceIdGet) | **GET** /api/{version}/resource/{id} | Retrieves the details of an existing Resource.
[**apiVersionResourceIdPut**](ResourceApi.md#apiVersionResourceIdPut) | **PUT** /api/{version}/resource/{id} | Updates the specific Resource.
[**apiVersionResourcePost**](ResourceApi.md#apiVersionResourcePost) | **POST** /api/{version}/resource | Create Resource

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

Returns a list of your Resource.

### 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.ResourceApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'enabled': true, // Boolean | 
  'type': new ps.module.PhoneSpeakEntitiesEnumsResourceType(), // PhoneSpeakEntitiesEnumsResourceType | 
  'country': new ps.module.PhoneSpeakEntitiesEnumsCountry(), // PhoneSpeakEntitiesEnumsCountry | 
  'callType': new ps.module.PhoneSpeakEntitiesEnumsCallType(), // PhoneSpeakEntitiesEnumsCallType | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'limit': 56, // Number | 
  'pageNum': 56 // Number | 
};
apiInstance.apiVersionResourceGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **enabled** | **Boolean**|  | [optional] 
 **type** | [**PhoneSpeakEntitiesEnumsResourceType**](.md)|  | [optional] 
 **country** | [**PhoneSpeakEntitiesEnumsCountry**](.md)|  | [optional] 
 **callType** | [**PhoneSpeakEntitiesEnumsCallType**](.md)|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

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

Delete existing Resource.

### 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.ResourceApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **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="apiVersionResourceIdGet"></a>
# **apiVersionResourceIdGet**
> apiVersionResourceIdGet(id, version)

Retrieves the details of an existing Resource.

### 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.ResourceApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **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="apiVersionResourceIdPut"></a>
# **apiVersionResourceIdPut**
> apiVersionResourceIdPut(idversion)

Updates the specific Resource.

### 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.ResourceApi();
let id = "id_example"; // String | 
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**|  | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePbxResourcesUpdateResourceQuery**](PhoneSpeakServiceCorePbxResourcesUpdateResourceQuery.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
 - **Accept**: Not defined

<a name="apiVersionResourcePost"></a>
# **apiVersionResourcePost**
> apiVersionResourcePost(version)

Create Resource

### 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.ResourceApi();
let version = "version_example"; // String | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCorePbxResourcesCreateResourceQuery**](PhoneSpeakServiceCorePbxResourcesCreateResourceQuery.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
 - **Accept**: Not defined

