UnifiedViews - Pipeline Schedule Services

This section contains all topics in relation to scheduling pipeline execution in UnifiedViews.

The following topics are contained in this section:

UnifiedViews Method - Request One Pipeline Schedule Event

Description

Request one scheduled event (with the given ID) for the given pipeline ID.

URL: http://{host:port}/master/api/1/pipelines/{pipeline_id}/schedules/{id}

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Attribute

Type

Required

Description

id

number

true

ID of the requested pipeline.

description

string

false

A description of the pipeline schedule details.

enabled

string

true

Shows if scheduler is enabled or not.

Possible return values: true/false

scheduleType

string

false

According to the available schedule types, displays the respective one defined for the current schedule.

firstExecution

date/time

true

Returns the date and time set for the respective pipeline execution schedule's first run.

lastExecution

date/time

false

Returns the date and time set for the respective pipeline execution schedule's last run.

If not set, return value will be: 'null'

nextExecution

date/time

false

Returns the date and time set for the respective pipeline execution schedule's next run.

If not set, return value will be: 'null'

afterPipelines

string

false

Returns the IDs or names of pipelines that are scheduled to finish running before the execution of the current one.

justOnce

string

false

Returns if the current pipeline schedule should be executed just once.

Possible values: true/false

period

string

false

Duration of the execution. 'null' for none.

periodUnit

string

false

Allowed values:

MINUTE | HOUR | DAY | WEEK | MONTH | YEAR or null

Example Response
{
    id: 6,
    description: "Runs it just once, had not run till now",
    enabled: false,
    scheduleType: "PERIODICALLY",
    firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: null,
    nextExecution: null,
    afterPipelines: null,
    justOnce: true,
    period: null,
    periodUnit: null,
}

UnifiedViews Method - Request All Pipeline Schedule Events

Description

Get all scheduled events for the given pipeline ID.

URL: http://{host:port}/master/api/1/pipelines/{pipeline_id}/schedules/

Content Type

application/json

Request

Supported Method

GET

ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Attribute

Type

Required

Description

id

number

true

ID of the requested pipeline.

description

string

false

A description of the pipeline schedule details.

enabled

string

true

Shows if scheduler is enabled or not.

Possible return values: true/false

scheduleType

string

false

According to the available schedule types, displays the respective one defined for the current schedule.

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

Available types:

  • PERIODICALLY: at certain intervals schedule will be executed and the pipeline be put into the queue.

  • AFTER_PIPELINE: at certain intervals schedule will be executed, after other pipelines have finished running, and the pipeline be put into the queue.

firstExecution

string

true

Returns the date and time set for the respective pipeline execution schedule's first run.

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

lastExecution

string

false

Returns the date and time set for the last time the respective pipeline schedule was triggered.

If not set, return value will be: 'null'

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

nextExecution

string

false

Returns the date and time set for the respective pipeline execution schedule's next run.

If not set, return value will be: 'null'

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

afterPipelines

number

false

Returns the IDs or names of pipelines that are scheduled to finish running before the execution of the current one.

justOnce

string

false

Returns if the current pipeline schedule should be executed just once.

Possible values: true/false

period

number

false

Duration of the execution. 'null' for none.

periodUnit

string

false

Allowed values:

MINUTE | HOUR | DAY | WEEK | MONTH | YEAR or null

