{ "opencollection": "1.0.0", "info": { "name": "Baserow API spec Admin API", "version": "2.2.2" }, "items": [ { "info": { "name": "Admin", "type": "folder" }, "items": [ { "info": { "name": "admin_dashboard", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/admin/dashboard/", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the new and active users for the last 24 hours, 7 days and 30 days. The `previous_` values are the values of the period before, so for example `previous_new_users_last_24_hours` are the new users that signed up from 48 to 24 hours ago. It can be used to calculate an increase or decrease in the amount of signups. A list of the new and active users for every day for the last 30 days is also included." }, { "info": { "name": "admin_list_users", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/admin/users/", "params": [ { "name": "ids", "value": "", "type": "query", "description": "A comma-separated list of users IDs to filter by. When provided, only users with those IDs are returned." }, { "name": "page", "value": "", "type": "query", "description": "Defines which page should be returned." }, { "name": "search", "value": "", "type": "query", "description": "If provided only users with id or username or first_name that match the query will be returned." }, { "name": "size", "value": "", "type": "query", "description": "Defines how many users should be returned per page." }, { "name": "sorts", "value": "", "type": "query", "description": "A comma separated string of attributes to sort by, each attribute must be prefixed with `+` for a descending sort or a `-` for an ascending sort. The accepted attribute names are: `id, is_active, name, username, date_joined, last_login`. For example `sorts=-id,-is_active` will sort the users first by descending id and then ascending is_active. A sortparameter with multiple instances of the same sort attribute will respond with the ERROR_INVALID_SORT_ATTRIBUTE error." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns all users with detailed information on each user, if the requesting user is staff." }, { "info": { "name": "admin_create_user", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/admin/users/", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates and returns a new user if the requesting user is staff. This works even if new signups are disabled." }, { "info": { "name": "admin_edit_user", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/admin/users/:user_id/", "params": [ { "name": "user_id", "value": "", "type": "path", "description": "The id of the user to edit" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates specified user attributes and returns the updated user if the requesting user is staff. You cannot update yourself to no longer be an admin or active." }, { "info": { "name": "admin_delete_user", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/admin/users/:user_id/", "params": [ { "name": "user_id", "value": "", "type": "path", "description": "The id of the user to delete" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the specified user, if the requesting user has admin permissions. You cannot delete yourself." }, { "info": { "name": "admin_impersonate_user", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/admin/users/impersonate/", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "This endpoint allows staff to impersonate another user by requesting a JWT token and user object. The requesting user must have staff access in order to do this. It's not possible to impersonate a superuser or staff." }, { "info": { "name": "admin_list_workspaces", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/admin/workspaces/", "params": [ { "name": "ids", "value": "", "type": "query", "description": "A comma-separated list of workspaces IDs to filter by. When provided, only workspaces with those IDs are returned." }, { "name": "page", "value": "", "type": "query", "description": "Defines which page should be returned." }, { "name": "search", "value": "", "type": "query", "description": "If provided only workspaces with id or name that match the query will be returned." }, { "name": "size", "value": "", "type": "query", "description": "Defines how many workspaces should be returned per page." }, { "name": "sorts", "value": "", "type": "query", "description": "A comma separated string of attributes to sort by, each attribute must be prefixed with `+` for a descending sort or a `-` for an ascending sort. The accepted attribute names are: `id, name, application_count, created_on, row_count, storage_usage`. For example `sorts=-id,-name` will sort the workspaces first by descending id and then ascending name. A sortparameter with multiple instances of the same sort attribute will respond with the ERROR_INVALID_SORT_ATTRIBUTE error." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns all workspaces with detailed information on each workspace, if the requesting user is staff." }, { "info": { "name": "admin_delete_workspace", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/admin/workspaces/:workspace_id/", "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The id of the workspace to delete" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the specified workspace and the applications inside that workspace, if the requesting user is staff." }, { "info": { "name": "admin_list_workspaces_as_options", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/admin/workspaces/options/", "params": [ { "name": "ids", "value": "", "type": "query", "description": "A comma-separated list of workspaces IDs to filter by. When provided, only workspaces with those IDs are returned." }, { "name": "page", "value": "", "type": "query", "description": "Defines which page should be returned." }, { "name": "search", "value": "", "type": "query", "description": "If provided only workspaces with name that match the query will be returned." }, { "name": "size", "value": "", "type": "query", "description": "Defines how many workspaces should be returned per page." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all workspaces. This endpoint is intended for admin-level features that need a workspace dropdown." }, { "info": { "name": "admin_licenses", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/licenses/", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all the valid licenses that are registered to this instance. A premium license can be used to unlock the premium features for a fixed amount of users. An enterprise license can similarly be used to unlock enterprise features. More information about self hosted licenses can be found on our pricing page https://baserow.io/pricing." }, { "info": { "name": "admin_register_license", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/licenses/", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Registers a new license. After registering you can assign users to the license that will be able to use the license's features while the license is active. If an existing license with the same `license_id` already exists and the provided license has been issued later than that one, the existing one will be upgraded." }, { "info": { "name": "admin_get_license", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/licenses/:id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Responds with detailed information about the license related to the provided parameter." }, { "info": { "name": "admin_remove_license", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/licenses/:id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Removes the existing license related to the provided parameter. If the license is active, then all the users that are using the license will lose access to the features granted by that license." }, { "info": { "name": "admin_add_user_to_license", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/licenses/:id/:user_id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." }, { "name": "user_id", "value": "", "type": "path", "description": "The ID of the user that must be added to the license." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Adds the user related to the provided parameter and to the license related to the parameter. This only happens if there are enough seats left on the license and if the user is not already on the license." }, { "info": { "name": "admin_remove_user_from_license", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/licenses/:id/:user_id/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." }, { "name": "user_id", "value": "", "type": "path", "description": "The ID of the user that must be removed from the license." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Removes the user related to the provided parameter and to the license related to the parameter. This only happens if the user is on the license, otherwise nothing will happen." }, { "info": { "name": "admin_license_check", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/licenses/:id/check/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "This endpoint checks with the authority if the license needs to be updated. It also checks if the license is operating within its limits and might take action on that. It could also happen that the license has been deleted because there is an instance id mismatch or because it's invalid. In that case a `204` status code is returned." }, { "info": { "name": "admin_fill_remaining_seats_of_license", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/licenses/:id/fill-seats/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Fills the remaining empty seats of the license with the first users that are found." }, { "info": { "name": "admin_license_lookup_users", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/licenses/:id/lookup-users/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." }, { "name": "page", "value": "", "type": "query", "description": "Defines which page of users should be returned." }, { "name": "search", "value": "", "type": "query", "description": "If provided, only users where the name or email contains the value are returned." }, { "name": "size", "value": "", "type": "query", "description": "Defines how many users should be returned per page." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "This endpoint can be used to lookup users that can be added to a license. Users that are already in the license are not returned here. Optionally a `search` query parameter can be provided to filter the results." }, { "info": { "name": "admin_remove_all_users_from_license", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/licenses/:id/remove-all-users/", "params": [ { "name": "id", "value": "", "type": "path", "description": "The internal identifier of the license, this is `id` and not `license_id`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Removes all the users that are on the license. This will empty all the seats." } ] } ], "bundled": true }