Retrieving Execution Plans -- API


Synthetic Blackouts in versions 11.3.02 and later
  • Starting from version 11.3.02, the Blackout configuration is no longer part of the Execution Plan APIs. You can use the dedicated Synthetic Blackout and Synthetic Time Frames APIs for that purpose.
  • If you are using version 11.3.01 or earlier, you can continue to use the Execution Plan APIs to access the Blackouts.

The GET method of the executionplans API retrieves the details of one or more Execution Plans.

 

Before you begin

You must obtain an authToken by using the login API. The token authenticates the user performing the operation. For details, see TSWS authentication.

Synthetic configuration APIs

Notes:

  • If you have upgraded to version 11.3.02, you can access the Synthetic Blackout and Synthetic Time Frames APIs listed in this table.
  • If you are using version 11.3.01 or earlier, you can continue to use the Execution Plan APIs to access the Blackouts.
API
Method
Description
Applications

GET
Retrieve the details of applications
PUT
Update an existing application
POST
Create a new application
DELETE
Delete an application
Execution Plans

GET
Retrieve the details of Execution Plans
PUT
DELETE
Delete an Execution Plan
Scripts
GET
Retrieve the details of scripts
Locations
GET
Retrieve the details of all locations
Blackouts
POST
Retrieve the details of Blackouts
PUT
POST
Activate the Blackout
POST
Deactivate the Blackout
POST
Delete a Blackout
Time Frames
POST
Retrieve the details of Time Frames
PUT
POST
Delete Time Frames
 

To retrieve one or more Execution Plans (applicable to versions 11.3.02 and later)

Click here to expand for more information

The  executionplan  API uses the GET method to retrieve Execution Plans. Use the following request syntax:

For retrieving a single Execution Plan

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getById?executionPlanId=<EPID>

 For retrieving all Execution Plans

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getAll

 For retrieving all  Execution Plans for a single application

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getAllByApplication?applicationId=<AID>

In the above examples:

  • <PresentationServerHostName>  indicates the host name of the TrueSight Presentation Server.
  • <EPID> indicates the ID of the Execution Plan.
  • <AID> indicates the ID of the application on the Presentation Server (not the synthetic application ID).

Sample request with REST client

After accessing the REST client, perform the following steps:

  1. Enter the URL for the API. 
    An example of a request for a single Execution Plan is:

    https://localhost/tsws/10.0/api/appvis/synthetic/api/executionplans/getById?executionPlanId=112

  2. Add a new header row and select Authorization as the header type.
  3. Enter the text authToken followed by the authToken generated through the login API. 
  4. Click Send.

Request parameters

Element

Description

authToken

Value of authToken

Query parameters

executionPlanId

ID of the Execution Plan (for retrieving a single Execution Plan only)

applicationId

ID of the application on the Presentation Server (not the synthetic application ID) (for retrieving all Execution Plans for an application only)

Response

The following sample is the JSON code returned by the API for a single Execution Plan.

"data""{
"
executionPlanId": "112",
"
blackOuts": [{
"
startAtTimeOffset": "UTC",
"
terminateAt": "2030-01-05T12:00:00",
"
daysOfRunTillHour": "04:00",
"
daysOfRunFromHour": "01:00",
"
daysOfMonth": null,
"
triggerType": "DAYS_OF_WEEK_BLACKOUT",
"
daysOfWeek": "0,2,5",
"
blackoutName": "bl1"
"
startAt": 0,
},
{
"
startAtTimeOffset": "UTC",
"
terminateAt": 0,
"
daysOfRunTillHour": "00:00",
"
daysOfRunFromHour": "00:00",
"
daysOfMonth": null,
"
triggerType": "DAYS_OF_WEEK_BLACKOUT",
"
daysOfWeek": "5,6",
"
blackoutName": "bl2"
"
startAt": "2018-12-28T00:00:00",
}],
    "
projectType": "0",
    "
scriptFileName":"Pinger.ltz",
    "
description": "",
    "
executionPlanName": "ep1",
    "
version": "2",
    "
