Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
GET /v3/namespaces/<namespace-id>/apps/{app-id}/workflows/{workflow-id}/runs/{run-id}[/nodes/{node-id}]/token

The request can (optionally) contain a node-id to limit the request to a particular node in workflow.

...

Code Block
{
  "key1": [
      {
        "nodeName": "node1",
        "value": "value1"
      }, {
        "nodeName": "node2",
        "value": "value2"
      }
    ],
  "key2": [
      {
          "nodeName": "node2",
          "value": "v2"
      }
    ]
}

HTTP Responses

Status Codes

Description

200 OK

The query was successfully received and the workflow token was returned in the body

404 Not Found

The app, workflow, run-id, scope or key was not found

500

Internal server error

...

Code Block
GET /v3/namespaces/<namespace-id>/apps/<app-id>/workflows/<workflow-id>/runs/<run-id>/localdatasets

where

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application

workflow-id

Name of the workflow

run-id

UUID of the workflow run

...

Code Block
DELETE /v3/namespaces/<namespace-id>/apps/<app-id>/workflows/<workflow-id>/runs/<run-id>/localdatasets

where

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application

workflow-id

Name of the workflow

run-id

UUID of the workflow run

...

Code Block
GET /v3/namespaces/<namespace-id>/apps/<app-id>/workflows/<workflow-id>/runs/<run-id>/nodes/state

where

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application

workflow-id

Name of the workflow

run-id

UUID of the workflow run

...

Code Block
GET /v3/namespaces/default/apps/Purchase/workflows/PurchaseHistoryWorkflow/runs/53280521-0ce3-11e6-873e-da6a50dd7318/nodes/state

would return results similar to these, pretty-printed for display:

Code Block
{
    "PurchaseHistoryBuilder": {
        "nodeId": "PurchaseHistoryBuilder",
        "nodeStatus": "COMPLETED",
        "runId": "53504da2-0ce3-11e6-92bb-da6a50dd7318"
    },
    "PurchaseReader": {
        "nodeId": "PurchaseReader",
        "nodeStatus": "COMPLETED"
    }
}

Workflow Statistics

These requests provide statistics across successful runs of a workflow, in a time interval, for a succession of runs, or between two specific runs. These requests will help in determining which jobs are responsible for delays or problems.

...

Code Block
GET /v3/namespaces/<namespace-id>/apps/<app-id>/workflows/<workflow-id>/statistics?
  start=<start-time>&end=<end-time>&percentile=<percentile-1>&percentile=<percentile-2>...

where

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application

workflow-id

Name of the workflow

start-time

Start time of runs (in seconds); if not provided, defaults to now (optional)

end-time

End time of runs (in seconds); if not provided, defaults to now-1d (optional)

percentile-1

List of percentiles (each greater than zero and less than 100) to be used for generating statistics; if not provided, defaults to 90 (optional)

...

Code Block
GET /v3/namespaces/default/apps/Purchase/workflows/PurchaseHistoryWorkflow/statistics? start=1441918778&end=1442005182&percentile=80&percentile=90&percentile=95&percentile=99

would return results similar to these, pretty-printed for display:

Code Block
{
    "startTime": 0,
    "endTime": 1442008469,
    "runs": 4,
    "avgRunTime": 7.5,
    "percentileInformationList": [
        {
            "percentile": 80.0,
            "percentileTimeInSeconds": 9,
            "runIdsOverPercentile": [
                "e0cc5b98-58cc-11e5-84a1-8cae4cfd0e64"
            ]
        },
        {
            "percentile": 90.0,
            "percentileTimeInSeconds": 9,
            "runIdsOverPercentile": [
                "e0cc5b98-58cc-11e5-84a1-8cae4cfd0e64"
            ]
        },
        {
            "percentile": 95.0,
            "percentileTimeInSeconds": 9,
            "runIdsOverPercentile": [
                "e0cc5b98-58cc-11e5-84a1-8cae4cfd0e64"
            ]
        },
        {
            "percentile": 99.0,
            "percentileTimeInSeconds": 9,
            "runIdsOverPercentile": [
                "e0cc5b98-58cc-11e5-84a1-8cae4cfd0e64"
            ]
        }
    ],
    "nodes": {
        "PurchaseHistoryBuilder": {
            "avgRunTime": "7.0",
            "99.0": "8",
            "80.0": "8",
            "95.0": "8",
            "runs": "4",
            "90.0": "8",
            "type": "MapReduce"
        }
    }
}

Comparing a Run to Runs Before and After

...

Code Block
GET /v3/namespaces/default/apps/Purchase/workflows/PurchaseHistoryWorkflow/runs/
  1873ade0-58d9-11e5-b79d-8cae4cfd0e64/statistics?limit=10&interval=10s'

would return results similar to these, pretty-printed for display:

Code Block
{
    "startTimes": {
        "1dd36962-58d9-11e5-82ac-8cae4cfd0e64": 1442012523,
        "2523aa44-58d9-11e5-90fd-8cae4cfd0e64": 1442012535,
        "1873ade0-58d9-11e5-b79d-8cae4cfd0e64": 1442012514
    },
    "programNodesList": [
        {
            "programName": "PurchaseHistoryBuilder",
            "workflowProgramDetailsList": [
                {
                    "workflowRunId": "1dd36962-58d9-11e5-82ac-8cae4cfd0e64",
                    "programRunId": "1e1c3233-58d9-11e5-a7ff-8cae4cfd0e64",
                    "programRunStart": 1442012524,
                    "metrics": {
                        "MAP_INPUT_RECORDS": 19,
                        "REDUCE_OUTPUT_RECORDS": 3,
                        "timeTaken": 9,
                        "MAP_OUTPUT_BYTES": 964,
                        "MAP_OUTPUT_RECORDS": 19,
                        "REDUCE_INPUT_RECORDS": 19
                    }
                },
                {
                    "workflowRunId": "1873ade0-58d9-11e5-b79d-8cae4cfd0e64",
                    "programRunId": "188a9141-58d9-11e5-88d1-8cae4cfd0e64",
                    "programRunStart": 1442012514,
                    "metrics": {
                        "MAP_INPUT_RECORDS": 19,
                        "REDUCE_OUTPUT_RECORDS": 3,
                        "timeTaken": 7,
                        "MAP_OUTPUT_BYTES": 964,
                        "MAP_OUTPUT_RECORDS": 19,
                        "REDUCE_INPUT_RECORDS": 19
                    }
                }
            ],
            "programType": "Mapreduce"
        }
    ]
}

Comparing Two Runs

This request compares the metrics of two runs of a workflow:

Code Block
GET /v3/namespaces/<namespace-id>/apps/<app-id>/workflows/<workflow-id>/runs/<run-id>/compare?other-run-id=<other-run-id>

where

Parameter

Description

namespace-id

Namespace ID

app-id

Name of the application

workflow-id

Name of the workflow

run-id

UUID of the workflow run

other-run-id

UUID of the other workflow run to be used in the comparison

...

Code Block
'The other run-id provided was not found : dbd59091-58cb-11e5-a7c6-8cae4cfd0e64' was not found

HTTP Responses

Status Codes

Description

200 OK

The query was successfully received and the statistics were returned in the body in a JSON format

404 Not Found

The app, workflow, run-id, scope, or key was not found

500

Internal server error

...

Code Block
GET /v3/namespaces/default/apps/Purchase/workflows/PurchaseHistoryWorkflow/runs/14b8710a-58cd-11e5-98ca-8cae4cfd0e64/compare?other-run-id=e0cc5b98-58cc-11e5-84a1-8cae4cfd0e64

would return results similar to these, pretty-printed for display:

...