Skip to content

Latest commit

 

History

History
287 lines (187 loc) · 8.15 KB

PersonalAccessTokenV1alpha1UcApi.md

File metadata and controls

287 lines (187 loc) · 8.15 KB

halo_client.api.PersonalAccessTokenV1alpha1UcApi

Load the API package

import 'package:halo_client/api.dart';

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

Method HTTP request Description
deletePat DELETE /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens/{name}
generatePat POST /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens
obtainPat GET /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens/{name}
obtainPats GET /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens
restorePat PUT /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens/{name}/actions/restoration
revokePat PUT /apis/uc.api.security.halo.run/v1alpha1/personalaccesstokens/{name}/actions/revocation

deletePat

deletePat(name)

Delete a PAT

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().getPersonalAccessTokenV1alpha1UcApi();
final String name = name_example; // String | 

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

Parameters

Name Type Description Notes
name String

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]

generatePat

PersonalAccessToken generatePat(personalAccessToken)

Generate a PAT.

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().getPersonalAccessTokenV1alpha1UcApi();
final PersonalAccessToken personalAccessToken = ; // PersonalAccessToken | 

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

Parameters

Name Type Description Notes
personalAccessToken PersonalAccessToken

Return type

PersonalAccessToken

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]

obtainPat

obtainPat(name)

Obtain a PAT.

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().getPersonalAccessTokenV1alpha1UcApi();
final String name = name_example; // String | 

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

Parameters

Name Type Description Notes
name String

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]

obtainPats

BuiltList obtainPats()

Obtain PAT list.

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().getPersonalAccessTokenV1alpha1UcApi();

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

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<PersonalAccessToken>

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]

restorePat

restorePat(name)

Restore a PAT.

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().getPersonalAccessTokenV1alpha1UcApi();
final String name = name_example; // String | 

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

Parameters

Name Type Description Notes
name String

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]

revokePat

revokePat(name)

Revoke a PAT

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().getPersonalAccessTokenV1alpha1UcApi();
final String name = name_example; // String | 

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

Parameters

Name Type Description Notes
name String

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]