[
  { 
    id: 1,
    description: "Runs it daily",
    enabled: true,
    scheduleType: "PERIODICALLY",
    firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: "2014-08-08T15:15:15.555Z",
    nextExecution: "2014-08-08T15:15:15.555Z",
    afterPipelines: null,
    justOnce: false,
    period: 1,
    periodUnit: "DAY"
  },
  { 
    id: 2,
    description: "Runs the pipeline weekly",
    enabled: true,
    scheduleType: "PERIODICALLY",
    firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: "2014-08-08T15:15:15.555Z",
    nextExecution: "2014-08-08T15:15:15.555Z",
    afterPipelines: null,
    justOnce: false,
    period: 1,
    periodUnit: "WEEK"
  },
  {
    id: 3,
    description: "Runs it just once",
    enabled: false,
    scheduleType: "PERIODICALLY",
    firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: "2014-08-08T15:15:15.555Z",
    nextExecution: null,
    afterPipelines: null,
    justOnce: true,
    period: null,
    periodUnit: null,
  },
  {
    id: 4,
    description: "Runs after other pipelines",
    enabled: true,
    scheduleType: "AFTER_PIPELINE",
    firstExecution: null,
    lastExecution: "2014-08-08T15:15:15.555Z",
    nextExecution: null,
    afterPipelines: [15, 54],
    justOnce: null,
    period: null,
    periodUnit: null,
  },
  {
    id: 5,
    description: "Runs every 6 minutes",
    enabled: true,
    scheduleType: "PERIODICALLY",
        firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: "2014-08-08T15:15:15.555Z",
    nextExecution: "2014-08-08T15:15:15.555Z",
    afterPipelines: null,
    justOnce: false,
    period: 6,
    periodUnit: "MINUTE",
 },
 {
    id: 6,
    description: "Runs it just once, had not run till now",
    enabled: false,
    scheduleType: "PERIODICALLY",
    firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: null,
    nextExecution: "2014-08-08T15:15:15.555Z",
    afterPipelines: null,
    justOnce: true,
    period: null,
    periodUnit: null,
  },
]

Returns list of all pipeline schedule entries.

firstExecution is the time when the pipeline will run first time based on this schedule

lastExecution is the time when the schedule was triggered last time, the pipeline was added to queue of waiting/running pipelines, it is not the time when the pipeline exec started, nor finished.

