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
- idstring
Unique id for the object
- servicestring
unique identifier for each system
- versionstring
unique version string, could be a SHA, docker image tags, etc.
- userstring
User responsible for initiating the change
- commentstring
Text field for additional context
- teamstring
Team responsible for initiating the change
- labelsstring
Comma-separated labels useful for filtering.
- custom_metadatastring
Arbitrary UTF-8 encoded JSON for additional metadata
- created_atnumber
Unix epoch second when this object was created.
- environmentstring
Environment in which this service was changed
- descriptionstring
Text field describing the change, whether it's a deploy flag flip, etc.
{"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.
- descriptionstringrequired
Text field describing the change, whether it's a deploy flag flip, etc.
- environmentstringoptional
Environment in which this service was changed
- servicestringoptional
unique identifier for each system
- versionstringoptional
unique version string, could be a SHA, docker image tags, etc.
- userstringoptional
User responsible for initiating the change
- commentstringoptional
Text field for additional context
- teamstringoptional
Team responsible for initiating the change
- labelsstringoptional
Comma-separated labels useful for filtering.
- custom_metadatastringoptional
Arbitrary UTF-8 encoded JSON for additional metadata
- created_atnumberoptional
Unix epoch second when change happened. Default to current time if omitted
Returns
Returns the created object id
if successful, and returns an error otherwise.
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
{"id": "1664f94c-ac6c-42b0-adf8-2e560ff13553"}
Retrieve a change object
Retrieve a change
object using HTTP GET method with id.
No parameters
Returns
Returns a change object if a valid id was provided, and returns an error otherwise.
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
{"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."}