diff --git a/docs/index.html b/docs/index.html index ff9eeab1..0fb48cd3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1932,6 +1932,40 @@ "type" : "string" } } +}; + defs["PowerCycleRequest"] = { + "type" : "object", + "properties" : { + "serial" : { + "type" : "string" + }, + "when" : { + "type" : "integer", + "format" : "int64" + }, + "ports" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PowerCycleRequest_ports_inner" + } + } + } +}; + defs["PowerCycleRequest_ports_inner"] = { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "example" : "[\"Ethernet0\"]" + }, + "cycle" : { + "maximum" : 60000, + "minimum" : 1, + "type" : "integer", + "description" : "off time in milliseconds", + "default" : 10000 + } + } }; defs["putAPRadiusSessions_request"] = { "oneOf" : [ { @@ -3050,6 +3084,9 @@
  • messageRequest
  • +
  • + performPowerCycle +
  • rebootDevice
  • @@ -15958,6 +15995,469 @@


    +
    +
    +
    +

    performPowerCycle

    +

    Perform PoE power cycle for some PoE ports.

    +
    +
    +
    +

    +

    +

    +
    +
    /device/{serialNumber}/powercycle
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "X-API-KEY: [[apiKey]]" \
    + -H "Authorization: Bearer [[accessToken]]" \
    + -H "Content-Type: application/json" \
    + "https://localhost:16001/api/v1/device/{serialNumber}/powercycle" \
    + -d '{
    +  "serial" : "serial",
    +  "ports" : [ {
    +    "name" : "[\"Ethernet0\"]",
    +    "cycle" : 36165
    +  }, {
    +    "name" : "[\"Ethernet0\"]",
    +    "cycle" : 36165
    +  } ],
    +  "when" : 0
    +}'
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.CommandsApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class CommandsApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +        
    +        // Configure Bearer (JWT) access token for authorization: bearerAuth
    +        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    +        bearerAuth.setBearerToken("BEARER TOKEN");
    +
    +        // Create an instance of the API class
    +        CommandsApi apiInstance = new CommandsApi();
    +        String serialNumber = serialNumber_example; // String | 
    +        array[PowerCycleRequest] powerCycleRequest = ; // array[PowerCycleRequest] | 
    +
    +        try {
    +            apiInstance.performPowerCycle(serialNumber, powerCycleRequest);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling CommandsApi#performPowerCycle");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import org.openapitools.client.api.CommandsApi;
    +
    +public class CommandsApiExample {
    +    public static void main(String[] args) {
    +        CommandsApi apiInstance = new CommandsApi();
    +        String serialNumber = serialNumber_example; // String | 
    +        array[PowerCycleRequest] powerCycleRequest = ; // array[PowerCycleRequest] | 
    +
    +        try {
    +            apiInstance.performPowerCycle(serialNumber, powerCycleRequest);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling CommandsApi#performPowerCycle");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-KEY"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-KEY"];
    +
    +// Configure Bearer (JWT) access token for authorization: bearerAuth
    +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    +
    +// Create an instance of the API class
    +CommandsApi *apiInstance = [[CommandsApi alloc] init];
    +String *serialNumber = serialNumber_example; //  (default to null)
    +array[PowerCycleRequest] *powerCycleRequest = ; //  (optional)
    +
    +// Perform PoE power cycle for some PoE ports.
    +[apiInstance performPowerCycleWith:serialNumber
    +    powerCycleRequest:powerCycleRequest
    +              completionHandler: ^(NSError* error) {
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var UCentralGatewayApi = require('u_central_gateway_api');
    +var defaultClient = UCentralGatewayApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['X-API-KEY'] = "Token";
    +
    +// Configure Bearer (JWT) access token for authorization: bearerAuth
    +var bearerAuth = defaultClient.authentications['bearerAuth'];
    +bearerAuth.accessToken = "YOUR ACCESS TOKEN";
    +
    +// Create an instance of the API class
    +var api = new UCentralGatewayApi.CommandsApi()
    +var serialNumber = serialNumber_example; // {String} 
    +var opts = {
    +  'powerCycleRequest':  // {array[PowerCycleRequest]} 
    +};
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully.');
    +  }
    +};
    +api.performPowerCycle(serialNumber, opts, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class performPowerCycleExample
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("X-API-KEY", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("X-API-KEY", "Bearer");
    +            // Configure Bearer (JWT) access token for authorization: bearerAuth
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            // Create an instance of the API class
    +            var apiInstance = new CommandsApi();
    +            var serialNumber = serialNumber_example;  // String |  (default to null)
    +            var powerCycleRequest = new array[PowerCycleRequest](); // array[PowerCycleRequest] |  (optional) 
    +
    +            try {
    +                // Perform PoE power cycle for some PoE ports.
    +                apiInstance.performPowerCycle(serialNumber, powerCycleRequest);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling CommandsApi.performPowerCycle: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
    +
    +// Configure Bearer (JWT) access token for authorization: bearerAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\CommandsApi();
    +$serialNumber = serialNumber_example; // String | 
    +$powerCycleRequest = ; // array[PowerCycleRequest] | 
    +
    +try {
    +    $api_instance->performPowerCycle($serialNumber, $powerCycleRequest);
    +} catch (Exception $e) {
    +    echo 'Exception when calling CommandsApi->performPowerCycle: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::CommandsApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'X-API-KEY'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-KEY'} = "Bearer";
    +
    +# Configure Bearer (JWT) access token for authorization: bearerAuth
    +$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::CommandsApi->new();
    +my $serialNumber = serialNumber_example; # String | 
    +my $powerCycleRequest = [WWW::OPenAPIClient::Object::array[PowerCycleRequest]->new()]; # array[PowerCycleRequest] | 
    +
    +eval {
    +    $api_instance->performPowerCycle(serialNumber => $serialNumber, powerCycleRequest => $powerCycleRequest);
    +};
    +if ($@) {
    +    warn "Exception when calling CommandsApi->performPowerCycle: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
    +
    +# Configure Bearer (JWT) access token for authorization: bearerAuth
    +openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.CommandsApi()
    +serialNumber = serialNumber_example # String |  (default to null)
    +powerCycleRequest =  # array[PowerCycleRequest] |  (optional)
    +
    +try:
    +    # Perform PoE power cycle for some PoE ports.
    +    api_instance.perform_power_cycle(serialNumber, powerCycleRequest=powerCycleRequest)
    +except ApiException as e:
    +    print("Exception when calling CommandsApi->performPowerCycle: %s\n" % e)
    +
    + +
    +
    extern crate CommandsApi;
    +
    +pub fn main() {
    +    let serialNumber = serialNumber_example; // String
    +    let powerCycleRequest = ; // array[PowerCycleRequest]
    +
    +    let mut context = CommandsApi::Context::default();
    +    let result = client.performPowerCycle(serialNumber, powerCycleRequest, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    serialNumber* + + +
    +
    +
    + + String + + +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    powerCycleRequest +

    Certificate update details

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +

    +

    + + + + + + +
    +
    +

    +

    + + + + + + +
    +
    +
    +
    +
    @@ -24622,7 +25122,7 @@

    Usage and SDK Samples

    Boolean *health = true; // return devices with their health value in between lowLimit and highLimit (optional) (default to false) Integer *lowLimit = 56; // lowLimit for the health selection criteria (optional) (default to 30) Integer *highLimits = 56; // highLimit for the health selection criteria (optional) (default to 70) -String *platform = platform_example; // return only devices matching a certain platform of AP or SWITCH (optional) (default to null) +String *platform = platform_example; // return only devices matching a certain platform of AP or SWITCH (optional) (default to ALL) // Returns a list of devices. [apiInstance getDeviceListWith:offset @@ -24732,7 +25232,7 @@

    Usage and SDK Samples

    var health = true; // Boolean | return devices with their health value in between lowLimit and highLimit (optional) (default to false) var lowLimit = 56; // Integer | lowLimit for the health selection criteria (optional) (default to 30) var highLimits = 56; // Integer | highLimit for the health selection criteria (optional) (default to 70) - var platform = platform_example; // String | return only devices matching a certain platform of AP or SWITCH (optional) (default to null) + var platform = platform_example; // String | return only devices matching a certain platform of AP or SWITCH (optional) (default to ALL) try { // Returns a list of devices. @@ -24854,7 +25354,7 @@

    Usage and SDK Samples

    health = true # Boolean | return devices with their health value in between lowLimit and highLimit (optional) (default to false) lowLimit = 56 # Integer | lowLimit for the health selection criteria (optional) (default to 30) highLimits = 56 # Integer | highLimit for the health selection criteria (optional) (default to 70) -platform = platform_example # String | return only devices matching a certain platform of AP or SWITCH (optional) (default to null) +platform = platform_example # String | return only devices matching a certain platform of AP or SWITCH (optional) (default to ALL) try: # Returns a list of devices.