postAutoFlowsByIdVersionsWithHttpInfo method

Future<Response> postAutoFlowsByIdVersionsWithHttpInfo(
  1. String id,
  2. CreateVersionIn createVersionIn
)

Adds a new DRAFT version to a flow.

Adds a new DRAFT version to a flow. The version is created invalid unless it carries a trigger, and it does not become the running version until it is published (PATCH the flow's publishedVersionId) or becomes the latest.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): ID is the flow to add a version to, from the path.

  • CreateVersionIn createVersionIn (required):

Implementation

Future<Response> postAutoFlowsByIdVersionsWithHttpInfo(String id, CreateVersionIn createVersionIn,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/auto/flows/{id}/versions'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = createVersionIn;

  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,
  );
}