You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let defaultClient =OmniCoreModelAndStateManagementApi.ApiClient.instance;
587
+
// Configure API key authorization: apiKey
588
+
let apiKey =defaultClient.authentications['apiKey'];
589
+
apiKey.apiKey='YOUR API KEY';
590
+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
591
+
//apiKey.apiKeyPrefix = 'Token';
592
+
// Configure Bearer (JWT) access token for authorization: bearerAuth
593
+
let bearerAuth =defaultClient.authentications['bearerAuth'];
594
+
bearerAuth.accessToken="YOUR ACCESS TOKEN"
595
+
596
+
let apiInstance =newOmniCoreModelAndStateManagementApi.DeviceApi();
597
+
let subscriptionId ="subscriptionId_example"; // String | Subscription ID
598
+
let opts = {
599
+
'pageNumber':56, // Number | Page Number
600
+
'pageSize':56, // Number | The maximum number of devices to return in the response. If this value is zero, the service will select a default size.
601
+
'fieldMask':"fieldMask_example", // String | The fields of the Device resource to be returned to the response. The fields id and numId are always returned, along with any other fields specified. A comma-separated list of fully qualified names of fields. Example:
602
+
'sortByClientOnline':true, // Boolean | Set to true to return devices sorted by last heartbeat
603
+
'deviceIds': ["null"], // [String] | A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000
604
+
'deviceNumIds': ["null"], // [String] | A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.
605
+
'gatewayListOptionsAssociationsDeviceId':"gatewayListOptionsAssociationsDeviceId_example", // String | If set, returns only the gateways with which the specified device is associated. The device ID can be numeric (num_id) or the user-defined string (id). For example, if 456 is specified, returns only the gateways to which the device with num_id 456 is bound.
606
+
'gatewayListOptionsAssociationsGatewayId':"gatewayListOptionsAssociationsGatewayId_example", // String | If set, only devices associated with the specified gateway are returned. The gateway ID can be numeric (num_id) or the user-defined string (id). For example, if 123 is specified, only devices bound to the gateway with num_id 123 are returned
607
+
'gatewayListOptionsGatewayType':"gatewayListOptionsGatewayType_example"// String | If GATEWAY is specified, only gateways are returned. If NON_GATEWAY is specified, only non-gateway devices are returned. If GATEWAY_TYPE_UNSPECIFIED is specified, all devices are returned.
**subscriptionId** | **String**| Subscription ID |
624
+
**pageNumber** | **Number**| Page Number | [optional]
625
+
**pageSize** | **Number**| The maximum number of devices to return in the response. If this value is zero, the service will select a default size. | [optional]
626
+
**fieldMask** | **String**| The fields of the Device resource to be returned to the response. The fields id and numId are always returned, along with any other fields specified. A comma-separated list of fully qualified names of fields. Example: | [optional]
627
+
**sortByClientOnline** | **Boolean**| Set to true to return devices sorted by last heartbeat | [optional]
628
+
**deviceIds** | [**[String]**](String.md)| A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000 | [optional]
629
+
**deviceNumIds** | [**[String]**](String.md)| A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000. | [optional]
630
+
**gatewayListOptionsAssociationsDeviceId** | **String**| If set, returns only the gateways with which the specified device is associated. The device ID can be numeric (num_id) or the user-defined string (id). For example, if 456 is specified, returns only the gateways to which the device with num_id 456 is bound. | [optional]
631
+
**gatewayListOptionsAssociationsGatewayId** | **String**| If set, only devices associated with the specified gateway are returned. The gateway ID can be numeric (num_id) or the user-defined string (id). For example, if 123 is specified, only devices bound to the gateway with num_id 123 are returned | [optional]
632
+
**gatewayListOptionsGatewayType** | **String**| If GATEWAY is specified, only gateways are returned. If NON_GATEWAY is specified, only non-gateway devices are returned. If GATEWAY_TYPE_UNSPECIFIED is specified, all devices are returned. | [optional]
* @param {module:model/ListDevicesOnlineResponse} data The data returned by the service call.
563
+
* @param {String} response The complete HTTP response.
564
+
*/
565
+
566
+
/**
567
+
* Get all devices under a subscription
568
+
* @param {String} subscriptionId Subscription ID
569
+
* @param {Object} opts Optional parameters
570
+
* @param {Number} opts.pageNumber Page Number
571
+
* @param {Number} opts.pageSize The maximum number of devices to return in the response. If this value is zero, the service will select a default size.
572
+
* @param {String} opts.fieldMask The fields of the Device resource to be returned to the response. The fields id and numId are always returned, along with any other fields specified. A comma-separated list of fully qualified names of fields. Example:
573
+
* @param {Boolean} opts.sortByClientOnline Set to true to return devices sorted by last heartbeat
574
+
* @param {Array.<String>} opts.deviceIds A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000
575
+
* @param {Array.<String>} opts.deviceNumIds A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.
576
+
* @param {String} opts.gatewayListOptionsAssociationsDeviceId If set, returns only the gateways with which the specified device is associated. The device ID can be numeric (num_id) or the user-defined string (id). For example, if 456 is specified, returns only the gateways to which the device with num_id 456 is bound.
577
+
* @param {String} opts.gatewayListOptionsAssociationsGatewayId If set, only devices associated with the specified gateway are returned. The gateway ID can be numeric (num_id) or the user-defined string (id). For example, if 123 is specified, only devices bound to the gateway with num_id 123 are returned
578
+
* @param {String} opts.gatewayListOptionsGatewayType If GATEWAY is specified, only gateways are returned. If NON_GATEWAY is specified, only non-gateway devices are returned. If GATEWAY_TYPE_UNSPECIFIED is specified, all devices are returned.
579
+
* @param {module:api/DeviceApi~getSubscriptionDevicesCallback} callback The callback function, accepting three arguments: error, data, response
580
+
* data is of type: {@link module:model/ListDevicesOnlineResponse}
0 commit comments