Page tree

The GET method of the applications API retrieves the details of one application or all applications.

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 application or all applications

The applications API uses the GET method to retrieve applications. Use the following request syntax:

For retrieving a single application

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/applications/getById?applicationId=<AID>
 

For retrieving all applications

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/applications/getAll?isSynthetic=<SynStatus>

In the above examples:

  • <PresentationServerHostName> indicates the host name of the TrueSight Presentation Server.
  • <AID> indicates the ID of the application on the Presentation Server (not the synthetic application ID).
  • <SynStatus> indicates the synthetic status of the application. SynStatus can be the following:
    • blank - all applications on the tenant
    • TRUE - only applications that have synthetic monitoring set to ON
    • FALSE - only applications that have syhtetic monitoring set to OFF

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 Application is:
    https://localhost/tsws/10.0/api/appvis/synthetic/api/applications/getById?applicationId=112
  2. Add a new header row and select Authorization as the header type.

  3. Enter the text authToken followed by the authToken Open link generated through the login API. 
  4. Click Send.

Request parameters

ElementDescription
authToken

Value of authToken Open link

Query parameters
applicationIdID of the application on the Presentation Server (not the synthetic application ID) (for retrieving a single application)
isSynthetic(Optional) Synthetic status of the retrieved applications (for retrieving multiple applications)

Response

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

{"data":
    {
		"name":"MyApp2",
		"displayName":"MyApp2",
		"type":"MANUAL",
		"severity":"OK",
		"importance":"MEDIUM",
		"description":"",
		"source":null,
		"synthetic":"ON",
		"eumApp":"OFF",
		"appVisOnlyMode":true,
		"severitySince":1452777815203,
		"computationModel":"HIGHEST",
		"totalUsers":"",
		"impactedUsers":"",
		"id":"4",
		"appId":"4",
		"providerId":"0",
		"portalId":"1",
		"tenantId":"bmcrealm"
	}
}

Response body parameters

The following parameters are the parameters that are relevant for synthetic monitoring.

ParameterDescriptionValue
data
  
     name

Name of the application model

String

     displayName

Name of the application

String

     type
Type of application
  • MANUAL - Application was created manually.
  • AUTOMATIC - Application was automatically discovered by App Visibility.
     severity

Current severity level of the application

 

  • Critical
  • Minor
  • OK
     importance
Importance level of the application
  • High
  • Medium
  • Low
     description
Description of the applicationString
     synthetic
Indicates if synthetic monitoring is enabled for the application
  • ON
  • OFF
     severitySince

UTC time of last change in severity

Number
     id
ID of the applicationNumber