invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

Select Columns

The $select system query option names the columns to retrieve, separated by commas. Every other column stays out of the answer.

Request

GET .../odata4/ExactOnlineREST.Financial.GLAccountsBulk@eol?$select=Code,DivisionName

Answer

{
  "@odata.context": ".../odata4/$metadata#ExactOnlineREST.Financial.GLAccountsBulk@eol(Code,DivisionName)",
  "value": [
    { "Code": "0110", "DivisionName": "ACME BV" },
    { "Code": "0120", "DivisionName": "ACME BV" }
  ]
}

The context names the two columns behind the entity set, so a client can see which shape it received.

Why It Is the Cheapest Option

A column left out of the $select is not requested from the platform either, so the saving is not only in the size of the answer. On a platform which charges per field or answers slowly, this is the single most effective change to a download.

A wide table has a second reason. The data model offers at most 1,000 columns per table, and a request without $select asks for all of them.

Combining

The option combines with every other option. Naming the columns and dropping the null values together shrinks a wide table twice:

GET .../odata4/ExactOnlineREST.Financial.GLAccountsBulk@eol?$select=Code,DivisionName
Prefer: omit-values=nulls

Release Notes