scriptFileCRC": "1112554905",
"
scheduler": {
"
startAtTimeOffset": "UTC",
"
terminateAt": 0
"
daysOfRunTillHour": "0:00",
"
daysOfRunFromHour": "0:00",
"
daysOfMonth": null,
"
transactionTimeout": "15",
"
startAtWithRandomDelay": "5",
"
triggerType": "CONTINUOUS",
"
daysOfWeek": null,
"
startAt": 0,
"
intervalInMinutes": "5",
},
    "
scriptId": "2",
    "
agentGroups" : [{
        "
name" : locationOne,
        "
id": 1
    },
    {
        "
name" : locationTwo,
        "
id": 2
    }]
    "
scriptFileSize": "67346",
    "
activeStatus": "1",
    "
useGlobalScheduler": false,
    "
attributeChangedEnvelopVersion": "2",
    "
activeBy": [true,true],
"
attributes": [{
"
encrypted": 0,
"
defaultValue": "32",
"
name": "Data Size",
"
length": "4",
"
encryptionType": 0,
"
description": "Size of the data package to be sent in bytes",
"
type": "number",
"
value": "32",
"
order": 3
},
{
"
encrypted": 0,
"
defaultValue": "Sv_ICMP Ping",
"
name": "Timer Name",
"
length": "12",
"
encryptionType": 0,
"
description": "Name of the ICMP Ping Timer",
"
type": "string",
"
value": "Sv_ICMP Ping",
"
order": 4
},
{
"
encrypted": 0,
"
defaultValue": "1",
"
name": "Number of Pings",
"
length": "4",
"
encryptionType": 0,
"
description": "Number of pings to be sent",
"
type": "number",
"
value": "1",
"
order": 2
},
{
"
encrypted": 0,
"
defaultValue": "1.000000000",
"
name": "Ping Timeout",
"
length": "8",
"
encryptionType": 0,
"
description": "Timeout value for the ping in seconds",
"
type": "float",
"
value": "1.000000000",
"
order": 1
},
{
"
encrypted": 0,
"
defaultValue": "",
"
name": "Host",
"
length": "0",
"
encryptionType": 0,
"
description": "The host being monitored",
"
type": "string",
"
value": "localhost",
"
order": 0
}],
"
useGlobalBlackout": false,
    "
applicationId": "221",
    "
syntheticApplicationId": "4",
    "
syntheticApplicationName": null,
    "
attributeChangedScriptVersion": "1",
"
executionLogSetting": "ON_ERROR"
}

Response body parameters

Parameter

Description

Value

executionPlanId

ID of the Execution Plan

String representing a numeric value

blackOuts

Blackout periods defined for the Execution Plan (can be multiple)

 

     startAtTimeOffset

Clock used for calculating the blackout period

  • UTC - Universal Coordinated Time
  • LOCAL - Local time on the computer where the TEA Agent is installed

     terminateAt

Date from when the blackout period is no longer used

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example : 2017-12-31T12:00:00
  • 0 - Indicates that the blackout period never expires

     daysOfRunTillHour

End time for the blackout period

Format: hh:mm

Example: 21:00

     daysOfRunFromHour

Start time for the blackout period

Format: hh:mm

Example: 17:00

     daysOfMonth

Not implemented

null

     triggerType

Trigger for the blackout period

DAYS_OF_WEEK_BLACKOUT

     daysOfWeek

Days of the week when the blackout period is in effect

Comma-separated numeric values (0-6).

Example: 0,2,5 indicates that the blackout is in effect on Sunday, Tuesday, and Friday.

     blackoutName

Name or description of the blackout period

String

Logical name or description given to the blackout period

     startAt

Date from when the blackout period is in use.

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example : 2016-01-05T12:00:00 
  • 0 - Indicates that the blackout period is effective immediately

projectType

Type of Silk Performer project

String representing a numeric value

scriptFileName

Name of the script run by the Execution Plan

String

description

Description of the Execution Plan

String

executionPlanName

Name of the Execution Plan

String

version

Execution Plan version

This number is updated every time the Execution Plan is updated.

String representing a numeric value

scriptFileCRC

Cyclic Redundancy Check of the script file

This is used for verifying that this is the correct file.

String representing a numeric value

scheduler

Schedule defined for the Execution Plan

 

    startAtTimeOffset

