Skip to content

Latest commit

 

History

History
102 lines (66 loc) · 2.72 KB

DeviceV1alpha1UcApi.md

File metadata and controls

102 lines (66 loc) · 2.72 KB

halo_client.api.DeviceV1alpha1UcApi

Load the API package

import 'package:halo_client/api.dart';

All URIs are relative to http://localhost:8091

Method HTTP request Description
listDevices GET /apis/uc.api.security.halo.run/v1alpha1/devices
revokeDevice DELETE /apis/uc.api.security.halo.run/v1alpha1/devices/{deviceId}

listDevices

BuiltList listDevices()

List all user devices

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getDeviceV1alpha1UcApi();

try {
    final response = api.listDevices();
    print(response);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1UcApi->listDevices: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<UserDevice>

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to README]

revokeDevice

revokeDevice(deviceId)

Revoke a own device

Example

import 'package:halo_client/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';

final api = HaloClient().getDeviceV1alpha1UcApi();
final String deviceId = deviceId_example; // String | Device ID

try {
    api.revokeDevice(deviceId);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1UcApi->revokeDevice: $e\n');
}

Parameters

Name Type Description Notes
deviceId String Device ID

Return type

void (empty response body)

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]