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.
APIMethodDescription
Applications

GETRetrieve the details of applications
PUT

Update an existing application

POSTCreate a new application
DELETEDelete an application

Execution Plans



GETRetrieve the details of Execution Plans
PUT
DELETEDelete an Execution Plan
ScriptsGETRetrieve the details of scripts
LocationsGETRetrieve the details of all locations

Blackouts

POSTRetrieve the details of Blackouts
PUT
POSTActivate the Blackout
POSTDeactivate the Blackout
POSTDelete a Blackout

Time Frames

POSTRetrieve the details of Time Frames
PUT
POSTDelete Time Frames
 

To retrieve Time Frame details

The API uses the POST method to retrieve Time Frame details. Use the following request syntax:

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/timeframes/get

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 Time Frame is:
    https://localhost/tsws/10.0/api/appvis/synthetic/api/timeframes/get
  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. Enter a single or the list of Time Frame IDs in the request body.
  5. Click Send.

Request parameters

ElementDescription
authToken

Value of authToken

Request body

Request bodyDescription
Time Frame IDEnter single or list of Time Frame IDs.
EmptyGet 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.

Note

When the request body contains an empty list, the user gets all the Time Frames allowed for that user permission.

["468c05c1-815c-471a-8f32-f5699834ff50", "763de7d7-451f-45fa-985e-f70f21b90d82"]

Sample response

The response returns the Time Frame configuration.

Response body parameters

ParameterDescriptionValue
Id
Time Frame ID

Time Frame ID.

name
Name of the Time FrameString.
description
Description of the Time FrameString.
associatedObjects
Associated Blackouts that uses the Time Frame

List of Blackout IDs.

recurrenceFrequency


     recurrenceFrequencyDetails

Recurrence Frequency details

ALWAYS

  • start immediately – ‘0’
  • Start from – date format  dd-mm-yyyy

ONCE

  • Date format : dd-mm-yyyy

WEEKLY

  • Days of the week when the blackout period is in effect.

Comma-separated numeric values:

 1,2,3,4,5,6,7 (Where 1 is Monday and 7 is Sunday.)

MONTHLY

  • Days of the month when the blackout period is in effect:

Numeric value or range , for example

2 or 2,3,5 or 2-6

     recurrenceFrequencyType

Recurrence Frequency options

  • ALWAYS
  • ONCE
  • WEEKLY
  • MONTHLY
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:

  • HH:MM For example,  21:00

DURATION:

  • Hours:Minutes For example, 03:30

End Of Day – 00:00

     endTimeType
End Time options
  • TIME
  • DURATION
  • NA

Related topics

Developing

Was this page helpful? Yes No Submitting... Thank you

Comments