Skip to content

Commit 87bc21a

Browse files
feat: UTC-405: Role and search filtering in Project bulk assign endpoint (#197)
Co-authored-by: robot-ci-heartex <robot-ci-heartex@users.noreply.github.com>
1 parent 36fc93c commit 87bc21a

File tree

1 file changed

+128
-0
lines changed

1 file changed

+128
-0
lines changed

fern/openapi/openapi.yaml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5750,6 +5750,25 @@ paths:
57505750
required: false
57515751
schema:
57525752
type: integer
5753+
- description: |
5754+
Filter members by organization role. Accepts single role or comma-separated list of roles.
5755+
5756+
**Format:**
5757+
- Single role: `?role=RE`
5758+
- Multiple roles: `?role=AN,RE` (users with ANY of these roles)
5759+
5760+
**Role Codes:**
5761+
- `OW` = Owner
5762+
- `AD` = Administrator
5763+
- `MA` = Manager
5764+
- `RE` = Reviewer
5765+
- `AN` = Annotator
5766+
- `NO` = Not Activated
5767+
- `DI` = Disabled
5768+
in: query
5769+
name: role
5770+
schema:
5771+
type: string
57535772
- description: A search term.
57545773
in: query
57555774
name: search
@@ -7057,6 +7076,11 @@ paths:
70577076
name: search
70587077
schema:
70597078
type: string
7079+
- description: Filter current_state by exact match
7080+
in: query
7081+
name: state
7082+
schema:
7083+
type: string
70607084
- description: Filter title by contains (case-insensitive)
70617085
in: query
70627086
name: title
@@ -7160,6 +7184,11 @@ paths:
71607184
name: search
71617185
schema:
71627186
type: string
7187+
- description: Filter current_state by exact match
7188+
in: query
7189+
name: state
7190+
schema:
7191+
type: string
71637192
- description: Filter title by contains (case-insensitive)
71647193
in: query
71657194
name: title
@@ -8490,6 +8519,16 @@ paths:
84908519
required: true
84918520
schema:
84928521
type: integer
8522+
- description: Filter by last activity (ISO 8601 formatted date). Only when all=True.
8523+
in: query
8524+
name: last_activity__gte
8525+
schema:
8526+
type: string
8527+
- description: Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)
8528+
in: query
8529+
name: role
8530+
schema:
8531+
type: string
84938532
- description: Search term for filtering members by name, email, or username. Only when all=True.
84948533
in: query
84958534
name: search
@@ -8533,6 +8572,16 @@ paths:
85338572
required: true
85348573
schema:
85358574
type: integer
8575+
- description: Filter by last activity (ISO 8601 formatted date). Only when all=True.
8576+
in: query
8577+
name: last_activity__gte
8578+
schema:
8579+
type: string
8580+
- description: Filter by role, project roles take precedence over organization roles. Only when all=True. (comma-separated values)
8581+
in: query
8582+
name: role
8583+
schema:
8584+
type: string
85368585
- description: Search term for filtering members by name, email, or username. Only when all=True.
85378586
in: query
85388587
name: search
@@ -8582,6 +8631,14 @@ paths:
85828631
</p>
85838632
</Card>
85848633
Retrieve the members for a specific project.
8634+
8635+
**Response Fields:**
8636+
- `implicit_member` (boolean): Indicates if the user is an implicit member.
8637+
- `true`: User has access via workspace membership or organization role (Administrator/Owner)
8638+
- `false`: User is an explicit project member (added directly to the project)
8639+
- `project_role` (string|null): Project-specific role override if assigned, null otherwise
8640+
8641+
**Note:** Users can have both explicit membership AND implicit access. The `implicit_member` field is `false` if the user has an explicit ProjectMember entry, regardless of whether they also have implicit access via workspace or org role.
85858642
operationId: api_projects_members_paginated_list
85868643
parameters:
85878644
- in: path
@@ -8599,11 +8656,30 @@ paths:
85998656
name: implicit
86008657
schema:
86018658
type: boolean
8659+
- description: Filter by last activity time (ISO 8601 datetime). Returns users with last activity greater than or equal to this time.
8660+
in: query
8661+
name: last_activity__gte
8662+
schema:
8663+
format: date-time
8664+
type: string
86028665
- description: Exclude annotators from the results
86038666
in: query
86048667
name: no_annotators
86058668
schema:
86068669
type: boolean
8670+
- description: |-
8671+
Ordering field. Prefix with "-" for descending order. Allowed fields: id, email, first_name, last_name, username, last_activity, role, date_joined
8672+
8673+
**Note on role ordering:**
8674+
When ordering by "role", the system uses the effective role:
8675+
- Project-specific role if assigned (takes precedence)
8676+
- Organization role if no project role is assigned
8677+
8678+
Roles are sorted alphabetically by their code: AD (Administrator), AN (Annotator), DI (Disabled), MA (Manager), NO (Not Activated), OW (Owner), RE (Reviewer)
8679+
in: query
8680+
name: ordering
8681+
schema:
8682+
type: string
86078683
- description: A page number within the paginated result set.
86088684
in: query
86098685
name: page
@@ -8616,6 +8692,30 @@ paths:
86168692
required: false
86178693
schema:
86188694
type: integer
8695+
- description: |-
8696+
Filter members by role. Accepts single role or comma-separated list of roles.
8697+
8698+
**Format:**
8699+
- Single role: `?role=RE`
8700+
- Multiple roles: `?role=AN,RE` (users with ANY of these roles)
8701+
8702+
**Role Codes:**
8703+
- `OW` = Owner
8704+
- `AD` = Administrator
8705+
- `MA` = Manager
8706+
- `RE` = Reviewer
8707+
- `AN` = Annotator
8708+
8709+
**Matching Logic:**
8710+
Returns users who have any of the specified roles either:
8711+
1. As their **project-specific role** (from project role assignments), OR
8712+
2. As their **organization role** (if they have no project-specific role override)
8713+
8714+
**Note:** Project-specific roles take precedence. If a user has a project role assigned, their organization role is ignored for filtering purposes.
8715+
in: query
8716+
name: role
8717+
schema:
8718+
type: string
86198719
- description: Search term for filtering members by name, email, or username
86208720
in: query
86218721
name: search
@@ -19453,6 +19553,9 @@ components:
1945319553
description: Start model training after any annotations are submitted or updated
1945419554
readOnly: true
1945519555
type: boolean
19556+
state:
19557+
readOnly: true
19558+
type: string
1945619559
task_number:
1945719560
description: Total task number in project
1945819561
readOnly: true
@@ -19507,6 +19610,7 @@ components:
1950719610
- reviewer_queue_total
1950819611
- skipped_annotations_number
1950919612
- start_training_on_annotation_update
19613+
- state
1951019614
- task_number
1951119615
- total_annotations_number
1951219616
- total_predictions_number
@@ -24505,6 +24609,9 @@ components:
2450524609
description: Start model training after any annotations are submitted or updated
2450624610
readOnly: true
2450724611
type: boolean
24612+
state:
24613+
readOnly: true
24614+
type: string
2450824615
task_data_login:
2450924616
description: 'Task data credentials: login'
2451024617
maxLength: 256
@@ -24564,6 +24671,7 @@ components:
2456424671
- reviewer_queue_total
2456524672
- skipped_annotations_number
2456624673
- start_training_on_annotation_update
24674+
- state
2456724675
- task_number
2456824676
- total_annotations_number
2456924677
- total_predictions_number
@@ -24785,6 +24893,9 @@ components:
2478524893
description: Start model training after any annotations are submitted or updated
2478624894
readOnly: true
2478724895
type: boolean
24896+
state:
24897+
readOnly: true
24898+
type: string
2478824899
task_data_login:
2478924900
description: 'Task data credentials: login'
2479024901
maxLength: 256
@@ -24832,6 +24943,7 @@ components:
2483224943
- queue_total
2483324944
- skipped_annotations_number
2483424945
- start_training_on_annotation_update
24946+
- state
2483524947
- task_number
2483624948
- total_annotations_number
2483724949
- total_predictions_number
@@ -25204,6 +25316,9 @@ components:
2520425316
description: Start model training after any annotations are submitted or updated
2520525317
readOnly: true
2520625318
type: boolean
25319+
state:
25320+
readOnly: true
25321+
type: string
2520725322
task_data_login:
2520825323
description: 'Task data credentials: login'
2520925324
maxLength: 256
@@ -25267,6 +25382,7 @@ components:
2526725382
- reviewer_queue_total
2526825383
- skipped_annotations_number
2526925384
- start_training_on_annotation_update
25385+
- state
2527025386
- task_number
2527125387
- total_annotations_number
2527225388
- total_predictions_number
@@ -25474,6 +25590,9 @@ components:
2547425590
description: Start model training after any annotations are submitted or updated
2547525591
readOnly: true
2547625592
type: boolean
25593+
state:
25594+
readOnly: true
25595+
type: string
2547725596
task_data_login:
2547825597
description: 'Task data credentials: login'
2547925598
maxLength: 256
@@ -25527,6 +25646,7 @@ components:
2552725646
- review_settings
2552825647
- skipped_annotations_number
2552925648
- start_training_on_annotation_update
25649+
- state
2553025650
- task_number
2553125651
- total_annotations_number
2553225652
- total_predictions_number
@@ -28031,6 +28151,9 @@ components:
2803128151
id:
2803228152
readOnly: true
2803328153
type: integer
28154+
implicit_member:
28155+
readOnly: true
28156+
type: boolean
2803428157
initials:
2803528158
default: '?'
2803628159
readOnly: true
@@ -28072,6 +28195,7 @@ components:
2807228195
- active_organization_meta
2807328196
- avatar
2807428197
- id
28198+
- implicit_member
2807528199
- initials
2807628200
- last_activity
2807728201
- lse_fields
@@ -30370,6 +30494,9 @@ components:
3037030494
description: Start model training after any annotations are submitted or updated
3037130495
readOnly: true
3037230496
type: boolean
30497+
state:
30498+
readOnly: true
30499+
type: string
3037330500
task_data_login:
3037430501
description: 'Task data credentials: login'
3037530502
maxLength: 256
@@ -30415,6 +30542,7 @@ components:
3041530542
- queue_total
3041630543
- skipped_annotations_number
3041730544
- start_training_on_annotation_update
30545+
- state
3041830546
- task_number
3041930547
- total_annotations_number
3042030548
- total_predictions_number

0 commit comments

Comments
 (0)