Baserow Database table view sortings API
The Database table view sortings API from Baserow — 3 operation(s) for database table view sortings.
The Database table view sortings API from Baserow — 3 operation(s) for database table view sortings.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/baserow:baserow-database-table-view-sortings-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Baserow API spec Database table view sortings API
version: 2.2.2
description: 'For more information about our REST API, please visit this page.
For more information about our deprecation policy, please visit this page.'
contact:
url: https://baserow.io/contact
license:
name: MIT
url: https://github.com/baserow/baserow/blob/develop/LICENSE
tags:
- name: Database table view sortings
paths:
/api/database/views/{view_id}/sortings/:
get:
operationId: list_database_table_view_sortings
description: Lists all sortings of the view related to the provided `view_id` if the user has access to the related database's workspace. A view can have multiple sortings. When all the rows are requested they will be in the desired order.
parameters:
- in: path
name: view_id
schema:
type: integer
description: Returns only sortings of the view related to the provided value.
required: true
tags:
- Database table view sortings
security:
- UserSource JWT: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ViewSort'
description: ''
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: List database table view sortings
x-summary-source: derived
post:
operationId: create_database_table_view_sort
description: 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.
parameters:
- in: header
name: ClientSessionId
schema:
type: string
format: uuid
description: 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.
- in: header
name: ClientUndoRedoActionGroupId
schema:
type: string
format: uuid
description: 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.
- in: path
name: view_id
schema:
type: integer
description: Creates a sort for the view related to the provided value.
required: true
tags:
- Database table view sortings
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateViewSort'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateViewSort'
multipart/form-data:
schema:
$ref: '#/components/schemas/CreateViewSort'
required: true
security:
- UserSource JWT: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ViewSort'
description: ''
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
- ERROR_REQUEST_BODY_VALIDATION
- ERROR_VIEW_SORT_NOT_SUPPORTED
- ERROR_FIELD_NOT_IN_TABLE
- ERROR_VIEW_SORT_FIELD_ALREADY_EXISTS
- ERROR_VIEW_SORT_FIELD_NOT_SUPPORTED
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: Create database table view sort
x-summary-source: derived
/api/database/views/{view_id}/sortings/prioritize/:
post:
operationId: prioritize_database_table_view_sortings
description: Updates the priority of the sorts to match the order of the given IDs. Sorts earlier in the list are applied first.
parameters:
- in: header
name: ClientSessionId
schema:
type: string
format: uuid
description: 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.
- in: header
name: ClientUndoRedoActionGroupId
schema:
type: string
format: uuid
description: 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.
- in: path
name: view_id
schema:
type: integer
description: Updates the priority of the sortings in the view related to the provided value.
required: true
tags:
- Database table view sortings
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PrioritizeViewSortings'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PrioritizeViewSortings'
multipart/form-data:
schema:
$ref: '#/components/schemas/PrioritizeViewSortings'
required: true
security:
- UserSource JWT: []
- JWT: []
responses:
'204':
description: No response body
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
- ERROR_VIEW_SORT_NOT_IN_VIEW
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: Prioritize database table view sortings
x-summary-source: derived
/api/database/views/sort/{view_sort_id}/:
get:
operationId: get_database_table_view_sort
description: Returns the existing view sort if the authorized user has access to the related database's workspace.
parameters:
- in: path
name: view_sort_id
schema:
type: integer
description: Returns the view sort related to the provided value.
required: true
tags:
- Database table view sortings
security:
- UserSource JWT: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ViewSort'
description: ''
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_SORT_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: Get database table view sort
x-summary-source: derived
patch:
operationId: update_database_table_view_sort
description: Updates the existing sort if the authorized user has access to the related database's workspace.
parameters:
- in: header
name: ClientSessionId
schema:
type: string
format: uuid
description: 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.
- in: header
name: ClientUndoRedoActionGroupId
schema:
type: string
format: uuid
description: 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.
- in: path
name: view_sort_id
schema:
type: integer
description: Updates the view sort related to the provided value.
required: true
tags:
- Database table view sortings
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedUpdateViewSort'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedUpdateViewSort'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedUpdateViewSort'
security:
- UserSource JWT: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ViewSort'
description: ''
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
- ERROR_FIELD_NOT_IN_TABLE
- ERROR_VIEW_SORT_FIELD_ALREADY_EXISTS
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_SORT_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: Update database table view sort
x-summary-source: derived
delete:
operationId: delete_database_table_view_sort
description: Deletes the existing sort if the authorized user has access to the related database's workspace.
parameters:
- in: header
name: ClientSessionId
schema:
type: string
format: uuid
description: 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.
- in: header
name: ClientUndoRedoActionGroupId
schema:
type: string
format: uuid
description: 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.
- in: path
name: view_sort_id
schema:
type: integer
description: Deletes the sort related to the provided value.
required: true
tags:
- Database table view sortings
security:
- UserSource JWT: []
- JWT: []
responses:
'204':
description: No response body
'400':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_USER_NOT_IN_GROUP
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
'404':
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Machine readable error indicating what went wrong.
enum:
- ERROR_VIEW_SORT_DOES_NOT_EXIST
detail:
oneOf:
- type: string
format: string
description: Human readable details about what went wrong.
- type: object
format: object
description: Machine readable object about what went wrong.
description: ''
summary: Delete database table view sort
x-summary-source: derived
components:
schemas:
CreateViewSort:
type: object
properties:
field:
type: integer
description: The field that must be sorted on.
order:
allOf:
- $ref: '#/components/schemas/OrderEnum'
default: ASC
description: 'Indicates the sort order direction. ASC (Ascending) is from A to Z and DESC (Descending) is from Z to A.
* `ASC` - Ascending
* `DESC` - Descending'
type:
type: string
description: Indicates the sort type. Will automatically fall back to `default` if incompatible with field type.
maxLength: 32
required:
- field
ViewSort:
type: object
properties:
id:
type: integer
readOnly: true
view:
type: integer
description: The view to which the sort applies. Each view can have his own sortings.
field:
type: integer
description: The field that must be sorted on.
order:
allOf:
- $ref: '#/components/schemas/OrderEnum'
description: 'Indicates the sort order direction. ASC (Ascending) is from A to Z and DESC (Descending) is from Z to A.
* `ASC` - Ascending
* `DESC` - Descending'
type:
type: string
description: Indicates the sort type. Will automatically fall back to `default` if incompatible with field type.
maxLength: 32
priority:
type: integer
readOnly: true
description: Position of this sorting in the ordering chain. The sorting with the lowest priority is applied first.
required:
- field
- id
- priority
- view
OrderEnum:
enum:
- ASC
- DESC
type: string
description: '* `ASC` - Ascending
* `DESC` - Descending'
PatchedUpdateViewSort:
type: object
properties:
field:
type: integer
description: The field that must be sorted on.
order:
allOf:
- $ref: '#/components/schemas/OrderEnum'
description: 'Indicates the sort order direction. ASC (Ascending) is from A to Z and DESC (Descending) is from Z to A.
* `ASC` - Ascending
* `DESC` - Descending'
type:
type: string
description: Indicates the sort type. Will automatically fall back to `default` if incompatible with field type.
maxLength: 32
PrioritizeViewSortings:
type: object
properties:
view_sort_ids:
type: array
items:
type: integer
description: View sort ids in the desired priority order. The sort with the lowest position in the list is applied first.
minItems: 1
required:
- view_sort_ids
securitySchemes:
Database_token:
type: http
scheme: bearer
bearerFormat: Token your_token
JWT:
type: http
scheme: bearer
bearerFormat: JWT your_token
UserSource_JWT:
type: http
scheme: bearer
bearerFormat: JWT your_token