postPlatformProjectsByProjectAppsByAppRollbackWithHttpInfo method

Future<Response> postPlatformProjectsByProjectAppsByAppRollbackWithHttpInfo(
  1. String project,
  2. String app,
  3. RollbackReq rollbackReq
)

Goes back to the previous release.

Goes back to the previous release. It redeploys a prior image: the one named by deploymentId, or — with no body — the newest earlier deployment that carries a real built image and did not error, skipping the release currently live. An app with nothing earlier to return to is 400. A rollback is a deploy of an old image, not a rewind: it takes a NEW version number and appends to the history rather than erasing what came after. Both lookups are scoped to this app and org, so another tenant's image can never be rolled in. 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.

  • RollbackReq rollbackReq (required):

Implementation

Future<Response> postPlatformProjectsByProjectAppsByAppRollbackWithHttpInfo(String project, String app, RollbackReq rollbackReq,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/platform/projects/{project}/apps/{app}/rollback'
    .replaceAll('{project}', project)
    .replaceAll('{app}', app);

  // ignore: prefer_final_locals
  Object? postBody = rollbackReq;

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