Validate an EdgeWorkers code bundle

POST https://{{host}}/edgeworkers/v1/validations

Return a list of errors and warnings containing details on how to fix your code bundle. See Validation types. In order to run this operation you need to provide an EdgeWorkers code bundle as a GZIP binary file in the request body, with a Content-Type of application/gzip.

Request Params

KeyDatatypeRequiredDescription
accountSwitchKeystring(Optional) For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"errors":[{"message":"static validation failed : main.js::9:16 SyntaxError: Unexpected identifier.","type":"STATIC_VALIDATION_FAILED"},{"message":"manifest file is invalid","type":"INVALID_MANIFEST"}],"warnings":[{"message":"The EdgeKV access token is still valid but will expire soon.","type":"ACCESS_TOKEN_EXPIRING_SOON"}]}