getConnectedDevice
+Get status of a connected device.
++
/connectedDevice/{serialNumber}
+ +
Usage and SDK Samples
+ + + +curl -X GET \
+-H "X-API-KEY: [[apiKey]]" \
+ -H "Authorization: Bearer [[accessToken]]" \
+ -H "Accept: application/json" \
+ "https://localhost:16003/api/v1/connectedDevice/{serialNumber}"
+
+ import org.openapitools.client.*;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.model.*;
+import org.openapitools.client.api.ConnectedDevicesApi;
+
+import java.io.File;
+import java.util.*;
+
+public class ConnectedDevicesApiExample {
+ 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
+ ConnectedDevicesApi apiInstance = new ConnectedDevicesApi();
+ String serialNumber = serialNumber_example; // String | SerialNumber of the device
+
+ try {
+ DeviceConnectionInformation result = apiInstance.getConnectedDevice(serialNumber);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ConnectedDevicesApi#getConnectedDevice");
+ e.printStackTrace();
+ }
+ }
+}
+
+ import org.openapitools.client.api.ConnectedDevicesApi;
+
+public class ConnectedDevicesApiExample {
+ public static void main(String[] args) {
+ ConnectedDevicesApi apiInstance = new ConnectedDevicesApi();
+ String serialNumber = serialNumber_example; // String | SerialNumber of the device
+
+ try {
+ DeviceConnectionInformation result = apiInstance.getConnectedDevice(serialNumber);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ConnectedDevicesApi#getConnectedDevice");
+ 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
+ConnectedDevicesApi *apiInstance = [[ConnectedDevicesApi alloc] init];
+String *serialNumber = serialNumber_example; // SerialNumber of the device (default to null)
+
+// Get status of a connected device.
+[apiInstance getConnectedDeviceWith:serialNumber
+ completionHandler: ^(DeviceConnectionInformation output, NSError* error) {
+ if (output) {
+ NSLog(@"%@", output);
+ }
+ if (error) {
+ NSLog(@"Error: %@", error);
+ }
+}];
+
+ var UCentralFirmwareServiceApi = require('u_central_firmware_service_api');
+var defaultClient = UCentralFirmwareServiceApi.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 UCentralFirmwareServiceApi.ConnectedDevicesApi()
+var serialNumber = serialNumber_example; // {String} SerialNumber of the device
+
+var callback = function(error, data, response) {
+ if (error) {
+ console.error(error);
+ } else {
+ console.log('API called successfully. Returned data: ' + data);
+ }
+};
+api.getConnectedDevice(serialNumber, callback);
+
+ using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+ public class getConnectedDeviceExample
+ {
+ 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 ConnectedDevicesApi();
+ var serialNumber = serialNumber_example; // String | SerialNumber of the device (default to null)
+
+ try {
+ // Get status of a connected device.
+ DeviceConnectionInformation result = apiInstance.getConnectedDevice(serialNumber);
+ Debug.WriteLine(result);
+ } catch (Exception e) {
+ Debug.Print("Exception when calling ConnectedDevicesApi.getConnectedDevice: " + 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\ConnectedDevicesApi();
+$serialNumber = serialNumber_example; // String | SerialNumber of the device
+
+try {
+ $result = $api_instance->getConnectedDevice($serialNumber);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling ConnectedDevicesApi->getConnectedDevice: ', $e->getMessage(), PHP_EOL;
+}
+?>
+ use Data::Dumper;
+use WWW::OPenAPIClient::Configuration;
+use WWW::OPenAPIClient::ConnectedDevicesApi;
+
+# 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::ConnectedDevicesApi->new();
+my $serialNumber = serialNumber_example; # String | SerialNumber of the device
+
+eval {
+ my $result = $api_instance->getConnectedDevice(serialNumber => $serialNumber);
+ print Dumper($result);
+};
+if ($@) {
+ warn "Exception when calling ConnectedDevicesApi->getConnectedDevice: $@\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.ConnectedDevicesApi()
+serialNumber = serialNumber_example # String | SerialNumber of the device (default to null)
+
+try:
+ # Get status of a connected device.
+ api_response = api_instance.get_connected_device(serialNumber)
+ pprint(api_response)
+except ApiException as e:
+ print("Exception when calling ConnectedDevicesApi->getConnectedDevice: %s\n" % e)
+ extern crate ConnectedDevicesApi;
+
+pub fn main() {
+ let serialNumber = serialNumber_example; // String
+
+ let mut context = ConnectedDevicesApi::Context::default();
+ let result = client.getConnectedDevice(serialNumber, &context).wait();
+
+ println!("{:?}", result);
+}
+
+ Scopes
+Parameters
+ +| Name | +Description | +
|---|---|
| serialNumber* | +
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+SerialNumber of the device
+
+
+ Required
+
+ |
+