Test Data Manager

 View Only
  • 1.  Find and Reserve TDM API - dynamic request content inclusion

    Posted Apr 14, 2021 02:46 PM
    Hi there,
    I am trying to implement the Find and Reserve feature using TDM API's using Javelin. In my case, as part of Find API, I am fetching number of records (say 10). If I want to have these records Reserved, then I would have to have the below highlighted part repeated 10 times with relevant records. How can I get this request content built dynamically depending on the number of records to be reserved using Javelin. 

    Also, how can I store these 10 records as part of Find API response,  so that these can be retrieved to build the Reserve API request. I tried putting it into the text file, but then I am facing difficulty in fetching the values to be used for Reserve for each record set. Appreciate any suggestion on this regard.

    {
      "dataModelId"3722,
      "environmentId"3384,
      "resErrorMessage""string",
      "reservationId"0,
      "reservationName""Sample Reservation",
      "reservationState""UNDEFINED",
      "resources": [
        {
          "dataModelId": 3722,
           "modelKeys": {
                    "ID": "5050000026",
                    "name": "John"
         }
        }
         ]
    }


  • 2.  RE: Find and Reserve TDM API - dynamic request content inclusion

    Broadcom Employee
    Posted Apr 14, 2021 03:54 PM
    Hi @Mahesh,

    You would parse the returned JObject for the ID.   Do this in a For Loop and you'll be able to collect all the IDs so you can build the Reservation request body.  See the following technote for an example for the parsing of the response
    https://knowledge.broadcom.com/external/article?articleId=197610




  • 3.  RE: Find and Reserve TDM API - dynamic request content inclusion

    Posted Apr 14, 2021 11:28 PM
    Thanks Scott. Please can you suggest on building the Reserve API request body dynamically for the retrieved data from Find response.