postProjectsBySlugDeploymentsByIdCompleteWithHttpInfo method
- String slug,
- String id,
- ProjectsComplete projectsComplete
CompleteDeployment is the CI completion hook that flips a queued git deployment to live (or error) once CI has synced the built site to S3.
CompleteDeployment is the CI completion hook that flips a queued git deployment to live (or error) once CI has synced the built site to S3. status must be live or error. On a LIVE completion the public host is claimed FIRST, so the deployment reports the URL it actually OWNS — a CI-supplied liveUrl is a hint that can refine that URL but can never assert a subdomain another tenant holds. keys is the manifest CI just uploaded, relative to the deployment prefix: cloud reconciles the prefix against it so a page deleted from the build actually stops serving. Omit keys and nothing is deleted — the prefix only grows. Reconciliation runs only on a live completion (pruning against a failed build's manifest would delete the site the last good build is still serving) and is best-effort, so a stale leftover never turns a successful deploy into a 500. A live completion is also the one billable moment on the git path; an error completion bills nothing. Scope: a validated principal is required (403 without one). CI authenticates with an org-scoped token through the gateway, so the deployment is resolved within that principal's org and another tenant's slug or deployment id is a 404.
Note: This method returns the HTTP Response.
Parameters:
-
String slug (required): Slug is the project the deployment belongs to, from the path.
-
String id (required): ID is the queued deployment to complete, from the path.
-
ProjectsComplete projectsComplete (required):
Implementation
Future<Response> postProjectsBySlugDeploymentsByIdCompleteWithHttpInfo(String slug, String id, ProjectsComplete projectsComplete,) async {
// ignore: prefer_const_declarations
final path = r'/v1/projects/{slug}/deployments/{id}/complete'
.replaceAll('{slug}', slug)
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody = projectsComplete;
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,
);
}