Workflow Rules

Overview

This API defines workflow rules for auto-scaling and monitoring the health of the BIG-IPs.

REST Endpoint: /mgmt/cm/shared/policymgmt/workflow-rules

Requests

GET /mgmt/cm/shared/policymgmt/workflow-rules/<name>

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
workflowRuleName string Name of the workflow rule
workflowRuleDescription string Description of the workflow rule name
targetWorkflowUri string The uri of the task that will get executed
workflowParameters object The parameters that will be passed to the target workflow uri
     parameters object The parameters that will be passed to the target workflow uri
alertRuleReference reference The reference of the alert rule
     link string URI link of the reference.
sendEmail boolean Should email be sent when alerts are created
sendEmailContacts array_of_strings Email addresses to whom emails should be sent
sendSNMP boolean Should SNMP trap be triggered when alerts are created

Permissions

Role Allow
Application_Editor Yes

POST /mgmt/cm/shared/policymgmt/workflow-rules

Request Parameters

Name Type Required Description
workflowRuleName string False Name of the workflow rule
workflowRuleDescription string False Description of the workflow rule name
targetWorkflowUri string False The uri of the task that will get executed
workflowParameters object False The parameters that will be passed to the target workflow uri
     parameters object False The parameters that will be passed to the target workflow uri
alertRuleReference reference False The reference of the alert rule
     link string True URI link of the reference.
sendEmail boolean False Should email be sent when alerts are created
sendEmailContacts array_of_strings False Email addresses to whom emails should be sent
sendSNMP boolean False Should SNMP trap be triggered when alerts are created

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
workflowRuleName string Name of the workflow rule
workflowRuleDescription string Description of the workflow rule name
targetWorkflowUri string The uri of the task that will get executed
workflowParameters object The parameters that will be passed to the target workflow uri
     parameters object The parameters that will be passed to the target workflow uri
alertRuleReference reference The reference of the alert rule
     link string URI link of the reference.
sendEmail boolean Should email be sent when alerts are created
sendEmailContacts array_of_strings Email addresses to whom emails should be sent
sendSNMP boolean Should SNMP trap be triggered when alerts are created

Permissions

Role Allow
Application_Editor Yes

PATCH /mgmt/cm/shared/policymgmt/workflow-rules/<name>

Request Parameters

Name Type Required Description
workflowRuleName string False Name of the workflow rule
workflowRuleDescription string False Description of the workflow rule name
targetWorkflowUri string False The uri of the task that will get executed
workflowParameters object False The parameters that will be passed to the target workflow uri
     parameters object False The parameters that will be passed to the target workflow uri
alertRuleReference reference False The reference of the alert rule
     link string True URI link of the reference.
sendEmail boolean False Should email be sent when alerts are created
sendEmailContacts array_of_strings False Email addresses to whom emails should be sent
sendSNMP boolean False Should SNMP trap be triggered when alerts are created

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
workflowRuleName string Name of the workflow rule
workflowRuleDescription string Description of the workflow rule name
targetWorkflowUri string The uri of the task that will get executed
workflowParameters object The parameters that will be passed to the target workflow uri
     parameters object The parameters that will be passed to the target workflow uri
alertRuleReference reference The reference of the alert rule
     link string URI link of the reference.
sendEmail boolean Should email be sent when alerts are created
sendEmailContacts array_of_strings Email addresses to whom emails should be sent
sendSNMP boolean Should SNMP trap be triggered when alerts are created

Permissions

Role Allow
Application_Editor Yes

DELETE /mgmt/cm/shared/policymgmt/workflow-rules/<name>

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
workflowRuleName string Name of the workflow rule
workflowRuleDescription string Description of the workflow rule name
targetWorkflowUri string The uri of the task that will get executed
workflowParameters object The parameters that will be passed to the target workflow uri
     parameters object The parameters that will be passed to the target workflow uri
alertRuleReference reference The reference of the alert rule
     link string URI link of the reference.
sendEmail boolean Should email be sent when alerts are created
sendEmailContacts array_of_strings Email addresses to whom emails should be sent
sendSNMP boolean Should SNMP trap be triggered when alerts are created

Permissions

Role Allow
Application_Editor No

Examples

List a workflow rule

GET /mgmt/cm/shared/policymgmt/workflow-rules/<name>

Response

HTTP/1.1 200 OK
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

List all workflow rules

GET /mgmt/cm/shared/policymgmt/workflow-rules

Response

HTTP/1.1 200 OK
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

Create a workflow rule

POST /mgmt/cm/shared/policymgmt/workflow-rules
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

Response

HTTP/1.1 200 OK
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

Edit a workflow rule

PATCH /mgmt/cm/shared/policymgmt/workflow-rules/<name>
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

Response

HTTP/1.1 200 OK
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}

Delete a workflow rule

DELETE /mgmt/cm/shared/policymgmt/workflow-rules/<name>

Response

HTTP/1.1 200 OK
{
    "workflowRuleName": "ssg-workflow-rule",
    "workflowRuleDescription": "This workflow rule is a SSG workflow rule",
    "targetWorkflowUri": "https://localhost/mgmt/cm/cloud/tasks/handle-scaling-alert",
    "workflowParameters": {
        "parameters": {
        }
    },
    "alertRuleReference": {
        "link": "https://localhost/mgmt/shared/foo/bar/866cfd8a-4d03-48e9-ba94-bb21a4bc2346"
    },
    "sendEmail": true,
    "sendEmailContacts": "demo@f5.com, demo2@f5.com",
    "sendSNMP": true
}