postPlatformProjectsByProjectAppsByAppPromoteWithHttpInfo method

Future<Response> postPlatformProjectsByProjectAppsByAppPromoteWithHttpInfo(
  1. String project,
  2. String app,
  3. PromoteReq promoteReq
)

Promotes an already-built release to the app.

Promotes an already-built release to the app. It redeploys an image that already exists — named either by deploymentId, which promotes that deployment's exact built image, or by tag, resolved the same way a deploy resolves one. One of the two is required; neither is 400. Promotion never builds. A deployment that carries no built image cannot be promoted and is 400, and a deployment id outside this app is 404. It runs through the same deploy core as everything else, so it takes a NEW version number and is subject to the same per-org concurrency cap. Requires a validated principal; 403 without one.

Note: This method returns the HTTP Response.

Parameters:

  • String project (required): Project is the project the application lives under, from the path.

  • String app (required): App is the application's slug, from the path.

  • PromoteReq promoteReq (required):

Implementation

Future<Response> postPlatformProjectsByProjectAppsByAppPromoteWithHttpInfo(String project, String app, PromoteReq promoteReq,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/platform/projects/{project}/apps/{app}/promote'
    .replaceAll('{project}', project)
    .replaceAll('{app}', app);

  // ignore: prefer_final_locals
  Object? postBody = promoteReq;

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