Is there a way to get the link to pages in a Page library? Cant find a property that stores the url?
Thanks in advance
Three options:
/_api/Web/Lists/getByTitle('<list title>')/items?$select=File/ServerRelativeUrl&$expand=File
/_api/Web/Lists/getByTitle('<list title>')/items?$select=FieldValuesAsText/FileRef&$expand=FieldValuesAsText
/_api/Web/GetFolderByServerRelativeUrl('<list url>')/Files?$select=ServerRelativeUrl
Pages library is in a way a document library.
So, get full link of the page in the Pages library, you can use the EncodedAbsUrl
property.
The REST API implementation for that would be as below:
https://site-collection-url/_api/web/lists/getbytitle('Pages')/items?$select=EncodedAbsUrl
If you have a web with publishing feature activated, the pages url is stored in the property bag at the web at the key "vti_pageslistname"