Clock used for calculating the schedule

  • UTC - Universal Coordinated Time
  • LOCAL - Local time on the computer where the TEA Agent is installed

    terminateAt

Date from when the schedule is no longer used

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example: 2017-12-31T12:00:00
  • 0 - Indicates that the schedule never expires

    daysOfRunTillHour

Not implemented

0:00

    daysOfRunFromHour

Not implemented

0:00

    daysOfMonth

Not implemented

null

    transactionTimeout

Number of minutes a transaction is allowed to run before it is automatically timed out

String representing a numeric value

    startAtWithRandomDelay

Range, in minutes, within which the Execution Plan starts

String representing a numeric value

    triggerType

Not implemented

CONTINUOUS

    daysOfWeek

Not implemented

null

    startAt

Date from when the schedule is in use

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example: 2016-01-05T12:00:00 
  • 0 - Indicates that the schedule period is effective immediately

    intervalInMinutes

Number of minutes between runs of the Execution Plan

String representing a numeric value

scriptId

ID of the script used by the Execution Plan

String representing a numeric value

agentGroups

Locations defined for the Execution Plan

 

    name

Name of the location

String

    id

ID of the location

Number

scriptFileSize

Size of the script file used by the Execution Plan in bytes

String representing a numeric value

activeStatus

Indication of whether the Execution Plan is active

String representing a boolean value

0 - False

1 - True

useGlobalScheduler

Not implemented

false

attributeChangedEnvelopVersion

Version number that is incremented each time there is a change in blackouts, schedule, or Execution Plan name

String representing a numeric value

activeBy

Array of two Boolean values indicating if the Execution Plan is active at the Execution Plan level, and at the Application level

Array

attributes

Attributes of the script run by the Execution Plan (can be multiple)

 

    encrypted

Indicates whether the attribute is encrypted

0 - False

1 - True

    defaultValue

Default value of the attribute

Varies depending on the attribute

    name

Name of the attribute

String

    length

Length of the attribute

Number

    encryptionType

Type of encryption used for this attribute

0 - No encryption

1,2 - Indicates encryption type

    description

Description of the attribute

String

    type

Data type of the attribute

  • boolean
  • float
  • number
  • string

    value

Value of the attribute

Varies depending on the attribute

    order

Serial number of the appearance of the attribute in the user interface

Number

useGlobalBlackout

Not implemented

false

applicationId

ID of the application in the Presentation Server

String representing a numeric value

syntheticApplicationId

ID of the application

String representing a numeric value

syntheticApplicationName

Name of the application

String

attributeChangedScriptVersion

Version number that is incremented each time there is a change in script attributes

String representing a numeric value

executionLogSetting

Whether the Execution Log is saved.

  • ALWAYS
  • ON_ERROR
  • NEVER

To retrieve one or more Execution Plans (applicable to versions 11.3.01 and earlier)

Click here to expand for more information

The  executionplan  API uses the GET method to retrieve Execution Plans. Use the following request syntax:

For retrieving a single Execution Plan

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getById?executionPlanId=<EPID>

 For retrieving all Execution Plans

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getAll

 For retrieving all  Execution Plans for a single application

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/executionplans/getAllByApplication?applicationId=<AID>

In the above examples:

  • <PresentationServerHostName>  indicates the host name of the TrueSight Presentation Server.
  • <EPID> indicates the ID of the Execution Plan.
  • <AID> indicates the ID of the application on the Presentation Server (not the synthetic application ID).

Sample request with REST client

After accessing the REST client, perform the following steps:

  1. Enter the URL for the API. 
    An example of a request for a single Execution Plan is:

    https://localhost/tsws/10.0/api/appvis/synthetic/api/executionplans/getById?executionPlanId=112

  2. Add a new header row and select Authorization as the header type.
  3. Enter the text authToken followed by the authToken generated through the login API. 
  4. Click Send.


Request parameters

Element

Description

authToken

Value of authToken

Query parameters

executionPlanId

ID of the Execution Plan (for retrieving a single Execution Plan only)

applicationId

ID of the application on the Presentation Server (not the synthetic application ID) (for retrieving all Execution Plans for an application only)

