Retrieving Execution Plans -- API


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

API
Method
Description
Applications

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

  
GET
Retrieve the details of one or more Execution Plans
PUT
Create a new Execution Plan or
Update an existing Execution Plan
DELETE
Delete an Execution Plan
Scripts
GET
Retrieve the details of one script or all scripts
Locations
GET
Retrieve the details of all locations
 

To retrieve one or more Execution Plans

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": "2016-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": "2015-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,
    "
syntheticApplicationId": 4,
    "
syntheticApplicationName": null,
    "
attributeChangedScriptVersion": 1
}

Response body parameters

Parameter

Description

Value

executionPlanId

ID of the Execution Plan

Numeric

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

Format: YYYY-MM-DDThh:mm:ss

Example: 2017-12-31T12:00:00

     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

     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 of the blackout period

String

Name given to the blackout period

     startAt

Date from when the blackout period is in use.

Format: YYYY-MM-DDThh:mm:ss

Example: 2016-01-05T12:00:00

projectType

Type of Silk Performer project

Number

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.

Number

scriptFileCRC

Cyclic Redundancy Check of the script file

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

Number

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

Format: YYYY-MM-DDThh:mm:ss

Example: 2017-12-31T12:00:00

    transactionTimeout

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

Numeric

    startAtWithRandomDelay

Range, in minutes, within which the Execution Plan starts

Numeric

    startAt

Date from when the schedule is in use

Format: YYYY-MM-DDThh:mm:ss

Example: 2016-01-05T12:00:00

    intervalInMinutes

Number of minutes between runs of the Execution Plan

Numeric

scriptId

ID of the script used by the Execution Plan

Numeric

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

Number

activeStatus

Indication of whether the Execution Plan is active

0 - False

1 - True

attributeChangedEnvelopVersion

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

Number

activeBy

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

Array

executionPlanName      

Name of the Execution Plan

String

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

syntheticApplicationId

ID of the application

Number

syntheticApplicationName

Name of the application

String

attributeChangedScriptVersion

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

Number

 

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