Creating an application -- synthetic API
The POST method of the applications API creates an application.
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 | ||
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 create an application
The applications API uses the POST method to create an application.
Request syntax
In the above example, <PresentationServerHostName> indicates the host name of the TrueSight Presentation Server.
Request with REST client
After accessing the REST client, perform the following steps:
Enter the URL for API.
An example of a request to create an application is:https://localhost/tsws/10.0/api/appvis/synthetic/api/applications/create
- Add a new header row and select Authorization as the header type.
Enter the text authToken followed by the authToken generated through the login API.
- Enter the json code in the request body
- Click Send.
Request parameters
Element | Description |
---|---|
authToken | Value of authToken |
Request body
The following code is an example of the JSON code to send with the request.
"name":"NewApp2",
"importance":"MEDIUM",
"description":"",
"synthetic":"ON"
}
Request body parameters
Parameter | Description | Value |
---|---|---|
name | Name of the application model
| String |
importance | Importance level of the application |
|
description | (Optional) Description of the application | String |
synthetic | Indicates if synthetic monitoring is enabled for the application | ON |