workspaceTriggerRepoWorkflowWithHttpInfo method

Future<Response> workspaceTriggerRepoWorkflowWithHttpInfo(
  1. String org,
  2. String workspace,
  3. String owner,
  4. String repo,
  5. String id, {
  6. Map<String, Object>? requestBody,
})

Performs an HTTP 'POST /v1/organizations/{org}/workspaces/{workspace}/repos/repositories/{owner}/{repo}/workflows/{id}/trigger' operation and returns the Response. Parameters:

Implementation

Future<Response> workspaceTriggerRepoWorkflowWithHttpInfo(String org, String workspace, String owner, String repo, String id, { Map<String, Object>? requestBody, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/organizations/{org}/workspaces/{workspace}/repos/repositories/{owner}/{repo}/workflows/{id}/trigger'
    .replaceAll('{org}', org)
    .replaceAll('{workspace}', workspace)
    .replaceAll('{owner}', owner)
    .replaceAll('{repo}', repo)
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = requestBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}