Skip to main content

Change

The change object represents a change in your environment that you want to track and filter and is the primary resource in Regle.

ENDPOINTS



The change object

Attributes
the change object
{
"id": "1664f94c-ac6c-42b0-adf8-2e560ff13553",
"service": "ads-relay",
"version": "0f7c122726fb0821f91758bbb9fee6716ef4aad9",
"user": "Javier Rodriguez",
"comment": "Enhancement: Implement automated backup solutions for critical data.",
"labels": "git-tag=v1.2.3",
"custom_metadata": "{\"deployment_id\":\"20231008-007\",\"environment\":\"production\",\"rollback_available\": true,\"timestamp\":\"2023-10-08T20:00:00\"}",
"created_at": 1696894591,
"environment": "aws/prod-jp-3",
"description": "Deployed database schema changes for the user profile module."
}


Create a change object

Create a change object using HTTP POST method.

Parameters

Returns

Returns the created object id if successful, and returns an error otherwise.

POST /v2/change
curl -s -XPOST \
-H 'Content-Type: application/json' \
-H "X-Regle-ApiKey: $REGLE_API_KEY" \
-d '{
"user": "Javier Rodriguez",
"comment": "Enhancement: Implement automated backup solutions for critical data.",
"environment": "aws/us-west1",
"description": "Deployed to production",
"labels": "git-tag=v1.2.3"
}' \
https://api.regle.dev/v2/change
response
{
"id": "1664f94c-ac6c-42b0-adf8-2e560ff13553"
}


Retrieve a change object

Retrieve a change object using HTTP GET method with id.

Parameters

No parameters

Returns

Returns a change object if a valid id was provided, and returns an error otherwise.

GET /v2/change/:id
curl -s \
-H 'Content-Type: application/json' \
-H "X-Regle-ApiKey: $REGLE_API_KEY" \
https://api.regle.dev/v2/change/1664f94c-ac6c-42b0-adf8-2e560ff13553
response
{
"id": "1664f94c-ac6c-42b0-adf8-2e560ff13553",
"service": "ads-relay",
"version": "0f7c122726fb0821f91758bbb9fee6716ef4aad9",
"user": "Javier Rodriguez",
"comment": "Enhancement: Implement automated backup solutions for critical data.",
"labels": "git-tag=v1.2.3",
"custom_metadata": "{\"deployment_id\":\"20231008-007\",\"environment\":\"production\",\"rollback_available\": true,\"timestamp\":\"2023-10-08T20:00:00\"}",
"created_at": 1696894591,
"environment": "aws/prod-jp-3",
"description": "Deployed database schema changes for the user profile module."
}