All URIs are relative to https://ns-api.com/ns-api/v2, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createApikey() | POST /apikeys | Create API Key |
| readApikey() | GET /apikeys/{key_id} | Read Info on specific APIKey via Key ID |
| readApikeys() | GET /apikeys#1 | Read API Keys under your account |
| readMyApikey() | GET /apikeys/~ | Read API Key info on your API Key |
| revokeApikey() | DELETE /apikeys/{key_id} | Revoke API Key |
| updateApikey() | PUT /apikeys/{key_id} | Update API Key |
createApikey($create_apikey_request): \SpectrumVoip\\\\NetSapiens\Model\CreateApikey200ResponseCreate API Key
This is a limited action and will require special access to create API keys.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_apikey_request = {"description":"Myomp ApiKey 2","domain":"apidog.ApiReseller","reseller":"ApiReseller","readonly":"no","ip-address":"10.211.55.0/24,127.0.0.1","user-scope":"Office Manager","can-create-keys":"no"}; // \SpectrumVoip\\\\NetSapiens\Model\CreateApikeyRequest
try {
$result = $apiInstance->createApikey($create_apikey_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->createApikey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| create_apikey_request | \SpectrumVoip\\NetSapiens\Model\CreateApikeyRequest | [optional] |
\SpectrumVoip\\NetSapiens\Model\CreateApikey200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
readApikey($key_id): \SpectrumVoip\\\\NetSapiens\Model\ReadApikeys200ResponseInner[]Read Info on specific APIKey via Key ID
This action will show apikeys that have been generated by your current APIkey and that you have access to update or revoke as needed. > Note: # and anything after is NOT needed, its just to allow multiple examples for the same path/method.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key_id = nsr_XDS9kzKV; // string |
try {
$result = $apiInstance->readApikey($key_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->readApikey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| key_id | string |
\SpectrumVoip\\NetSapiens\Model\ReadApikeys200ResponseInner[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
readApikeys(): \SpectrumVoip\\\\NetSapiens\Model\ReadApikeys200ResponseInner[]Read API Keys under your account
This action will show apikeys that have been generated by your current APIkey and that you have access to update or revoke as needed. > Note: # and anything after is NOT needed, its just to allow multiple examples for the same path/method.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->readApikeys();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->readApikeys: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\SpectrumVoip\\NetSapiens\Model\ReadApikeys200ResponseInner[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
readMyApikey(): \SpectrumVoip\\\\NetSapiens\Model\ApiKeyRead API Key info on your API Key
This parameter-less action will return the information on the API key being used for the request giving confirmation on access levels allowed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->readMyApikey();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->readMyApikey: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\SpectrumVoip\\NetSapiens\Model\ApiKey
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
revokeApikey($key_id): \SpectrumVoip\\\\NetSapiens\Model\SuccessResponseRevoke API Key
This is a limited action and will require special access to revoke API keys. Revoking the apikey will remove the key from the DB and any Cache stoping access immediately.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key_id = nsr_hTd6kA9I; // string |
try {
$result = $apiInstance->revokeApikey($key_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->revokeApikey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| key_id | string |
\SpectrumVoip\\NetSapiens\Model\SuccessResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateApikey($key_id, $update_apikey_request): \SpectrumVoip\\\\NetSapiens\Model\SuccessResponseUpdate API Key
This is a limited action and will require special access to create API keys. The Update is even more limited only allowing the change of the description and IP restrictions. You will not be able to change the scope, access rights or any premissions. A new apikey would need to be created in those cases.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = SpectrumVoip\\\\NetSapiens\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new SpectrumVoip\\\\NetSapiens\Api\AuthenticationAPIKeyMachine2MachineApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key_id = nss_gPGEUWBI; // string |
$update_apikey_request = {"description":"my OMP test (updated2)","ip-address":"10.211.55.0/24,127.0.0.1"}; // \SpectrumVoip\\\\NetSapiens\Model\UpdateApikeyRequest
try {
$result = $apiInstance->updateApikey($key_id, $update_apikey_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationAPIKeyMachine2MachineApi->updateApikey: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| key_id | string | ||
| update_apikey_request | \SpectrumVoip\\NetSapiens\Model\UpdateApikeyRequest | [optional] |
\SpectrumVoip\\NetSapiens\Model\SuccessResponse
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]