title: How to access a doc's URL using REST API + JQuery in SharePoint 2013?
body: <p>I am doing basic OData/REST calls to a SP2013 doc library. I am trying to get down to the item's URL and can't determine how to do this. I am very familiar with the server-side object model and understand that the file object is one level deeper than the item. Can someone point me in the right direction or share documentation on how to get down to the file level? I have scoured google. Here's my code that works for simply getting access to all the items in doc library and any metadata columns I wish to target:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  
  &lt;script&gt;
      // workaround for access error
      jQuery.support.cors = true;
  
      // create REST query
      var requestUri = "http://sp2013/_api/Web/Lists/getByTitle('Documents')/items"; 
  
      // execute AJAX request
      $.ajax({
          url: requestUri,
          type: "GET",
          headers: { "Accept": "application/json; odata=verbose" },
          success: function(data){
              alert(data.d.results);
              $.each(data.d.results, function(index, item){
                  if (item["Meta1"] == null) {
                      $("body").append("&lt;h1&gt;No Title&lt;/h1&gt;");
                  }
                  else {
                      $("body").append("&lt;h1&gt;" + item["Meta1"] + "&lt;/h1&gt;");
                  }
              });
          },
          error: function(jqXHR, textStatus, errorThrown){
              alert(textStatus);
          }
      });
  &lt;/script&gt;
  </code></pre>