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 This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n \n
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 This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n
\ncurl 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 This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n
\ncurl 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 This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n
\ncurl 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]"'