2 years ago
#11910
employeeWithCode
How do I determine what is expandable and what you can expand with ODATA via the SharePoint REST API?
Take this odata query for example:
_api/web/lists/getbytitle('Site')/items?$top=10&$orderby=Id asc&$select=Id,Title,URL,AuthorId,Author/FirstName,Author/Lastname&$expand=Author
What gives away that you can expand the "Author" with FirstName and LastName aside from just knowing you can do that? How do I know what other fields I can expand if I wanted to? And if I could expand another field, what can I expand them to?
No amount of querying has given me any insight into know what's expandable and what is not, as well as knowing "What" sub-items you can expand them with (how would I know you could grab FirstName, but not First?). Is this just something baked into the API or is there some sort of way to determine where this info exists? For instance, how would I know I couldn't look up Author/SSN without querying for it only to find out that it in fact, does not exist?
sharepoint
odata
sharepoint-rest-api
0 Answers
Your Answer