Home

Workflow endpoints
/workflows

Lists all workflows.

Request
GET http://unravel-host:3000/api/v1/workflows
Path parameters

None.

Query parameters

None.

Response body

Name

Type

Description

[No name]

array

JSON structure containing a JSON structure for each workflow

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/workflows" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

{
  "workflow_spark_test_20190626T032742Z": {
    "key": "workflow_spark_test_20190626T032742Z",
    "doc_count": 1,
    "duration_stats": {
      "count": 1,
      "min": 12524,
      "max": 12524,
      "avg": 12524,
      "sum": 12524,
      "sum_of_squares": 156850576,
      "variance": 0,
      "std_deviation": 0,
      "std_deviation_bounds": {
        "upper": 12524,
        "lower": 12524
      }
    }
  }
}
/workflows/missing_sla

Lists workflows with missed SLA.

Request
GET http://unravel-host:3000/api/v1/workflows/missing_sla?from={date}&to={date}
Path parameters

None.

Query parameters

Name

Type

Description

from

string

Start date. Format YYYY-MM-DD

to

string

End date. Format YYYY-MM-DD

Response body
{
  "duration": 0,
  "avgDuration": 0,
  "user": "string",
  "name": "string"
}

Name

Type

Description

[No name]

array

JSON structure containing a JSON structure for each missed SLA

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/workflows/missing_sla?from=2019-02-01&to=2019-03-06" -H  "accept: application/json" -H  "Authorization: JWT token"

Response where there are no missed SLAs:

[ ]

Response where there's one missed SLA:

{
    "Benchmark: Road_Accident_2005-2016": {
       "key": "Benchmark: Road_Accident_2005-2016",
       "doc_count": 565,
       "duration_stats": {
          "count": 565,
          "min": 21000,
          "max": 772000,
          "avg": 174877.8761061947,
          "sum": 98806000,
          "sum_of_squares": 17972790000000,
          "variance": 1227976236.197041,
          "std_deviation": 35042.49186626204,
          "std_deviation_bounds": {
             "upper": 244962.85983871878,
             "lower": 104792.8923736706
           }
        }
    }
}
/workflows/{workflow_id}/annotation

Lists a specific workflow.

Request
GET http://unravel-host:3000/api/v1/workflows/{workflow_id}/annotation
Path parameters

Name

Description

workflow_id

ID of workflow

Query parameters

None.

Response body

Return code upon success: 200

Name

Type

Description

instances

array

JSON structure containing details of each run of the workflow

instanceCompare

array

JSON structure containing a summary of metrics for each run

Note

All timestamps are in Unix epoch time.

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/workflows/annotation" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

{
  instanceCompare: {
					workflowIds: ["20180825T003618Z-8434469366206475039", "20180825T003706Z-8434469366206503807"}
					avgDuration: 27056.8
					avgService: 0.1554950102167776
					avgTotalDfsBytesRead: 298227334.8
					avgTotalDfsBytesWritten: 1524.1
					dtimes: [1535157378000, 1535157426000, 1535157475000, 1535157524000, 1535157572000, 1535157621000,]
					duration: [10881, 34708, 11218, 33382, 11173, 37431, 77868, 9720, 9671, 34516]
					maxDuration: 77868
					......
},
instances: [
			{
			annotation: {@class: "com.unraveldata.annotation.WorkflowInstanceAnnotation", vcoreSeconds: 0, memorySeconds: 0,}
			dt: 1535157378000
			hi: 0
			id: "20180825T003618Z-8434469366206475039"
			nm: "wf-sla-mr-spark"
			signature: "unravel.workflow.name=wf-sla-mr-spark"
			ut: "20180825T003618Z"
			wc: [{ci: "job_1534794873154_4973", ct: "mapred", st: 1535157384745, et: 1535157373534}
				0: {ci: "job_1534794873154_4973", ct: "mapred", st: 1535157384745, et: 1535157373534}
				1: {ci: "application_1534794873154_4974", ct: "spark", st: 1535157384020, et: 1535157394901}
				],
			}....

			]
}