UnifiedViews - Pipeline Execution Services

This section contains topics in relation to the UnifiedViews pipeline execution services.

The following topics help you request pipeline execution information:

UnifiedViews Method - Create a Pipeline Execution

Description

Creates a pipeline execution for one pipeline.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/executions

Content Type

application/json

Request

Supported Method

POST

HTTP Parameters

Parameter

Type

Required

Description

asUser

string

true

Username of the user credentials the execution should be run under.

Example Request

Sample request to run in normal mode:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST --data '{  "asUser" : "http://www.johnadmin.cz" }' http://master:commander@localhost:8080/master/api/1/pipelines/33/executions

Sample request to run in debug mode:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST --data '{ "debugging" : "true", "asUser" : "http://www.johnadmin.cz" }' http://master:commander@localhost:8080/master/api/1/pipelines/33/executions

For UnifiedViews <2.3

For UnifiedViews < 2.3, please use "isDebugging" instead of "debugging"

ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Attribute

Type

Required

Description

id

number

true

ID of the pipeline.

status

string

false

Returns the status of the execution.

Possible values:

  • FINISHED_WARNING

  • FINISHED_SUCCESS

  • QUEUED

  • RUNNING

  • FAILED

  • CANCELLING

  • CANCELLED

orderNumber

string

true

Position in the queue.

start

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

end

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

schedule

string

Possible values: true, false

stop

string

Possible values: true, false

lastChange

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

asUser

string

User who created the execution.

userActorExternalId

string

false

User with viewing permissions or this execution.

debugging

string

Possible values: true, false

Example Response
{
   "id": 321,
   "status": "QUEUED",
   "orderNumber": 1,
   "start": null,
   "end": null,
   "schedule": null,
   "stop": false,
   "lastChange": "2017-03-08T18:12:31.535+0100",
   "asUser": "http://www.johnadmin.cz",
   "userActorExternalId": null,
   "debugging": false
}

UnifiedViews Method - Request One Pipeline Execution

Description

Request a pipeline's execution status.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/executions/{execution_id}

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Example Response

Returns single pipeline execution entry based on its id.

{
    id: 3,
    status: "FINISHED_SUCCESS",
    isDebugging: false,
    orderNumber: 1,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: 12,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
}

UnifiedViews Method - Request all Pipeline Executions

Description

Request all pipelines' execution status.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/executions/

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Returns execution entity:

Attribute

Description

Possible status

QUEUED, RUNNING, CANCELLING, CANCELLED, FAILED, FINISHED_SUCCESS, FINISHED_WARNING

orderNumber

The priority in the queue.

start , end

Real times of pipeline execution start and end.

schedule

id of schedule entity which triggered the execution, if any (null when pipeline execution was created manually by user)

silentMode

(from Java documentation) If true, pipelines run in silent mode and the end of the execution can't be used to trigger a schedule.

stop

(from Java documentation) True if pipeline should or has been stopped on user request.

lastChange

(from Java documentation) Timestamp when this execution was last changed.

Example Response
[
  {
    id: 1,
    status: "FAILED",
    isDebugging: false,
    orderNumber: 55,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: 15,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
  },
  {
    id: 2,
    status: "RUNNING",
    isDebugging: true,
    orderNumber: 98,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: null,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
  },
  {
    id: 3,
    status: "FINISHED_SUCCESS",
    isDebugging: false,
    orderNumber: 1,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: 12,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
  }
]

UnifiedViews Method - Request Last Finished Pipeline Execution

Description

Returns the status of the last pipeline execution that has been finished.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/executions/last

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Request Returns

Returns a single pipeline execution entry, the last one according to its end time.

Only the following statuses are considered:

  • CANCELLED

  • FINISHED_SUCCESS

  • FINISHED_WARNING

  • FAILED

Example Response
{
    id: 3,
    status: "FINISHED_SUCCESS",
    isDebugging: false,
    orderNumber: 1,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: 12,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
}

UnifiedViews Method - Request the Last Running or Queued Pipeline Execution

Description

Request all last running pipeline or queued executions.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/executions/pending

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Response Returns

Returns a single pipeline execution entry, the last one according to its end time.

Only the following statuses are considered:

  • QUEUED

  • RUNNING

  • CANCELLING are selected but presented as RUNNING

Example Response
[{
    id: 3,
    status: "QUEUED",
    isDebugging: false,
    orderNumber: 1,
        start: "2014-08-08T15:15:15.555Z",
    end: "2014-08-08T15:15:15.555Z",
    schedule: 12,
    stop: false,
    lastChange: "2014-08-08T15:15:15.555Z"
}]

UnifiedViews Method - Execute a Pipeline with Parameters

Description

Creates a pipeline execution for one pipeline including parameters.

URL: http://{server}/master/api/1/pipelines/{pipeline_id}/execution

Content Type

application/x-www-form-urlencoded

Request

Supported Method

POST

HTTP Parameters

Parameter

Type

Required

Description

asUser

string

true

Username of the user credentials the execution should be run under.

userid

string

"isDebugging" : true, "parameterList" : [{"key" : "myKey1", "value" : "myValue1"},{"key" : "myKey2", "value" : "myValue2"}

isDebugging

boolean

parameterList

Array of parameters

Example Request

Sample request to run in normal mode:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST --data '{  "asUser" : "http://www.johnadmin.cz" }' http://master:commander@localhost:8080/master/api/1/pipelines/33/executions

Sample request to run in debug mode:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST --data '{ "debugging" : "true", "asUser" : "http://www.johnadmin.cz" }' http://master:commander@localhost:8080/master/api/1/pipelines/33/executions

For UnifiedViews <2.3

For UnifiedViews < 2.3, please use "isDebugging" instead of "debugging"

ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Attribute

Type

Required

Description

id

number

true

ID of the pipeline.

status

string

false

Returns the status of the execution.

Possible values:

  • FINISHED_WARNING

  • FINISHED_SUCCESS

  • QUEUED

  • RUNNING

  • FAILED

  • CANCELLING

  • CANCELLED

orderNumber

string

true

Position in the queue.

start

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

end

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

schedule

string

Possible values: true, false

stop

string

Possible values: true, false

lastChange

string

Values are date and time.

Format: Format: <yyyy-mm-dd>T<hh:mm:ss.ms>Z

asUser

string

User who created the execution.

userActorExternalId

string

false

User with viewing permissions or this execution.

debugging

string

Possible values: true, false

Example Response
{
   "id": 321,
   "status": "QUEUED",
   "orderNumber": 1,
   "start": null,
   "end": null,
   "schedule": null,
   "stop": false,
   "lastChange": "2017-03-08T18:12:31.535+0100",
   "asUser": "http://www.johnadmin.cz",
   "userActorExternalId": null,
   "debugging": false
}