Retrieving Blackout details – synthetic API


The POST method of the API retrieves the details of single, multiple, or all Blackouts.

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 one Blackout or all Blackouts

The API uses the POST method to retrieve Blackouts. Use the following request syntax:

https://<PresentationServerHostName>/tsws/10.0/api/appvis/synthetic/api/blackouts/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 Blackout is:

    https://localhost/tsws/10.0/api/appvis/synthetic/api/blackouts/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 the Blackout ID in the request body.
  5. Click Send.

Request parameters

Element

Description

authToken

Value of authToken

Request body

Request body

Description

Blackout ID

Enter single or list of Blackout IDs.

Empty

Get all the Blackout configurations in the system.


The following sample is the JSON code requested by the API for multiple Blackouts. Returns a list of Blackout configurations:

["c66cc9eb-8e6d-4428-96b8-957d73116caf", "a3c8e770-2cdf-401b-92ab-aa8447f81112"]


Response

The response returns the Blackout configuration.

{
   "version": 7,
   "blackoutsMap": {
       "c66cc9eb-8e6d-4428-96b8-957d73116caf": {
           "id": "c66cc9eb-8e6d-4428-96b8-957d73116caf",
           "status": "ACTIVE",
           "name": "Holiday",
           "description": "",
           "scope": "SUSPEND_EXECUTIONS",
           "timeZone": "AGENT_LOCAL",
           "applications": {
               "quantity": "SINGLE",
               "set": [
                   {
                       "appId": "5dce6bbb-dae8-4896-b7e6-2c2c5239e64c2A",
                       "syntheticId": 1
                   }
               ]
           },
           "executionPlans": {
               "quantity": "MULTIPLE",
               "set": [
                   "1",
                   "2"
               ]
           },
           "timeframes": [
               "468c05c1-815c-471a-8f32-f5699834ff50",
               "763de7d7-451f-45fa-985e-f70f21b90d82"
           ]
       },
       "a3c8e770-2cdf-401b-92ab-aa8447f81112": {
           "id": "a3c8e770-2cdf-401b-92ab-aa8447f81112",
           "status": "ACTIVE",
           "name": "WEEKENDS",
           "description": "",
           "scope": "SUSPEND_EXECUTIONS",
           "timeZone": "AGENT_LOCAL",
           "applications": {
               "quantity": "ALL",
               "set": [   ]
           },
           "executionPlans": {
               "quantity": "ALL",
               "set": []
           },
           "timeframes": [
               "763de7d7-451f-45fa-985e-f70f21b90d8"
           ]
       },
       "95343ff6-e627-4874-91fd-bc3ed0c83873": {
           "id": "95343ff6-e627-4874-91fd-bc3ed0c83873",
           "status": "INACTIVE",
           "name": "New Year's Eve",
           "description": "New Year's Eve",
           "scope": "SUSPEND_EXECUTIONS",
           "timeZone": "UTC",
           "applications": {
               "quantity": "SINGLE",
               "set": [
                   {
                       "appId": "5dce6bbb-dae8-4896-b7e6-2c2c5239e64c2C",
                       "syntheticId": 1
                   }
               ]
           },
           "executionPlans": {
               "quantity": "ALL",
               "set": []
           },
           "timeframes": [
               "763de7d7-451f-45fa-985e-f70f21b9010"
           ]
       }
   }
}


Response body parameters

The following parameters descriptions are relevant for retrieving the Synthetic Blackout configuration:

Parameter

Description

Value

version

The version is the Blackout configuration number.

Configuration number

BlackoutsMap

Blackouts configuration.

List of Blackouts.

id

The Blackout ID

Blackout ID

status

Blackout status: ACTIVE or INACTIVE.

  • ACTIVE
  • INACTIVE

name

Name of the Blackout.

String

description

Description of the Blackout.

String

scope

The Blackout Type.

SUSPEND_EXECUTIONS

timeZone

Schedule the Blackout according to the UTC time zone or TEA Agent Local time zone where the Execution Plan runs.

  • UTC
  • AGENT_LOCAL 
Applications



    quantity

Indicates whether single, multiple, or all Applications are configured in the Blackout.

  • ALL
  • SINGLE
  • MULTIPLE

    set

Application ID. Used only when the quantity parameter is set to SINGLE or MULTIPLE.

  • SINGLE -
    • "appId"
    • "syntheticId": -1 
  • MULTIPLE - (comma-separated list)
    • "appId"
    • "syntheticId": -1 

executionPlans



    quantity

Indicates whether single, multiple, or all Execution Plans are configured in the Blackout.

  • ALL
  • SINGLE
  • MULTIPLE

    set

Execution Plan ID. Used only when the quantity parameter is set to SINGLE or MULTIPLE.

  • No value
  • Execution Plan ID
  • Execution Plan IDs (comma-separated list)

timeframes

Time Frame IDs

  • Time Frame ID
  • List of Time Frame IDs

Related topics

Developing

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*