latestOpenAPI 3.0.02026-08-10221235717.8 KB
e21ad140ec3c
public
AutomationRule
Create a new Automation Rule for an Environment.
Items marked as deprecated are still supported (however not recommended) for use and are incompatible with properties of the latest api version. In particular an error is raised if images_filter (deprecated) and artefacts_filter are used in the same payload. The same is true for exclude_images_filter (deprecated) and exclude_artefacts_filter. match and update_to are still supported but will trigger an error if combined with match_ref.
post/orgs/{orgId}/apps/{appId}/envs/{envId}/rules
Path parameters
orgIdstring required
The Organization ID
appIdstring required
The Application ID
envIdstring required
The Environment ID
Request body
Example request
{
"active": true,
"artefacts_filter": [
"http://registry.org/sample-service"
],
"images_filter": [
"sample-service"
],
"match": "^pr-[0-9]+-.*$",
"match_ref": "^refs/heads/pr-[0-9]+-.*$",
"type": "update",
"update_to": "branch"
}Response
The Automation Rule that was created.
Example response
{
"active": true,
"artefacts_filter": [
"http://registry.org/sample-service"
],
"created_at": "2020-06-22T09:37:23.523Z",
"id": "923486d012f20324",
"images_filter": [
"sample-service"
],
"match": "^pr-[0-9]+-.*$",
"match_ref": "^refs/heads/pr-[0-9]+-.*$",
"type": "update",
"update_to": "branch",
"updated_at": "2020-06-22T09:37:23.523Z"
}