API getURL multiple records

API getURL multiple records

Hello, 

I have created the following script:

  1. //BASE 64 Encryptie van gebruikersnaam, wachtwoord van Undagrid
  2. headerMap={ "Authorization" : "Basic secretcode=" };
  3. x = getUrl(("https://api.url.com/history?count=1"),headerMap);
  4. nodeName = x.executeXPath("/root/json/nodeName/text()");
  5. nodeUuid = x.executeXPath("/root/json/nodeUuid/text()");
  6. N=(x.executeXPath("/root/json/value/x/text()")).toDecimal();
  7. E=(x.executeXPath("/root/json/value/y/text()")).toDecimal();
  8. dX=((N  -  155000)  *  0.00001.toDecimal());
  9. dY=((E  -  463000)  *  0.00001.toDecimal());
  10. SomN=((3235.65389  *  dY  +  -32.58297  *  dX.power(2)  +  -0.2475  *  dY.power(2)  +  -0.84978  *  dX.power(2)  *  dY  +  -0.0655  *  dY.power(3)  +  -0.01709  *  dX.power(2)  *  dY.power(2)  +  -0.00738  *  dX  +  0.0053  *  dX.power(4)  +  -0.00039  *  dX.power(2)  *  dY.power(3)  +  0.00033  *  dX.power(4)  *  dY  +  -0.00012  *  dX  *  dY)).toDecimal();
  11. SomE=((5260.52916  *  dX  +  105.94684  *  dX  *  dY  +  2.45656  *  dX  *  dY.power(2)  +  -0.81885  *  dX.power(3)  +  0.05594  *  dX  *  dY.power(3)  +  -0.05607  *  dX.power(3)  *  dY  +  0.01199  *  dY  +  -0.00256  *  dX.power(3)  *  dY.power(2)  +  0.00128  *  dX  *  dY.power(4)  +  0.00022  *  dY.power(2)  +  -0.00022  *  dX.power(2)  +  0.00026  *  dX.power(5))).toDecimal();
  12. Latitude=(52.15517  +  SomN  /  3600).round(6);
  13. Longitude=(5.387206  +  SomE  /  3600).round(6);
  14. URL_Google_Maps="https://www.google.nl/maps/place/" + Latitude + "+" + Longitude + "/";
  15. insert into Koppeling_Undagrid
  16. [
  17.  Added_User = zoho.loginuser
  18.  CT_Containernummer = nodeUuid
  19.  CT_Serienummer = nodeName
  20.  E2 = E
  21.  E3 = Latitude.toDecimal()
  22.  Locatie = (((((((((("<a href= " + URL_Google_Maps + " target=_blank><div width = '100px' height = '100px' style='border: 0px solid #A4A4A4;'> <img src='http://maps.googleapis.com/maps/api/staticmap?center=") + Latitude) + "+") + Longitude) + "+") + "&zoom=10&markers=size:mid%7Ccolor:0x00b0f4%7Clabel:Container%7C") + Latitude) + "+") + Longitude) + "+") + "&size=100x100&sensor=true'></div></a>"
  23.  N2 = N
  24.  N3 = Longitude.toDecimal()
I so did manage to create 1 record in the form "Koppeling_Undagrid", convert the coördinates of the object to GPS coördinaties and create a map in Google Maps. 

But as you can see in the API URL, it only fetches 1 record. But I want to fetch 10 records. 

How can I fix this problem? So the issue is:
1. Fetch multiple record
2. Created multiple records

Hope someone can help me!

Greatings,

Erwin