For Schedule there are consistency criteria:

  • Schedule is PERIODICALLY type

    • justOnce = true

      • enabled = true (the pipeline will run in future)

        • firstExecution = time when the pipeline will run in future

        • lastExecution = null (had not run yet)

        • nextExecution = null (had run already), or date - same as firstExecution (hadn't run)

      • enabled = false (the schedule was either not enabled or the pipeline has been executed already)

        • firtstExecution = time, when the pipeline was intended to start.

        • nextExecution = null

          • lastExecution = null (had not run yet), user had to disable schedule before it could start for the first time

          • lastExecution = some date (had run), backend disabled the schedule to prevent running it again (to satisfy just once requirement)

      • afterPipelines = null

      • period = null

      • periodUnit = null

    • justOnce = false

      • enabled = true | false (if schedule is not enabled, it is ignored by UV, pipeline execution is not triggered by this schedule)

      • firstExecution = time, which user specified when the pipeline execution should happen by this schedule for the first time

      • lastExecution = time, when the pipeline execution was triggered by this schedule (not by user, or other schedule)

      • nextExecution = time, next execution should happen

      • afterPipelines = undefined (null, empty array, ignore it)

      • period = int - each period times

      • periodUnit = MINUTE | HOUR | DAY | WEEK | MONTH | YEAR

  • Schedule is AFTER_PIPELINE type

    • justOnce = null

    • enabled = true | false (if schedule is not enabled, it is ignored by UV, pipeline execution is not triggered by this schedule)

    • firstExecution = null

    • lastExecution = null (pipeline had not run yet) or date of last execution which was triggered by this schedule

    • nextExecution = null

    • afterPipelines = array of other pipelines IDs , pipeline is run immediately after any of the pipelines in the array

    • period = null

    • periodUnit = null

UnifiedViews Method - Create a Pipeline Schedule

Description

Creates a schedule for a pipeline.

URL: http://{host:port}/master/api/1/pipelines/{pipeline_id}/schedules/

Content Type

application/json

Request

Supported Method

POST

HTTP Parameters

Parameter

Type

Required

Description

id

number

true

ID of the pipeline.

description

string

false

A description of the pipeline schedule details.

enabled

string

true

Enable the schedule.

Possible return values: true/false

scheduleType

string

false

Define the schedule type for the current schedule.

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

Available types:

  • PERIODICALLY: at certain intervals schedule will be executed and the pipeline be put into the queue.

  • AFTER_PIPELINE: at certain intervals schedule will be executed, after other pipelines have finished running, and the pipeline be put into the queue.

firstExecution

string

true

Set the date and time set for the respective schedule's first run.

afterPipelines

number

false

Sets the IDs or names of pipelines that are scheduled to finish running before the execution of the current one.

period

number

false

Duration of the execution. 'null' for none.

periodUnit

string

false

Allowed values:

MINUTE | HOUR | DAY | WEEK | MONTH | YEAR or 'null'

Example Request
{
    description: "Runs after other pipelines",
    justOnce: false,
    enabled: false,
        firstExecution: "2014-08-08T15:15:15.555Z",
        afterPipelines: [15, 54],
    period: null,
    periodUnit: null,
}
ResponseContent-Type

application/json

Status: 200 - OK

Response Attributes

Attribute

Type

Required

Description

id

number

true

ID of the requested pipeline.

description

string

false

A description of the pipeline schedule details.

enabled

string

true

Shows if scheduler is enabled or not.

Possible return values: true/false

scheduleType

string

false

According to the available schedule types, displays the respective one defined for the current schedule.

firstExecution

string

true

Returns the date and time set for the respective pipeline execution schedule's first run.

lastExecution

string

false

Returns the date and time set for the last time the respective pipeline schedule was triggered.

If not set, return value will be: 'null'

nextExecution

string

false

Returns the date and time set for the respective pipeline execution schedule's next run.

If not set, return value will be: 'null'

afterPipelines

string

false

Returns the IDs or names of pipelines that are scheduled to finish running before the execution of the current one.

justOnce

string

false

Returns if the current pipeline schedule should be executed just once.

Possible values: true/false

period

number

false

Duration of the execution. 'null' for none.

periodUnit

string

false

Possible values:

MINUTE | HOUR | DAY | WEEK | MONTH | YEAR or null

Example Response

Returns the entity in its new version.

{
    id: 4,
    description: "Runs after other pipelines",
    justOnce: false,
    enabled: false,
        firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: null,
    nextExecution: null,
    afterPipelines: [15, 54],
    period: null,
    periodUnit: null,
}

UnifiedViews Method - Edit a Pipeline Schedule

Description

Change values for an existing pipeline execution schedule.

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

Content Type

application/json

Request

Supported Method

POST

HTTP Parameters

Parameter

Type

Required

Description

id

number

true

ID of the pipeline.

description

string

false

A description of the pipeline schedule details.

enabled

string

true

Enable the schedule.

Possible return values: true/false

scheduleType

string

false

Define the schedule type for the current schedule.

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

Available types:

  • PERIODICALLY: at certain intervals schedule will be executed and the pipeline be put into the cue.

  • AFTER_PIPELINE: at certain intervals schedule will be executed, after other pipelines have finished running, and the pipeline be put into the cue.

firstExecution

date/time

true

Set the date and time set for the respective schedule's first run.

afterPipelines

number

false

Sets the IDs or names of pipelines that are scheduled to finish running before the execution of the current one.

period

number

false

Duration of the execution. 'null' for none.

periodUnit

string

false

Allowed values:

MINUTE | HOUR | DAY | WEEK | MONTH | YEAR or 'null'

Example Request
{
    id: 4,
    description: "Runs after other pipelines",
    justOnce: false,
    enabled: false,
        firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: null,
    afterPipelines: [15, 54],
    period: null,
    periodUnit: null,
}
ResponseContent-Type

application/json

Status: 200 - OK

Example Response

Returns the entity in its new version:

{
    id: 4,
    description: "Runs after other pipelines",
    justOnce: false,
    enabled: false,
        firstExecution: "2014-08-08T15:15:15.555Z",
    lastExecution: null,
    nextExecution: null,
    afterPipelines: [15, 54],
    period: null,
    periodUnit: null,
}