Pass folder name via URL to SPO Rest API call in Custom ASPX page

I am trying to pass Folder name parameter via URL to load the API call in custom ASPX page on SPO. The page linking to the page code below will have the folder details.

URL linking to page below – <<<SPO_SITE>>>/teams/<<<SPO_TENANT>>>/SiteAssets/Image.aspx?Folder="<<>>"

<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery-3.5.1.min.js"></script>
           var requestUri = "<<<SPO_SITE>>>/teams/<<<SPO_TENANT>>>/_api/web/getfolderbyserverrelativeurl('<<<SPO_DOC_LIB>>>/<<<FOLDER>>>')/Files?$top=2000&$select=ServerRelativeUrl";
                 url: requestUri,
                 type: "GET",
                 headers: {
                     "accept":"application/json; odata=verbose"
                 success: onSuccess,
     function onSuccess(data) {
        var objItems = data.d.results;
        var divContent = '<div class="row" id="myList">';
        for (var i = 0; i < objItems.length; i++) {
            divContent += '<div class="col-md-3"><div class="card mb-4 shadow-sm"><img src="<<<SPO_SITE>>>/' + objItems[i].ServerRelativeUrl + '"><a class="stretched-link" target="_blank" href="<<<SPO_SITE>>>/' + objItems[i].ServerRelativeUrl + '"></a></div></div>';
<main role="main">
   <section class="pt-4 pb-4 text-center">
      <div class="container">

   <div class="container">
      <div id="myList">
         <div id="ImgGrid"></div>

<script src="js/popper.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>

Kindly review the code and advice.

190 thoughts on “Pass folder name via URL to SPO Rest API call in Custom ASPX page”

  1. Pingback: viagra otc
  2. Pingback: canada viagra
  3. Pingback: viagra sale
  4. Pingback: cheap viagra
  5. Pingback: sildenafil 50 mg
  6. Pingback: cialis daily
  7. Pingback: cialis en ligne
  8. Pingback: buy generic cialis
  9. Pingback: viagra sample
  10. Pingback: viagra generic
  11. Pingback: buy generic viagra
  12. Pingback: viagra samples
  13. Pingback: cialis lilly
  14. Pingback: tadalafil vidal
  15. Pingback: cost for viagra
  16. Pingback: sildenafil 20 mg
  17. Pingback: herbal viagra
  18. Pingback: viagra receptfritt
  19. Pingback: viagra jokes
  20. Pingback: female viagra
  21. Pingback: viagra walmart
  22. Pingback: viagra vs.levitra
  23. Pingback: generic for viagra
  24. Pingback: sildenafil teva
  25. Pingback: pfizer viagra
  26. Pingback: purchasing cialis
  27. Pingback: cialis online 20mg

Leave a Comment