Share this page

# Check timeslots availability

Available in versions: 12.56 and later

## Description

Checks if a timeslot can be allocated.

## URL

Copy code

    /LoadTest/rest/domains/{domainName}/projects/{projectName}/timeslots/availabilities

## Remarks

Body of the request should contain a timeslot description in xml format.

## HTTP method

PUT: Checks timeslot availability.

## Request

Headers:

One of the following:

- Content-Type: application/xml

- Content-Type: application/json

Cookies:

Version | Cookie
--- | ---
2020 or later | LWSSO_COOKIE_KEY={LwssoCookie};
Earlier than 2020 | LWSSO_COOKIE_KEY={LwssoCookie};QCSession={QCSessionCookie};

Request body:

PUT: An XML or JSON describing the timeslot to be verified.

The following fields can be used in the request body for checking timeslot availability.

Element | Description
--- | ---
SearchDurationInHours | (Optional) Default value is 42 hours.
Timeslot | The type of demands for timeslot creation. Can include: ControllerDemandManual. Fields include: HostID (mandatory), IsLoadGenerator (optional) ControllerDemandAutomatic. Contains no fields; any host can be allocated as a Controller. LoadGeneratorDemandManual. Fields: HostID (mandatory) LoadGeneratorDemandAutomatic. Fields: HostsToReserve (mandatory), LocationID (optional)

Request examples:

Copy code
XML example - PUT:

    PUT /LoadTest/rest/domains/DEFAULT/projects/MyProject/timeslots/availabilities HTTP/1.1
    Host: PCServer
    Content-Type: application/xml
    Cookie: LWSSO_COOKIE_KEY={LwssoCookie};

Copy code
XML example - Checking a 4 hour time interval with already allocated timeslots:

    <TimeslotAvailability xmlns="http://www.hp.com/PC/REST/API">
      <SearchDurationInHours>4</SearchDurationInHours>
      <Timeslot xmlns="http://www.hp.com/PC/REST/API">
          <StartTime>2021-08-05T12:00:00Z</StartTime>
          <DurationInMinutes>30</DurationInMinutes>
          <PostRunAction>CollateAnalyze</PostRunAction>
          <Description>checking availability</Description>
          <Demands>
            <ControllerDemandManual>
               <HostID>2996</HostID>
            </ControllerDemandManual>
            <LoadGeneratorDemandAutomatic>
               <HostsToReserve>1</HostsToReserve>
            </LoadGeneratorDemandAutomatic>
          </Demands>
      </Timeslot>
    </TimeslotAvailability>

## Response

Headers:

One of:

- Accept: application/xml

- Accept: application/json

Cookies:

None

HTML return code:

One of the HTTP return codes

HTML body:

The response body contains a list of conflicts that the timeslot could encounter during the selected search interval. If the list is empty, the timeslot can be allocated at any time within the search interval.

Response examples:

The response body example for the above request (checking a 4 hour time interval with already allocated timeslots):

Copy code
XML example:

    <TimeslotAvailability>
       <Conflicts>
          <Conflict>
             <StartTime>2017-09-05T12:00:00+00</StartTime>
          <ConflictReasons>
            <ConflictReason>Number of concurrent runs has reached the project limit (1).</ConflictReason>
            <ConflictReason>Number of concurrent runs has reached the  license limit (1).</ConflictReason>
            <ConflictReason>The following host(s) are already in use: myd12365.lab.net</ConflictReason>
          </ConflictReasons>
          </Conflict>
          <Conflict>
             <StartTime>2017-09-05T12:15:00+00</StartTime>
          <ConflictReasons>
            <ConflictReason>Number of concurrent runs has reached the project limit (1).</ConflictReason>
            <ConflictReason>Number of concurrent runs has reached the  license limit (1).</ConflictReason>
            <ConflictReason>The following host(s) are already in use: myd12365.lab.net</ConflictReason>
          </ConflictReasons>
          </Conflict>
       </Conflicts>
    </TimeslotAvailability>

Copy code
JSON example:

    {
        "Conflicts": [
            {
                "StartTime": "2024-04-12T20:15:00+00",
                "ConflictReasons": [
                    "Number of concurrent runs has reached the project limit (1).",
                    "Number of concurrent runs has reached the LRE license limit (1).",
                    "The following host(s) are already in use: lreh1-nightly-mssql-clean.lr.admlabs.aws.swinfra.net",
                    "Requested 1 automatch load generator(s) ; 0 available."
                ]
            },
            {
                "StartTime": "2024-04-12T20:30:00+00",
                "ConflictReasons": [
                    "Number of concurrent runs has reached the project limit (1).",
                    "Number of concurrent runs has reached the LRE license limit (1).",
                    "The following host(s) are already in use: lreh1-nightly-mssql-clean.lr.admlabs.aws.swinfra.net",
                    "Requested 1 automatch load generator(s) ; 0 available."
                ]
            },
        ]
    }

See also:

- Create or get all timeslots
- Delete a timeslot
- Timeslot XML

Tips to improve your search results... OpenText™ Enterprise Performance Engineering API Reference OpenText™ Enterprise Performance Engineering All View Local Help Center View Online Help Center(Undefined variable: _rscC_Basic_Variables.VersionLabel)