Can you get file URL using REST API?
As this reason, we can’t get file url using Rest API directly. As a workaround, I suggest you can firstly query the lookup ID of the parent list in the lookup field using Rest API like below:
How to get document library data using the REST API?
One of the list fields is a lookup to the document library to allow one more documents to be associated with a list item. I’m working with the REST API using Javascript and jQuery in a visual webpart to provide a front-end for these lists so that documents can be dragged and dropped onto the list items to associate them.
How to delete a list using REST API?
The following example shows how to delete a list. When referring to a lookup column inside a list using REST API, use the display name of the lookup column instead of the internal name. The following example shows how to retrieve all of a list’s items. The OData $skip query parameter doesn’t work when querying list items.
How to find a list of files in SharePoint?
I can do a content search using the /_api/search/query?queryText=”” just fine, but I want to construct the querytext of this API endpoint to only search for doucments within the list I provide. For example, if I am looking for three documents:
How to get file URL from document library?
According to your description, my understanding is that you want to get file url of all documents when querying a lookup field which points to the document library Title field using Rest API. Based on my research, when we create a lookup fields points to document library, we can’t make name field in library as source field.
Where to find external URL in SharePoint document library?
The problem is when I add a Link item (external Url) in that document library, I cannot find an item property that stores the external Url. Right now I get the item properties via SharePoint REST API. I checked the values of FileRef and EncodedAbsUrl, but these are URLs pointing to the SharePoint document library file, and not to the external URL.
How to query document library using REST API?
Then you can query the document library based on the lookup ID value to get the file url using Rest API like below: Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help.
How to retrieve the lookup column value rest?
Only the ID of the lookup in the field “CountryId” is returned. This is because we have to specify certain parameters in the REST request URL to fetch the value of the Lookup column. And hence the below statement that we used in our code will not give us any value.
How can I get name column or URL of all documents?
How can I get Name column or Url of all documents by using above query. According to your description, my understanding is that you want to get file url of all documents when querying a lookup field which points to the document library Title field using Rest API.