Workflow Job Template Workflow Node List

post

/api/v2/workflow_job_templates/{id}/workflow_nodes/

Workflow nodes reference templates to execute and define the ordering in which to execute them. After a job in this workflow finishes, the subsequent actions are to:

  • run nodes contained in "failure_nodes" or "always_nodes" if job failed
  • run nodes contained in "success_nodes" or "always_nodes" if job succeeded

The workflow job is marked as successful if all of the jobs running as a part of the workflow job have completed, and the workflow job has not been canceled. Even if a job within the workflow has failed, the workflow job will not be marked as failed.

Create a Workflow Job Template Node for a Workflow Job Template:

Make a POST request to this resource with the following workflow job template node fields to create a new workflow job template node associated with this workflow job template.

  • extra_data: (json, default={})
  • inventory: Inventory applied as a prompt, assuming job template prompts for inventory (id, default=``)
  • scm_branch: (string, default="")
  • job_type: (choice)
    • None: --------- (default)
    • "": ---------
    • run: Run
    • check: Check
  • job_tags: (string, default="")
  • skip_tags: (string, default="")
  • limit: (string, default="")
  • diff_mode: (boolean, default=None)
  • verbosity: (choice)

    • None: --------- (default)
    • 0: 0 (Normal)
    • 1: 1 (Verbose)
    • 2: 2 (More Verbose)
    • 3: 3 (Debug)
    • 4: 4 (Connection Debug)
    • 5: 5 (WinRM Debug)
  • unified_job_template: (id, default=``)

  • all_parents_must_converge: If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node (boolean, default=False)

  • identifier: An identifier for this node that is unique within its workflow. It is copied to workflow job nodes corresponding to this node. (string, default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : schema
Example:
{
    "unified_job_template":3
}
Back to Top

Response

Supported Media Types

201 Response

Body
Example Response (application/json)
{
    "all_parents_must_converge":false,
    "always_nodes":[
    ],
    "created":"2018-02-01T08:00:00.000000Z",
    "diff_mode":null,
    "extra_data":{
    },
    "failure_nodes":[
    ],
    "id":1,
    "identifier":"36256190-479a-480e-a550-fa9821634f6f",
    "inventory":null,
    "job_tags":null,
    "job_type":null,
    "limit":null,
    "modified":"2018-02-01T08:00:00.000000Z",
    "related":{
        "always_nodes":"/api/v2/workflow_job_template_nodes/1/always_nodes/",
        "create_approval_template":"/api/v2/workflow_job_template_nodes/1/create_approval_template/",
        "credentials":"/api/v2/workflow_job_template_nodes/1/credentials/",
        "failure_nodes":"/api/v2/workflow_job_template_nodes/1/failure_nodes/",
        "success_nodes":"/api/v2/workflow_job_template_nodes/1/success_nodes/",
        "unified_job_template":"/api/v2/job_templates/3/",
        "workflow_job_template":"/api/v2/workflow_job_templates/1/"
    },
    "scm_branch":null,
    "skip_tags":null,
    "success_nodes":[
    ],
    "summary_fields":{
        "unified_job_template":{
            "description":"",
            "id":3,
            "name":"test-job_template",
            "unified_job_type":"job"
        },
        "workflow_job_template":{
            "description":"",
            "id":1,
            "name":"test-workflow_job_template"
        }
    },
    "type":"workflow_job_template_node",
    "unified_job_template":3,
    "url":"/api/v2/workflow_job_template_nodes/1/",
    "verbosity":null,
    "workflow_job_template":1
}

400 Response

Body
Example Response (application/json)
{
    "limit":[
        "Field is not configured to prompt on launch."
    ]
}
Back to Top