Page tree

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 Open link .

Synthetic configuration APIs

APIMethodDescription
Applications

GETRetrieve the details of one application or all applications
PUT

Update an existing application

POSTCreate a new application
DELETEDelete an application
Execution Plans

  
GETRetrieve the details of one or more Execution Plans
PUTCreate a new Execution Plan or
Update an existing Execution Plan
DELETEDelete an Execution Plan
ScriptsGETRetrieve the details of one script or all scripts
LocationsGETRetrieve 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

ElementDescription
authToken

Value of authToken Open link

Query parameters
executionPlanIdID of the Execution Plan (for retrieving a single Execution Plan only)
applicationIdID 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,
    "applicationId": "221",
    "syntheticApplicationId": "4",
    "syntheticApplicationName": null,
    "attributeChangedScriptVersion": "1"
}

Response body parameters

ParameterDescriptionValue
executionPlanId
ID of the Execution PlanString 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

     triggerType
Trigger for the blackout periodDAYS_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 projectString representing a numeric value
scriptFileName
Name of the script run by the Execution PlanString
description
Description of the Execution PlanString
executionPlanName
Name of the Execution PlanString
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
    transactionTimeout
Number of minutes a transaction is allowed to run before it is automatically timed outString representing a numeric value
    startAtWithRandomDelay
Range, in minutes, within which the Execution Plan startsString representing a numeric value
    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 PlanString representing a numeric value
scriptId
ID of the script used by the Execution PlanString representing a numeric value
agentGroups
Locations defined for the Execution Plan 
    name
Name of the locationString
    id
ID of the locationNumber
scriptFileSize
Size of the script file used by the Execution Plan in bytesString representing a numeric value
activeStatus
Indication of whether the Execution Plan is active

String representing a boolean value

0 - False

1 - True

attributeChangedEnvelopVersion
Version number that is incremented each time there is a change in blackouts, schedule, or Execution Plan nameString 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 levelArray
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 attributeVaries depending on the attribute
    name
Name of the attributeString
    length
Length of the attributeNumber
    encryptionType
Type of encryption used for this attribute

0 - No encryption

1,2 - Indicates encryption type

    description
Description of the attributeString
    type
Data type of the attribute
  • boolean
  • float
  • number
  • string
    value
Value of the attributeVaries depending on the attribute
    order
Serial number of the appearance of the attribute in the user interfaceNumber
applicationIdID of the application in the Presentation ServerString representing a numeric value
syntheticApplicationId
ID of the applicationString representing a numeric value
syntheticApplicationName
Name of the applicationString
attributeChangedScriptVersion
Version number that is incremented each time there is a change in script attributesString representing a numeric value

2 Comments

  1.  

    1.