Skip to content

Latest commit

 

History

History
159 lines (112 loc) · 5.2 KB

File metadata and controls

159 lines (112 loc) · 5.2 KB

cloudflare_dart.api.UserApi

Load the API package

import 'package:cloudflare_dart/api.dart';

All URIs are relative to https://api.cloudflare.com/client/v4

Method HTTP request Description
userEditUser PATCH /user Edit User
userListUserTenants GET /users/tenants List user tenants
userUserDetails GET /user User Details

userEditUser

IamSingleUserResponse userEditUser(userEditUserRequest)

Edit User

Edit part of your user details.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getUserApi();
final UserEditUserRequest userEditUserRequest = ; // UserEditUserRequest | 

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

Parameters

Name Type Description Notes
userEditUserRequest UserEditUserRequest

Return type

IamSingleUserResponse

Authorization

api_key, api_token, api_email

HTTP request headers

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

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

userListUserTenants

AccountsListAccountOrganizations200Response userListUserTenants()

List user tenants

Retrieves list of tenants the authenticated user / method has access to.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getUserApi();

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

Parameters

This endpoint does not need any parameter.

Return type

AccountsListAccountOrganizations200Response

Authorization

api_key, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

userUserDetails

IamSingleUserResponse userUserDetails()

User Details

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getUserApi();

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

Parameters

This endpoint does not need any parameter.

Return type

IamSingleUserResponse

Authorization

api_key, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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