2 Replies Latest reply on Jun 20, 2019 11:15 AM by sean_gadson

    Reservations By Reservation Policy

    sean_gadson Novice


      is there a way to get what reservations are apart of a reservation policy ID? For example:

      Reservation Policy X is linked to Reservation Y, Z, T


      I would prefer the CAFE but if I have to use the vCAC end point then I will go with that

        • 1. Re: Reservations By Reservation Policy
          qc4vmware Master

          var reservationService = host.createReservationClient().getReservationReservationService();

          var reservations = [];

          var reservationFilter = getReservationFilterForPolicyId(policyId);

          reservations = reservationService.getAllReservations(reservationFilter).getContent();



          return reservations;




          function getReservationFilterForPolicyId(policyId) {

          var query = new vCACCAFEOdataQuery();



          var reservationPolicyIdParam = vCACCAFEFilterParam.equal("reservationPolicyId" , vCACCAFEFilterParam.string(policyId));

          var queryParams = [reservationPolicyIdParam];




          return new vCACCAFEPageOdataRequest(1 , 100000, query);


          • 2. Re: Reservations By Reservation Policy
            sean_gadson Novice

            This worked thank you very much!