CloudFront Cache Invalidation API
Use this API to tell Flightcontrol to clear the CloudFront cache for a path or set of paths for a particular service.
API Description
Method | Path |
---|---|
POST | /api/services/invalidateCloudfront |
Headers | |
---|---|
Authorization | [API key] |
Body | ||
---|---|---|
Parameter | Type | Description |
version | number | This is the version ID of the API, currently at version 1. |
params | object: { serviceId: string; paths: string[] } | Type: This contains all the information necessary for your invalidation. See below for more info on this object. |
The params
object
Parameter | Type | Description |
---|---|---|
serviceId | string | This the ID of the service you wish to invalidate, available in the projects page by hovering over the information symbol next to the service name. Click the icon to copy the ID to your clipboard. |
paths | string[] | This is an array of the paths you wish to invalidate. Note: The constraints here are consistent with the AWS path constraints. Particularly, a wildcard symbol * can only be passed at the end of the path. See AWS documentation (opens in a new tab) for more details. |
Full Endpoint URL https://app.flightcontrol.dev/api/services/invalidateCloudfront
Request Body Example
{
"version": 1,
"params": {
"serviceId": "ckysuceua334812r51r83asne",
"paths": ["/*"]
}
}
Response Example
{
"message": "Invalidation Started. Be sure to save your invalidation ID if you would like to check on its status.",
"invalidationId": "cl2kx7acm00003f6gobvidq2i"
}
Response Conditions
Success
Errors