Skip to content

Latest commit

 

History

History
306 lines (205 loc) · 9.32 KB

DeviceV1alpha1Api.md

File metadata and controls

306 lines (205 loc) · 9.32 KB

halo_client.api.DeviceV1alpha1Api

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
createDevice POST /apis/security.halo.run/v1alpha1/devices
deleteDevice DELETE /apis/security.halo.run/v1alpha1/devices/{name}
getDevice GET /apis/security.halo.run/v1alpha1/devices/{name}
listDevice GET /apis/security.halo.run/v1alpha1/devices
patchDevice PATCH /apis/security.halo.run/v1alpha1/devices/{name}
updateDevice PUT /apis/security.halo.run/v1alpha1/devices/{name}

createDevice

Device createDevice(device)

Create 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().getDeviceV1alpha1Api();
final Device device = ; // Device | Fresh device

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

Parameters

Name Type Description Notes
device Device Fresh device [optional]

Return type

Device

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]

deleteDevice

deleteDevice(name)

Delete 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().getDeviceV1alpha1Api();
final String name = name_example; // String | Name of device

try {
    api.deleteDevice(name);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1Api->deleteDevice: $e\n');
}

Parameters

Name Type Description Notes
name String Name of device

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]

getDevice

Device getDevice(name)

Get 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().getDeviceV1alpha1Api();
final String name = name_example; // String | Name of device

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

Parameters

Name Type Description Notes
name String Name of device

Return type

Device

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]

listDevice

DeviceList listDevice(page, size, labelSelector, fieldSelector, sort)

List 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().getDeviceV1alpha1Api();
final int page = 56; // int | Page number. Default is 0.
final int size = 56; // int | Size number. Default is 0.
final BuiltList<String> labelSelector = ; // BuiltList<String> | Label selector. e.g.: hidden!=true
final BuiltList<String> fieldSelector = ; // BuiltList<String> | Field selector. e.g.: metadata.name==halo
final BuiltList<String> sort = ; // BuiltList<String> | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

try {
    final response = api.listDevice(page, size, labelSelector, fieldSelector, sort);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1Api->listDevice: $e\n');
}

Parameters

Name Type Description Notes
page int Page number. Default is 0. [optional]
size int Size number. Default is 0. [optional]
labelSelector BuiltList<String> Label selector. e.g.: hidden!=true [optional]
fieldSelector BuiltList<String> Field selector. e.g.: metadata.name==halo [optional]
sort BuiltList<String> Sorting criteria in the format: property,(asc desc). Default sort order is ascending. Multiple sort criteria are supported.

Return type

DeviceList

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]

patchDevice

Device patchDevice(name, jsonPatchInner)

Patch 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().getDeviceV1alpha1Api();
final String name = name_example; // String | Name of device
final BuiltSet<JsonPatchInner> jsonPatchInner = ; // BuiltSet<JsonPatchInner> | 

try {
    final response = api.patchDevice(name, jsonPatchInner);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1Api->patchDevice: $e\n');
}

Parameters

Name Type Description Notes
name String Name of device
jsonPatchInner BuiltSet<JsonPatchInner> [optional]

Return type

Device

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json-patch+json
  • Accept: /

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

updateDevice

Device updateDevice(name, device)

Update 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().getDeviceV1alpha1Api();
final String name = name_example; // String | Name of device
final Device device = ; // Device | Updated device

try {
    final response = api.updateDevice(name, device);
    print(response);
} catch on DioException (e) {
    print('Exception when calling DeviceV1alpha1Api->updateDevice: $e\n');
}

Parameters

Name Type Description Notes
name String Name of device
device Device Updated device [optional]

Return type

Device

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]