openapi: 3.0.3 info: title: Baserow API spec Admin Field permissions API version: 2.2.2 description: 'For more information about our REST API, please visit [this page](https://baserow.io/docs/apis%2Frest-api). For more information about our deprecation policy, please visit [this page](https://baserow.io/docs/apis%2Fdeprecations).' contact: url: https://baserow.io/contact license: name: MIT url: https://github.com/baserow/baserow/blob/develop/LICENSE tags: - name: Field permissions paths: /api/field-permissions/{field_id}/: get: operationId: get_field_permissions description: 'Retrieve the permissions for writing field values and form visibility of a specific field. This is a **enterprise** feature.' parameters: - in: path name: field_id schema: type: integer description: The ID of the field to get the permissions for. required: true tags: - Field permissions security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/UpdateFieldPermissionsResponse' 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 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_FIELD_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: '' patch: operationId: update_field_permissions description: 'Update permissions for writing field values and form visibility for a specific field. This endpoint is used to restrict the ability to modify field values to the roles defined. It also makes it possible to decide if the field can be exposed in forms or not. This is a **enterprise** feature.' parameters: - in: path name: field_id schema: type: integer description: The ID of the field to update the permissions for. required: true tags: - Field permissions requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedUpdateFieldPermissionsRequest' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedUpdateFieldPermissionsRequest' multipart/form-data: schema: $ref: '#/components/schemas/PatchedUpdateFieldPermissionsRequest' security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/UpdateFieldPermissionsResponse' 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 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_FIELD_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: '' components: schemas: PatchedUpdateFieldPermissionsRequest: type: object properties: role: allOf: - $ref: '#/components/schemas/RoleEnum' description: 'The role required to update the data for this field. * `ADMIN` - Admin * `BUILDER` - Builder * `EDITOR` - Editor * `NOBODY` - Nobody' allow_in_forms: type: boolean default: false description: 'Whether to allow this field to be shown in forms. Default is False. This setting is only relevant if the role is not ''EDITOR''. ' UpdateFieldPermissionsResponse: type: object properties: role: allOf: - $ref: '#/components/schemas/RoleEnum' description: 'The role required to update the data for this field. * `ADMIN` - Admin * `BUILDER` - Builder * `EDITOR` - Editor * `NOBODY` - Nobody' allow_in_forms: type: boolean default: false description: 'Whether to allow this field to be shown in forms. Default is False. This setting is only relevant if the role is not ''EDITOR''. ' field_id: type: integer description: The ID of the field whose permissions were updated. can_write_values: type: boolean description: Whether the user can write values to this field. required: - field_id - role RoleEnum: enum: - ADMIN - BUILDER - EDITOR - NOBODY type: string description: '* `ADMIN` - Admin * `BUILDER` - Builder * `EDITOR` - Editor * `NOBODY` - Nobody' 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