{ "opencollection": "1.0.0", "info": { "name": "Baserow API spec Admin Database table views API", "version": "2.2.2" }, "items": [ { "info": { "name": "Database table views", "type": "folder" }, "items": [ { "info": { "name": "premium_view_attributes_update", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/database/view/:view_id/premium", "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Sets show_logo of this view." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Sets view attributes only available for premium users." }, { "info": { "name": "database_table_public_view_link_row_field_lookup", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/:slug/link-row-field-lookup/:field_id/", "params": [ { "name": "field_id", "value": "", "type": "path", "description": "The field id of the link row field." }, { "name": "search", "value": "", "type": "query", "description": "If provided only rows with data that matches the search query are going to be returned." }, { "name": "search_mode", "value": "", "type": "query", "description": "If provided, allows API consumers to determine what kind of search experience they wish to have. If the default `SearchMode.FT_WITH_COUNT` is used, then Postgres full-text search is used. If `SearchMode.COMPAT` is provided then the search term will be exactly searched for including whitespace on each cell. This is the Baserow legacy search behaviour." }, { "name": "slug", "value": "", "type": "path", "description": "The slug related to the view." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "If the view is publicly shared or if an authenticated user has access to the related workspace, then this endpoint can be used to do a value lookup of the link row fields that are included in the view. Normally it is not possible for a not authenticated visitor to fetch the rows of a table. This endpoint makes it possible to fetch the id and primary field value of the related table of a link row included in the view." }, { "info": { "name": "public_view_token_auth", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/:slug/public/auth/", "params": [ { "name": "slug", "value": "", "type": "path", "description": "The slug of the grid view to get public information about." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a valid never-expiring JWT token for this public shared view if the password provided matches with the one saved by the view's owner." }, { "info": { "name": "get_public_view_info", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/:slug/public/info/", "params": [ { "name": "slug", "value": "", "type": "path", "description": "The slug of the view to get public information about." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the required public information to display a single shared view." }, { "info": { "name": "get_public_view_row", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/:slug/row/:row_id/", "params": [ { "name": "row_id", "value": "", "type": "path", "description": "The ID of the row to retrieve from the public view." }, { "name": "slug", "value": "", "type": "path", "description": "The slug of the view from which to get the row data." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the data for a specific row in a publicly shared view, identified by the view’s slug and the row’s ID." }, { "info": { "name": "get_database_table_view", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/:view_id/", "params": [ { "name": "include", "value": "", "type": "query", "description": "A comma separated list of extra attributes to include on the returned view. The supported attributes are `filters`, `sortings` and `decorations`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively." }, { "name": "view_id", "value": "", "type": "path", "description": "Returns the view related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the existing view. Depending on the type different properties could be returned." }, { "info": { "name": "update_database_table_view", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/database/views/:view_id/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "include", "value": "", "type": "query", "description": "A comma separated list of extra attributes to include on the returned view. The supported attributes are `filters`, `sortings` and `decorations`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively." }, { "name": "view_id", "value": "", "type": "path", "description": "Updates the view related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the existing view. The type cannot be changed. It depends on the existing type which properties can be changed." }, { "info": { "name": "delete_database_table_view", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/database/views/:view_id/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Deletes the view related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the existing view. Note that all the related settings of the view are going to be deleted also. The data stays intact after deleting the view because this is related to the table and not the view." }, { "info": { "name": "update_view_default_values", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/database/views/:view_id/default-values/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Updates the default row values for the view with the given id." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the default row values for the specified view. Accepts a list of default value objects, each specifying the field, whether the default is enabled, an optional raw value, and an optional function name (e.g. 'now') for dynamic defaults." }, { "info": { "name": "duplicate_database_table_view", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/:view_id/duplicate/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Duplicates the view related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Duplicates an existing view if the user has access to it. When a view is duplicated everything is copied except:\n- The name is appended with the copy number. Ex: `ViewName`->`ViewName(2)` and `View(2)`->`View(3)`\n- If the original view is publicly shared, the new view will not be shared anymore" }, { "info": { "name": "get_database_table_view_field_options", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/:view_id/field-options/", "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Responds with field options related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Responds with the fields options of the provided view if the authenticated user has access to the related workspace." }, { "info": { "name": "update_database_table_view_field_options", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/database/views/:view_id/field-options/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Updates the field options related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the field options of a view. The field options differ per field type This could for example be used to update the field width of a `grid` view if the user changes it." }, { "info": { "name": "rotate_database_view_slug", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/:view_id/rotate-slug/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Rotates the slug of the view related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Rotates the unique slug of the view by replacing it with a new value. This would mean that the publicly shared URL of the view will change. Anyone with the old URL won't be able to access the viewanymore. Only view types which are sharable can have their slugs rotated." }, { "info": { "name": "calendar_ical_feed", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/calendar/:ical_slug.ics", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "ical_slug", "value": "", "type": "path", "description": "ICal feed unique slug." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns ICal feed for a specific Calendar view identified by ical_slug value. Calendar View resource contains full url in .ical_feed_url field." }, { "info": { "name": "rotate_calendar_view_ical_feed_slug", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/calendar/:view_id/ical_slug_rotate/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "view_id", "value": "", "type": "path", "description": "Rotates the ical feed slug of the calendar view related to the provided id." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Rotates the unique slug of the calendar view's ical feed by replacing it with a new value. This would mean that the publicly shared URL of the view will change. Anyone with the old URL won't be able to access the view anymore." }, { "info": { "name": "list_database_table_views", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/database/views/table/:table_id/", "params": [ { "name": "include", "value": "", "type": "query", "description": "A comma separated list of extra attributes to include on each view in the response. The supported attributes are `filters`, `sortings`, `decorations`, `group_bys` and `default_row_values`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum amount of views that must be returned. This endpoint doesn't support pagination, but if you for example just need to fetch the first view, you can do that by setting a limit. There isn't a limit by default." }, { "name": "table_id", "value": "", "type": "path", "description": "Returns only views of the table related to the provided value." }, { "name": "type", "value": "", "type": "query", "description": "Optionally filter on the view type. If provided, only views of that type will be returned." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all views of the table related to the provided `table_id`. If the workspace is related to a template, then this endpoint will be publicly accessible. A table can have multiple views. Each view can display the data in a different way. For example the `grid` view shows the in a spreadsheet like way. That type has custom endpoints for data retrieval and manipulation. In the future other views types like a calendar or Kanban are going to be added. Each type can have different properties." }, { "info": { "name": "create_database_table_view", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/table/:table_id/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "include", "value": "", "type": "query", "description": "A comma separated list of extra attributes to include on each view in the response. The supported attributes are `filters`, `sortings` and `decorations`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively." }, { "name": "table_id", "value": "", "type": "path", "description": "Creates a view for the table related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a new view for the table related to the provided `table_id` parameter. Depending on the type, different properties can optionally be set." }, { "info": { "name": "order_database_table_views", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/database/views/table/:table_id/order/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "table_id", "value": "", "type": "path", "description": "Updates the order of the views in the table related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Changes the order of the provided view ids to the matching position that the id has in the list. The order of the not provided views will be set to `0`." } ] } ], "bundled": true }