openapi: 3.1.0 info: title: API Reference subpackage_actions subpackage_projects.subpackage_projects/roles API version: 1.0.0 servers: - url: http://localhost:8000 tags: - name: subpackage_projects.subpackage_projects/roles paths: /api/projects/roles/: get: operationId: list summary: ✨ List project roles for current user description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\n\n List project roles for requested IDs for the current user\n " tags: - subpackage_projects.subpackage_projects/roles parameters: - name: ids in: query required: false schema: type: integer - name: ordering in: query description: Which field to use when ordering the results. required: false schema: type: string - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/ProjectRole' post: operationId: add summary: ✨ Create project role for user description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\n\n Create project role for user allowing the user the same access level provided by organization role.\n " tags: - subpackage_projects.subpackage_projects/roles parameters: - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '201': description: Role created content: application/json: schema: $ref: '#/components/schemas/ProjectRole' requestBody: content: application/json: schema: $ref: '#/components/schemas/ProjectRoleRequest' /api/projects/roles/{id}/: delete: operationId: remove summary: ✨ Remove project role for user description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\n\n Remove project role for user allowing the user the same access level provided by organization role.\n " tags: - subpackage_projects.subpackage_projects/roles parameters: - name: id in: path description: A unique integer value identifying this project role. required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: Successful response /api/projects/{id}/roles: get: operationId: get summary: ✨ List project roles description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\n\n List users and their project level roles for a given project.\n If user is not listed here and is a member of the project then they would behave as assigned role in organization.\n " tags: - subpackage_projects.subpackage_projects/roles parameters: - name: id in: path required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/ProjectRole' components: schemas: Role9e7Enum: type: string enum: - OW - AD - MA - RE - AN - DI - 'NO' description: '* `OW` - Owner * `AD` - Administrator * `MA` - Manager * `RE` - Reviewer * `AN` - Annotator * `DI` - Deactivated * `NO` - Not Activated' title: Role9e7Enum ProjectRole: type: object properties: id: type: integer project: type: integer role: $ref: '#/components/schemas/Role9e7Enum' user: type: integer required: - id - project - role - user title: ProjectRole ProjectRoleRequest: type: object properties: project: type: integer role: $ref: '#/components/schemas/Role9e7Enum' user: type: integer required: - project - role - user title: ProjectRoleRequest securitySchemes: Token: type: apiKey in: header name: Authorization description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
'