Retrieving Time Frame details – synthetic API
The POST method of the API retrieves the details of Time Frame.
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 Time Frame details
The API uses the POST method to retrieve Time Frame details. Use the following request syntax:
Sample request with REST client
After accessing the REST client, perform the following steps:
Enter the URL for the API.
An example of a request for a single Time Frame is:https://localhost/tsws/10.0/api/appvis/synthetic/api/timeframes/get
- 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 a single or the list of Time Frame IDs in the request body.
- Click Send.
Request parameters
Element | Description |
---|---|
authToken | Value of authToken |
Request body
Request body | Description |
---|---|
Time Frame ID | Enter single or list of Time Frame IDs. |
Empty | Get all the Time Frames in the system. |
The following sample is the JSON code sent by the API for multiple Time Frames. Returns a list of Time Frame configurations.
Sample response
The response returns the Time Frame configuration.
"data": [ {
"recurrenceFrequency": {
"recurrenceFrequencyDetails": "01062019",
"recurrenceFrequencyType": "ALWAYS"
},
"name": "Example: Always Active",
"description": "Start from",
"associatedObjects": [],
"timeSpan": {
"startTime": "23:30",
"endTime": "",
"endTimeType": "NA"
},
"id": "77dd8f10-3e3f-437b-b0a0-84e94f5d1142"
},
{
"recurrenceFrequency": {
"recurrenceFrequencyDetails": "01042019",
"recurrenceFrequencyType": "ONCE"
},
"name": "Example: Once",
"description": "One time",
"associatedObjects": [],
"timeSpan": {
"startTime": "22:15",
"endTime": "00:00",
"endTimeType": "TIME"
},
"id": "d24812f4-3d90-488a-8b2c-09a087c8f62a"
},
{
"recurrenceFrequency": {
"recurrenceFrequencyDetails": "6,7",
"recurrenceFrequencyType": "WEEKLY"
},
"name": "Example:Weekly",
"description": "Weekly",
"associatedObjects": [],
"timeSpan": {
"startTime": "18:00",
"endTime": "23:00",
"endTimeType": "TIME"
},
"id": "11734794-03df-429f-b787-ebc3c2191842"
},
{
"recurrenceFrequency": {
"recurrenceFrequencyDetails": "29-31",
"recurrenceFrequencyType": "MONTHLY"
},
"name": "Example: Monthly",
"description": "Monthly",
"associatedObjects": [],
"timeSpan": {
"startTime": "20:55",
"endTime": "01:05",
"endTimeType": "DURATION"
},
"id": "5800f6bf-08b9-4272-89fd-c8904949fca5"
},
{
"recurrenceFrequency": {
"recurrenceFrequencyDetails": "0",
"recurrenceFrequencyType": "ALWAYS"
},
"name": "Example: Always Active - Immediately",
"description": "Start Immediately",
"associatedObjects": [],
"timeSpan": {
"startTime": "",
"endTime": "",
"endTimeType": "NA"
},
"id": "186ccba9-a7f1-4e8f-9332-c6a375026c2c"
}
]
}
Response body parameters
Parameter | Description | Value |
---|---|---|
Id | Time Frame ID | Time Frame ID. |
name | Name of the Time Frame | String. |
description | Description of the Time Frame | String. |
associatedObjects | Associated Blackouts that uses the Time Frame | List of Blackout IDs. |
recurrenceFrequency | ||
recurrenceFrequencyDetails | Recurrence Frequency details | ALWAYS –
ONCE –
WEEKLY –
Comma-separated numeric values: 1,2,3,4,5,6,7 (Where 1 is Monday and 7 is Sunday.) MONTHLY –
Numeric value or range , for example 2 or 2,3,5 or 2-6 |
recurrenceFrequencyType | Recurrence Frequency options |
|
timeSpan | ||
startTime | Time from when the blackout period is in use | HH:MM |
endTime | Time from when the blackout period is no longer used | TIME:
DURATION:
End Of Day – 00:00 |
endTimeType | End Time options |
|
Related topics