1

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

3 Answers 3

1

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 
1

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
2
  • hi @naijacoder, did you try the above REST endpoint ? Commented Dec 1, 2017 at 11:37
  • hey @naijacoder, if it helped you, could you please mark it as answer, thanks :) Commented Jan 18, 2018 at 13:10
0

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"

1
  • Thanks but i don't get to see this property in my rest api result
    – naijacoder
    Commented Nov 30, 2017 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.