SharePoint REST request to select all columns and to expand lookup columns

20,452

you can try using * for all the columns.

In below example, * has been used to get all the columns. Country and State are lookup columns so they have been used along with * as they are part of $expand.

https://site/_api/lists/getbytitle('TestLookup')/items?$select=*,Country/Title,State/Title&$expand=Country/Id,State/Id
Share:
20,452
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    I have a SharePoint(Online) list which has around 50 columns. Out of which 6 are lookup columns. I am trying to write a REST query to get all the columns including the expansion($expand) of lookup columns. Specifying all the columns in '$select' will make the REST query URL to exceed the limit allowed by IE. But to expand the lookup columns I need to specify them in the '$select'.

    ?$select=col1,col2,col3/Title,col4/Title.....,col54&$expand=col3,col4

    Is there a way to access all columns from the lists without making multiple request to the server?