Environment variable drift since the live build
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/example/env/drift';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.deploybase.eu/api/v1/api/v1/projects/example/env/drift \ --header 'Authorization: <Authorization>'Compares the build-targeted environment variables a production build would get now against the set the live deployment was built with. Returns key names only: values and fingerprints never leave the server. recorded is false (and the lists empty) when there is no live deployment or it was built before snapshots were recorded, or was a direct upload. Lists are sorted and never null.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Project ID
Responses
Section titled “ Responses ”OK
object
object
object
Added are keys configured now that the live build did not have.
Changed are keys in both whose value differs.
DeploymentID is the live deployment compared against; null when there is none.
Recorded is false when there is nothing to compare against: no live deployment, or one built before snapshots were recorded (or a direct upload, which has no build). The three lists are then empty, which means “unknown”, not “no drift”.
Removed are keys the live build had that are no longer configured.
Example generated
{ "data": { "added": [ "example" ], "changed": [ "example" ], "deployment_id": "example", "recorded": true, "removed": [ "example" ] }, "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Bad Request
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Not Found
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Internal Server Error
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live 174db30c built