I'm trying to use the REST APi to get data from a sharepoint list.
I first get the information about the columns: _api/Web/List<guid'some-id')/Fields
.
Then with this information I query the data _api/Web/Lists(guide'some-id')/Items?$top=5000
.
If any of the columns are of type Lookup
or LookupMulti
then I append the &$select=<column_name>/Title
and &$expand=<column_name>
to the url.
The issue is that only deferred Lookup
columns can actually be returned by the REST API. If they are not then I get an error.
How can I figure out which Lookup
columns are deferred or not? That way I won't try to expand those and my request won't fail.