LRE API - Timeslot endpoint not working (for me)

Using this endpoint: https://loa-lre-qa.pncint.net/LoadTest/rest/domains/PNC/projects/Automation/timeslots/availabilities

Request Type : PUT

Body : 

{
    "TimeslotAvailability": {
        "SearchDurationInHours"4,
        "Timeslot": {
            "StartTime""2024-08-08T12:00:00Z",
            "DurationInMinutes"30,
            "Description""checking availability",
            "Demands": {
                "ControllerDemandManual": {
                    "HostID"1209
                },
                "LoadGeneratorDemandManual": {
                    "HostID""wloa29ma"
                }
            }
        }
    }
}
getting 500 internal server error and a return code of 1001
Anyone out there help me?
  • 0

    This is the actual response

    <Exception xmlns="">www.hp.com/.../API">
        <ExceptionMessage>Failed to retrieve availabilities.</ExceptionMessage>
        <ErrorCode>3208</ErrorCode>
    </Exception>
  • 0   in reply to 

      ,

    Just a guess. In most API calls, a tag that ends in ID, should have an integer number and not a string like your have at HostID.

    Use Get Hosts List by Query to map host-name to ID.

    How to ask questions

    Reward contributions via likes or 'verified answers'

  • 0 in reply to   

    Tried changing HostID from actual HostName to the ID.   

    <Exception xmlns="">www.hp.com/.../API">
        <ExceptionMessage>Failed to retrieve availabilities.</ExceptionMessage>
        <ErrorCode>3208</ErrorCode>
    </Exception>

    Modified Request 

    {
        "TimeslotAvailability": {
            "SearchDurationInHours"4,
            "Timeslot": {
                "StartTime""2024-09-09T12:00:00Z",
                "DurationInMinutes"30,
                "Description""checking availability",
                "Demands": {
                    "ControllerDemandManual": {
                        "HostID"1209
                    },
                    "LoadGeneratorDemandManual": {
                        "HostID"1143
                    }
                }
            }
        }
    }
  • 0   in reply to 

    I assume you use header: Content-Type: application/json

    experiment: Did you have been able to run it as XML, or did you try to use LoadGeneratorDemandAutomatic, just for testing.

    Also not sure if you can plan a month in advance, can you experiment with a few hours ahead?

    Experiment with a different date format (No 'Z' at end).

    Take a reservation of 1h iso 30m (I've seen some weird things with only 30m)

    Look in the logging on LRE server and see if there are more details.

    Based on structure of JSON and documentation it looks ok.

    How to ask questions

    Reward contributions via likes or 'verified answers'