Response

The following sample is the JSON code returned by the API for a single Execution Plan.

"data""{
"
executionPlanId": "112",
"
blackOuts": [{
"
startAtTimeOffset": "UTC",
"
terminateAt": "2030-01-05T12:00:00",
"
daysOfRunTillHour": "04:00",
"
daysOfRunFromHour": "01:00",
"
daysOfMonth": null,
"
triggerType": "DAYS_OF_WEEK_BLACKOUT",
"
daysOfWeek": "0,2,5",
"
blackoutName": "bl1"
"
startAt": 0,
},
{
"
startAtTimeOffset": "UTC",
"
terminateAt": 0,
"
daysOfRunTillHour": "00:00",
"
daysOfRunFromHour": "00:00",
"
daysOfMonth": null,
"
triggerType": "DAYS_OF_WEEK_BLACKOUT",
"
daysOfWeek": "5,6",
"
blackoutName": "bl2"
"
startAt": "2018-12-28T00:00:00",
}],
    "
projectType": "0",
    "
scriptFileName":"Pinger.ltz",
    "
description": "",
    "
executionPlanName": "ep1",
    "
version": "2",
    "
scriptFileCRC": "1112554905",
"
scheduler": {
"
startAtTimeOffset": "UTC",
"
terminateAt": 0
"
daysOfRunTillHour": "0:00",
"
daysOfRunFromHour": "0:00",
"
daysOfMonth": null,
"
transactionTimeout": "15",
"
startAtWithRandomDelay": "5",
"
triggerType": "CONTINUOUS",
"
daysOfWeek": null,
"
startAt": 0,
"
intervalInMinutes": "5",
},
    "
scriptId": "2",
    "
agentGroups" : [{
        "
name" : locationOne,
        "
id": 1
    },
    {
        "
name" : locationTwo,
        "
id": 2
    }]
    "
scriptFileSize": "67346",
    "
activeStatus": "1",
    "
useGlobalScheduler": false,
    "
attributeChangedEnvelopVersion": "2",
    "
activeBy": [true,true],
"
attributes": [{
"
encrypted": 0,
"
defaultValue": "32",
"
name": "Data Size",
"
length": "4",
"
encryptionType": 0,
"
description": "Size of the data package to be sent in bytes",
"
type": "number",
"
value": "32",
"
order": 3
},
{
"
encrypted": 0,
"
defaultValue": "Sv_ICMP Ping",
"
name": "Timer Name",
"
length": "12",
"
encryptionType": 0,
"
description": "Name of the ICMP Ping Timer",
"
type": "string",
"
value": "Sv_ICMP Ping",
"
order": 4
},
{
"
encrypted": 0,
"
defaultValue": "1",
"
name": "Number of Pings",
"
length": "4",
"
encryptionType": 0,
"
description": "Number of pings to be sent",
"
type": "number",
"
value": "1",
"
order": 2
},
{
"
encrypted": 0,
"
defaultValue": "1.000000000",
"
name": "Ping Timeout",
"
length": "8",
"
encryptionType": 0,
"
description": "Timeout value for the ping in seconds",
"
type": "float",
"
value": "1.000000000",
"
order": 1
},
{
"
encrypted": 0,
"
defaultValue": "",
"
name": "Host",
"
length": "0",
"
encryptionType": 0,
"
description": "The host being monitored",
"
type": "string",
"
value": "localhost",
"
order": 0
}],
"
useGlobalBlackout": false,
    "
applicationId": "221",
    "
syntheticApplicationId": "4",
    "
syntheticApplicationName": null,
    "
attributeChangedScriptVersion": "1",
"
executionLogSetting": "ON_ERROR"
}

Response body parameters

Parameter

Description

Value

executionPlanId

ID of the Execution Plan

String representing a numeric value

blackOuts

Blackout periods defined for the Execution Plan (can be multiple)

 

     startAtTimeOffset

Clock used for calculating the blackout period

  • UTC - Universal Coordinated Time
  • LOCAL - Local time on the computer where the TEA Agent is installed

     terminateAt

Date from when the blackout period is no longer used

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example : 2017-12-31T12:00:00
  • 0 - Indicates that the blackout period never expires

     daysOfRunTillHour

