Skip to content

Latest commit

 

History

History
109 lines (75 loc) · 4 KB

CustomActionsApi.md

File metadata and controls

109 lines (75 loc) · 4 KB

openproject_dart_sdk.api.CustomActionsApi

Load the API package

import 'package:openproject_dart_sdk/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
apiV3CustomActionsCustomActionIdExecutePost POST /api/v3/custom_actions/{custom_action_id}/execute Execute custom action
apiV3CustomActionsCustomActionIdGet GET /api/v3/custom_actions/{custom_action_id} View custom action

apiV3CustomActionsCustomActionIdExecutePost

apiV3CustomActionsCustomActionIdExecutePost(customActionId, inlineObject)

Execute custom action

A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion.

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 = CustomActionsApi();
final customActionId = 56; // int | The id of the custom action to execute
final inlineObject = InlineObject(); // InlineObject | 

try {
    api_instance.apiV3CustomActionsCustomActionIdExecutePost(customActionId, inlineObject);
} catch (e) {
    print('Exception when calling CustomActionsApi->apiV3CustomActionsCustomActionIdExecutePost: $e\n');
}

Parameters

Name Type Description Notes
customActionId int The id of the custom action to execute
inlineObject InlineObject [optional]

Return type

void (empty response body)

Authorization

basicAuth, oAuth

HTTP request headers

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

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

apiV3CustomActionsCustomActionIdGet

apiV3CustomActionsCustomActionIdGet(customActionId)

View custom action

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 = CustomActionsApi();
final customActionId = 56; // int | The id of the custom action to fetch

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

Parameters

Name Type Description Notes
customActionId int The id of the custom action to fetch

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]