v3

latestOpenAPI 3.0.3MIT2026-07-313881,2455.6 MB
Database table view sortings

Creates a new sort for the view related to the provided view_id parameter if the authorized user has access to the related database's workspace. When the rows of a view are requested, for example via the list_database_table_grid_view_rows endpoint, they will be returned in the respected order defined by all the sortings.

post/api/database/views/{view_id}/sortings/

Path parameters

view_idinteger required

Creates a sort for the view related to the provided value.

Headers

ClientSessionIdstring uuid

An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.

ClientUndoRedoActionGroupIdstring uuid

An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.

Request body

fieldinteger required

The field that must be sorted on.

order'ASC' | 'DESC'
  • ASC - Ascending
  • DESC - Descending
typestring

Indicates the sort type. Will automatically fall back to default if incompatible with field type.

Response

idinteger required
viewinteger required

The view to which the sort applies. Each view can have his own sortings.

fieldinteger required

The field that must be sorted on.

order'ASC' | 'DESC'
  • ASC - Ascending
  • DESC - Descending
typestring

Indicates the sort type. Will automatically fall back to default if incompatible with field type.

priorityinteger required

Position of this sorting in the ordering chain. The sorting with the lowest priority is applied first.