End time for the blackout period

Format: hh:mm

Example: 21:00

     daysOfRunFromHour

Start time for the blackout period

Format: hh:mm

Example: 17:00

     daysOfMonth

Not implemented

null

     triggerType

Trigger for the blackout period

DAYS_OF_WEEK_BLACKOUT

     daysOfWeek

Days of the week when the blackout period is in effect

Comma-separated numeric values (0-6).

Example: 0,2,5 indicates that the blackout is in effect on Sunday, Tuesday, and Friday.

     blackoutName

Name or description of the blackout period

String

Logical name or description given to the blackout period

     startAt

Date from when the blackout period is in use.

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example : 2016-01-05T12:00:00 
  • 0 - Indicates that the blackout period is effective immediately

projectType

Type of Silk Performer project

String representing a numeric value

scriptFileName

Name of the script run by the Execution Plan

String

description

Description of the Execution Plan

String

executionPlanName

Name of the Execution Plan

String

version

Execution Plan version

This number is updated every time the Execution Plan is updated.

String representing a numeric value

scriptFileCRC

Cyclic Redundancy Check of the script file

This is used for verifying that this is the correct file.

String representing a numeric value

scheduler

Schedule defined for the Execution Plan

 

    startAtTimeOffset

Clock used for calculating the schedule

  • UTC - Universal Coordinated Time
  • LOCAL - Local time on the computer where the TEA Agent is installed

    terminateAt

Date from when the schedule is no longer used

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example: 2017-12-31T12:00:00
  • 0 - Indicates that the schedule never expires

    daysOfRunTillHour

Not implemented

0:00

    daysOfRunFromHour

Not implemented

0:00

    daysOfMonth

Not implemented

null

    transactionTimeout

Number of minutes a transaction is allowed to run before it is automatically timed out

String representing a numeric value

    startAtWithRandomDelay

Range, in minutes, within which the Execution Plan starts

String representing a numeric value

    triggerType

Not implemented

CONTINUOUS

    daysOfWeek

Not implemented

null

    startAt

Date from when the schedule is in use

One of the following:

  • Format: YYYY-MM-DDThh:mm:ss
    Example: 2016-01-05T12:00:00 
  • 0 - Indicates that the schedule period is effective immediately

    intervalInMinutes

Number of minutes between runs of the Execution Plan

String representing a numeric value

scriptId

ID of the script used by the Execution Plan

String representing a numeric value

agentGroups

Locations defined for the Execution Plan

 

    name

Name of the location

String

    id

ID of the location

Number

scriptFileSize

Size of the script file used by the Execution Plan in bytes

String representing a numeric value

activeStatus

Indication of whether the Execution Plan is active

String representing a boolean value

0 - False

1 - True

useGlobalScheduler

Not implemented

false

attributeChangedEnvelopVersion

Version number that is incremented each time there is a change in blackouts, schedule, or Execution Plan name

String representing a numeric value

activeBy

Array of two Boolean values indicating if the Execution Plan is active at the Execution Plan level, and at the Application level

Array

attributes

Attributes of the script run by the Execution Plan (can be multiple)

 

    encrypted

Indicates whether the attribute is encrypted

0 - False

1 - True

    defaultValue

Default value of the attribute

Varies depending on the attribute

    name

Name of the attribute

String

    length

Length of the attribute

Number

    encryptionType

Type of encryption used for this attribute

0 - No encryption

1,2 - Indicates encryption type

    description

Description of the attribute

String

    type

Data type of the attribute

  • boolean
  • float
  • number
  • string

    value

Value of the attribute

Varies depending on the attribute

    order

Serial number of the appearance of the attribute in the user interface

Number

useGlobalBlackout

Not implemented

false

applicationId

ID of the application in the Presentation Server

String representing a numeric value

syntheticApplicationId

ID of the application

String representing a numeric value

syntheticApplicationName

Name of the application

String

attributeChangedScriptVersion

Version number that is incremented each time there is a change in script attributes

String representing a numeric value

executionLogSetting

Whether the Execution Log is saved.

  • ALWAYS
  • ON_ERROR
  • NEVER

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*