postProjectsBySlugPurgeWithHttpInfo method
Flushes the site's edge cache without redeploying anything.
Flushes the site's edge cache without redeploying anything. It invalidates the edge cache-tag site-<org>-<slug> and stamps lastPurgeAt (unix seconds), and it NEVER writes or deletes the S3 origin — the live build keeps serving; only stale copies held at the edge drop, so the next request re-fetches the current artifact from origin. Idempotent, and an edge that is unconfigured or failing is not fatal: lastPurgeAt is still stamped and the answer is still the updated project. Scope: a validated principal is required (403 without one) and the project is resolved within that principal's org, so another tenant's slug is a 404.
Note: This method returns the HTTP Response.
Parameters:
- String slug (required): Slug is the project to act on, from the path. It is unique within the caller's org and nowhere else, so another tenant's slug is a 404.
Implementation
Future<Response> postProjectsBySlugPurgeWithHttpInfo(String slug,) async {
// ignore: prefer_const_declarations
final path = r'/v1/projects/{slug}/purge'
.replaceAll('{slug}', slug);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}