Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 2.88 KB

RolesApi.md

File metadata and controls

105 lines (71 loc) · 2.88 KB

openproject_dart_sdk.api.RolesApi

Load the API package

import 'package:openproject_dart_sdk/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
apiV3RolesGet GET /api/v3/roles List roles
apiV3RolesIdGet GET /api/v3/roles/{id} View role

apiV3RolesGet

apiV3RolesGet()

List roles

List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'.

Example

import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = RolesApi();

try {
    api_instance.apiV3RolesGet();
} catch (e) {
    print('Exception when calling RolesApi->apiV3RolesGet: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

basicAuth, oAuth

HTTP request headers

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

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

apiV3RolesIdGet

apiV3RolesIdGet(id)

View role

Fetch an individual role.

Example

import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = RolesApi();
final id = 56; // int | role id

try {
    api_instance.apiV3RolesIdGet(id);
} catch (e) {
    print('Exception when calling RolesApi->apiV3RolesIdGet: $e\n');
}

Parameters

Name Type Description Notes
id int role id

Return type

void (empty response body)

Authorization

basicAuth, oAuth

HTTP request headers

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

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