Execute rule
POST
/api/automation/rules/{ruleId}/executeAdministrator
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
ruleId | string (uuid) | Required |
Request body
application/json
| Field | Type | Required | Notes |
|---|---|---|---|
releaseId | string (uuid) | Required | |
requestId | string (uuid) | Optional |
Response
Success: 202
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | Optional | |
ruleId | string (uuid) | Optional | |
ruleName | string | Optional | |
releaseId | string (uuid) | Optional | |
releaseVersion | string | Optional | |
triggerType | enum TriggerType | Optional | RELEASE_PUBLISHEDMANUALSCHEDULED_CRONUPCOMING_RELEASE_REMINDEREXTERNAL_WEBHOOK |
requestId | string (uuid) | Optional | |
initiatorName | string | Optional | |
status | enum ExecutionStatus | Optional | PENDINGRUNNINGSUCCEEDEDFAILEDUNKNOWNCANCELLEDSKIPPED |
cancellationRequested | boolean | Optional | |
createdAt | string (date-time) | Optional | |
startedAt | string (date-time) | Optional | |
completedAt | string (date-time) | Optional | |
actions | array of AutomationActionRunView | Optional | |
actions[].id | string (uuid) | Optional | |
actions[].position | integer | Optional | |
actions[].actionType | enum ActionType | Optional | GITHUB_RELEASESLACKEMAILPUBLIC_CHANGELOGNOTIONCONFLUENCEMICROSOFT_TEAMSZENDESK |
actions[].audienceName | string | Optional | |
actions[].language | string | Optional | |
actions[].status | enum ExecutionStatus | Optional | PENDINGRUNNINGSUCCEEDEDFAILEDUNKNOWNCANCELLEDSKIPPED |
actions[].externalReference | string | Optional | |
actions[].errorCode | string | Optional | |
actions[].attempts | integer | Optional | |
actions[].startedAt | string (date-time) | Optional | |
actions[].completedAt | string (date-time) | Optional |
Errors
| Status | Code | Applies to |
|---|---|---|
400 | validation_faileda field is missing or out of range | Any endpoint |
400 | malformed_requestthe body cannot be read | Any endpoint |
400 | invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUID | Any endpoint |
401 | authentication_requiredno session | Any endpoint |
403 | access_deniedan administrator endpoint, or a missing or stale CSRF token | Any endpoint |
404 | not_foundno such address | Any endpoint |
405 | method_not_allowedthe address does not take that method | Any endpoint |
415 | unsupported_media_typethe address does not read a body of that type | Any endpoint |
500 | internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind it | Any endpoint |
400, 404, 409 | See the guide | Automation area |
Request
bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X POST "http://localhost:8080/api/automation/rules/$RULE_ID/execute" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"releaseId": "<uuid>",
"requestId": "<uuid>"
}'
The request body is an example built from the schema; replace every placeholder.
Response
202Example
{
"id": "<uuid>",
"ruleId": "<uuid>",
"ruleName": "<string>",
"releaseId": "<uuid>",
"releaseVersion": "<string>",
"triggerType": "RELEASE_PUBLISHED",
"requestId": "<uuid>",
"initiatorName": "<string>",
"status": "PENDING",
"cancellationRequested": false,
"createdAt": "<date-time>",
"startedAt": "<date-time>",
"completedAt": "<date-time>",
"actions": [
{
"id": "<uuid>",
"position": 0,
"actionType": "GITHUB_RELEASE",
"audienceName": "<string>",
"language": "<string>",
"status": "PENDING",
"externalReference": "<string>",
"errorCode": "<string>",
"attempts": 0,
"startedAt": "<date-time>",
"completedAt": "<date-time>"
}
]
}