Reference
CloudFront
CloudFront Cache Invalidation

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

MethodPath
POST/api/services/invalidateCloudfront
Headers
Authorization[API key]
Body
ParameterTypeDescription
versionnumberThis is the version ID of the API, currently at version 1.
paramsobject: { 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

ParameterTypeDescription
serviceIdstringThis 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.
pathsstring[]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