2 Replies Latest reply on Oct 14, 2019 9:29 AM by cloudyred

    Unable to add paging for VCACCAFE propertyClient.getWithVariables methods

    cloudyred Novice

      Hi,

       

      Think I might have a paging issue now for tenants with more than 20 properties.

       

      Original Code:

      var propertyClient = vraHost.createPropertyClient();

      var propDefinitions = propertyClient.get("propertydefinitions/");

      System.log(propDefinitions);

       

      Result: Pagesize is 20.

        "metadata": {

            "size": 20,

            "totalElements": 0,

            "totalPages": 0,

            "number": 1,

            "offset": 0

         }

       

      New Code I'm trying that I can't get working. Any suggestions?

       

      var propertyClient = vraHost.createPropertyClient();

      // Neither of the below are having any effect on paging.

      //var propDefinitions = propertyClient.getWithVariables("propertydefinitions/",["page=1","limit=40"]);

      var propDefinitions = propertyClient.getWithVariables("propertydefinitions/",["$skip=0","$top=40"]);

       

      System.log(propDefinitions);

       

      Result: Pagesize is 20.

        "metadata": {

            "size": 20,

            "totalElements": 0,

            "totalPages": 0,

            "number": 1,

            "offset": 0

         }

       

      vRA Access Log:

      192.168.7.118 [14/Oct/2019:10:16:10 -0400][149 ms] "GET /properties-service/api/propertydefinitions/ HTTP/1.1" 200 5747 [tomcat-http--378]

       

      References:

       

      https://vrafqdn/component-registry/services/docs#!/default/get_api_propertydefinitions