endpointsApplyConfig
Apply settings and config to an endpoint.
Creates and applies a new config to an endpoint.
/api/v1/orgs/{orgid}/endpoints/{id}/config
Usage and SDK Samples
curl -X POST \
-H "Authorization: Bearer [[accessToken]]" \
\
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://pulse.neat.no/api/v1/orgs/{orgid}/endpoints/{id}/config" \
-d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.EndpointsApi;
import java.io.File;
import java.util.*;
public class EndpointsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure Bearer access token for authorization: bearerToken
HttpBearerAuth bearerToken = (HttpBearerAuth) defaultClient.getAuthentication("bearerToken");
bearerToken.setBearerToken("BEARER TOKEN");
// Create an instance of the API class
EndpointsApi apiInstance = new EndpointsApi();
String id = id_example; // String |
String orgid = orgid_example; // String |
DeviceConfig deviceConfig = ; // DeviceConfig |
try {
webpageEndpointApplyConfigResponse result = apiInstance.endpointsApplyConfig(id, orgid, deviceConfig);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EndpointsApi#endpointsApplyConfig");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.EndpointsApi;
public class EndpointsApiExample {
public static void main(String[] args) {
EndpointsApi apiInstance = new EndpointsApi();
String id = id_example; // String |
String orgid = orgid_example; // String |
DeviceConfig deviceConfig = ; // DeviceConfig |
try {
webpageEndpointApplyConfigResponse result = apiInstance.endpointsApplyConfig(id, orgid, deviceConfig);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EndpointsApi#endpointsApplyConfig");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure Bearer access token for authorization: bearerToken
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
EndpointsApi *apiInstance = [[EndpointsApi alloc] init];
String *id = id_example; // (default to null)
String *orgid = orgid_example; // (default to null)
DeviceConfig *deviceConfig = ; //
// Apply settings and config to an endpoint.
[apiInstance endpointsApplyConfigWith:id
orgid:orgid
deviceConfig:deviceConfig
completionHandler: ^(webpageEndpointApplyConfigResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var NeatPulseApi = require('neat_pulse_api');
var defaultClient = NeatPulseApi.ApiClient.instance;
// Configure Bearer access token for authorization: bearerToken
var bearerToken = defaultClient.authentications['bearerToken'];
bearerToken.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new NeatPulseApi.EndpointsApi()
var id = id_example; // {String}
var orgid = orgid_example; // {String}
var deviceConfig = ; // {DeviceConfig}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.endpointsApplyConfig(id, orgid, deviceConfig, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class endpointsApplyConfigExample
{
public void main()
{
// Configure Bearer access token for authorization: bearerToken
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new EndpointsApi();
var id = id_example; // String | (default to null)
var orgid = orgid_example; // String | (default to null)
var deviceConfig = new DeviceConfig(); // DeviceConfig |
try {
// Apply settings and config to an endpoint.
webpageEndpointApplyConfigResponse result = apiInstance.endpointsApplyConfig(id, orgid, deviceConfig);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling EndpointsApi.endpointsApplyConfig: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer access token for authorization: bearerToken
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\EndpointsApi();
$id = id_example; // String |
$orgid = orgid_example; // String |
$deviceConfig = ; // DeviceConfig |
try {
$result = $api_instance->endpointsApplyConfig($id, $orgid, $deviceConfig);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EndpointsApi->endpointsApplyConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::EndpointsApi;
# Configure Bearer access token for authorization: bearerToken
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::EndpointsApi->new();
my $id = id_example; # String |
my $orgid = orgid_example; # String |
my $deviceConfig = WWW::OPenAPIClient::Object::DeviceConfig->new(); # DeviceConfig |
eval {
my $result = $api_instance->endpointsApplyConfig(id => $id, orgid => $orgid, deviceConfig => $deviceConfig);
print Dumper($result);
};
if ($@) {
warn "Exception when calling EndpointsApi->endpointsApplyConfig: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure Bearer access token for authorization: bearerToken
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.EndpointsApi()
id = id_example # String | (default to null)
orgid = orgid_example # String | (default to null)
deviceConfig = # DeviceConfig |
try:
# Apply settings and config to an endpoint.
api_response = api_instance.endpoints_apply_config(id, orgid, deviceConfig)
pprint(api_response)
except ApiException as e:
print("Exception when calling EndpointsApi->endpointsApplyConfig: %s\n" % e)
extern crate EndpointsApi;
pub fn main() {
let id = id_example; // String
let orgid = orgid_example; // String
let deviceConfig = ; // DeviceConfig
let mut context = EndpointsApi::Context::default();
let result = client.endpointsApplyConfig(id, orgid, deviceConfig, &context).wait();
println!("{:?}", result);
}
Scopes | |
---|---|
Write | Write permissions |
Parameters
Path parameters
Name | Description |
---|---|
id * |
String
Required
|
orgid * |
String
Required
|
Body parameters
Name | Description |
---|---|
deviceConfig * |