I have a Picture Library with folders within. Root folder contains another folders which named by years. Each year folder contains several album folders. And at least each album foilder contains pictures. I created new Boolean field 'IsCover' which defines cover image for album. Then I try to get album folders with files via REST API and I want to know which file is cover, but response does not contain such field.
http://portal/_api/web/getfolderbyserverrelativeurl('mediagallery/2016/')/Folders?$expand=Files
"CheckInComment": "",
"CheckOutType": 2,
"ContentTag": "{4E99ABFD-51A3-460F-9B34-1A1962F3C2CF},1,2",
"CustomizedPageStatus": 0,
"ETag": "\"{4E99ABFD-51A3-460F-9B34-1A1962F3C2CF},1\"",
"Exists": true,
"Length": "98331",
"Level": 1,
"MajorVersion": 1,
"MinorVersion": 0,
"Name": "IMG_3474.JPG",
"ServerRelativeUrl": "/MediaGallery/2016/NY/IMG_3474.JPG",
"TimeCreated": "2016-03-20T21:00:27Z",
"TimeLastModified": "2016-03-20T21:00:27Z",
"Title": null,
"UIVersion": 512,
"UIVersionLabel": "1.0"
If I try to get all items in library, that's ok, it shows me my field.
http://portal/_api/web/lists('guid')/Items
I tried to get fields with $select but it doesn't work.
http://portal/_api/web/getfolderbyserverrelativeurl('mediagallery/2016/')/Folders?$expand=Files&$select=Name,Files/ServerRelativeUrl,Files/IsCover
http://portal/_api/web/getfolderbyserverrelativeurl('mediagallery/2016/')/Folders?$expand=Fileswithout the$selectdoes it return the results with all fields? If you need files and folders use?$expand=Files,Folders