Skip to main content

Disable rule

POST/api/automation/rules/{ruleId}/disable
Administrator

Read more: RESTSource: AutomationRuleApiController#disable(opens in new tab)

Path parameters​

NameTypeRequiredNotes
ruleIdstring (uuid)Required

Response​

Success: 200

FieldTypeRequiredNotes
idstring (uuid)Optional
namestringOptional
triggerTypeenum TriggerTypeOptionalRELEASE_PUBLISHEDMANUALSCHEDULED_CRONUPCOMING_RELEASE_REMINDEREXTERNAL_WEBHOOK
projectIdstring (uuid)Optional
projectNamestringOptional
triggerReleaseIdstring (uuid)Optional
cronExpressionstringOptional
cronTimeZonestringOptional
nextFireAtstring (date-time)Optional
reminderDaysBeforeintegerOptional
webhookPathstringOptional
webhookSecretConfiguredbooleanOptional
webhookSecretstringOptional
enabledbooleanOptional
createdAtstring (date-time)Optional
updatedAtstring (date-time)Optional
actionsarray of AutomationActionViewOptional
actions[].idstring (uuid)Optional
actions[].positionintegerOptional
actions[].actionTypeenum ActionTypeOptionalGITHUB_RELEASESLACKEMAILPUBLIC_CHANGELOGNOTIONCONFLUENCEMICROSOFT_TEAMSZENDESK
actions[].audienceIdstring (uuid)Optional
actions[].audienceNamestringOptional
actions[].languagestringOptional
actions[].recipientsstringOptional
actions[].parentPageIdstringOptional
actions[].siteUrlstringOptional
actions[].emailstringOptional
actions[].spaceIdstringOptional
actions[].subdomainstringOptional
actions[].clientIdstringOptional
actions[].sectionIdstringOptional
actions[].userSegmentIdstringOptional
actions[].secretConfiguredbooleanOptional
gitHubSourceMissingbooleanOptional
deliversRetiredAudiencebooleanOptional

Errors​

StatusCodeApplies to
400validation_faileda field is missing or out of rangeAny endpoint
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
401authentication_requiredno sessionAny endpoint
403access_deniedan administrator endpoint, or a missing or stale CSRF tokenAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400, 404, 409See the guideAutomation 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/disable" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN"

Response

200

Example

{
  "id": "<uuid>",
  "name": "<string>",
  "triggerType": "RELEASE_PUBLISHED",
  "projectId": "<uuid>",
  "projectName": "<string>",
  "triggerReleaseId": "<uuid>",
  "cronExpression": "<string>",
  "cronTimeZone": "<string>",
  "nextFireAt": "<date-time>",
  "reminderDaysBefore": 0,
  "webhookPath": "<string>",
  "webhookSecretConfigured": false,
  "webhookSecret": "<string>",
  "enabled": false,
  "createdAt": "<date-time>",
  "updatedAt": "<date-time>",
  "actions": [
    {
      "id": "<uuid>",
      "position": 0,
      "actionType": "GITHUB_RELEASE",
      "audienceId": "<uuid>",
      "audienceName": "<string>",
      "language": "<string>",
      "recipients": "<string>",
      "parentPageId": "<string>",
      "siteUrl": "<string>",
      "email": "<string>",
      "spaceId": "<string>",
      "subdomain": "<string>",
      "clientId": "<string>",
      "sectionId": "<string>",
      "userSegmentId": "<string>",
      "secretConfigured": false
    }
  ],
  "gitHubSourceMissing": false,
  "deliversRetiredAudience": false
}