Skip to content

Commit 48bb3c7

Browse files
authored
Merge pull request #442 from flashcatcloud/feat/work-item-ai-sre
docs(api): add AI SRE assignee fields to the work-item OpenAPI spec
2 parents e99f4d3 + a6db604 commit 48bb3c7

2 files changed

Lines changed: 352 additions & 16 deletions

File tree

‎api-reference/openapi.en.json‎

Lines changed: 176 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6592,13 +6592,21 @@
65926592
"description": "Parameters for creating an incident work item.",
65936593
"properties": {
65946594
"assignee_ids": {
6595-
"description": "Initial assignee member IDs. Assignees must be active members who can already read the anchor; assignment never grants access.",
6595+
"description": "Legacy alias for the initial assignees. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. Assignees must be active members who can already read the anchor; assignment never grants access.",
65966596
"items": {
65976597
"format": "int64",
65986598
"type": "integer"
65996599
},
66006600
"type": "array"
66016601
},
6602+
"assignees": {
6603+
"description": "Initial assignees. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Mutually exclusive with `assignee_ids`: sending both returns an error. `assignee_ids` is the legacy alias and is equivalent to an all-`person` list. At most 20 entries. Person assignees must be active members who can already read the anchor; assignment never grants access.",
6604+
"items": {
6605+
"$ref": "#/components/schemas/WorkItemAssignee"
6606+
},
6607+
"maxItems": 20,
6608+
"type": "array"
6609+
},
66026610
"description": {
66036611
"description": "Optional longer description (max 65,535 characters).",
66046612
"maxLength": 65535,
@@ -14456,13 +14464,21 @@
1445614464
"type": "object"
1445714465
},
1445814466
"ListWorkItemRequest": {
14459-
"description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.",
14467+
"description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.",
1446014468
"properties": {
1446114469
"assignee_id": {
14462-
"description": "Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin.",
14470+
"description": "Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. Ignored when `assignee_type` is `ai_sre`.",
1446314471
"format": "int64",
1446414472
"type": "integer"
1446514473
},
14474+
"assignee_type": {
14475+
"description": "Filter by assignee type: `person` or `ai_sre`. `ai_sre` returns items assigned to AI SRE (an AI caller uses this to list its own tasks) and does not require `assignee_id`. `person` together with `assignee_id` restricts results to that member. Omitted with a positive `assignee_id` means `person`.",
14476+
"enum": [
14477+
"person",
14478+
"ai_sre"
14479+
],
14480+
"type": "string"
14481+
},
1446614482
"cursor": {
1446714483
"description": "Pagination cursor from a previous response's `next_cursor`.",
1446814484
"type": "string"
@@ -18130,13 +18146,21 @@
1813018146
"description": "Full replacement of a work item's assignee set.",
1813118147
"properties": {
1813218148
"assignee_ids": {
18133-
"description": "New assignee member IDs, replacing the current set. An empty array clears all assignees.",
18149+
"description": "Legacy alias for the replacement assignee set. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. An empty array clears all assignees.",
1813418150
"items": {
1813518151
"format": "int64",
1813618152
"type": "integer"
1813718153
},
1813818154
"type": "array"
1813918155
},
18156+
"assignees": {
18157+
"description": "Replacement assignee set. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Mutually exclusive with `assignee_ids`: sending both returns an error. `assignee_ids` is the legacy alias and is equivalent to an all-`person` list. At most 20 entries. An empty array clears all assignees.",
18158+
"items": {
18159+
"$ref": "#/components/schemas/WorkItemAssignee"
18160+
},
18161+
"maxItems": 20,
18162+
"type": "array"
18163+
},
1814018164
"version": {
1814118165
"description": "Current item version for optimistic locking. Must match the stored version.",
1814218166
"format": "int64",
@@ -28429,6 +28453,28 @@
2842928453
],
2843028454
"type": "object"
2843128455
},
28456+
"WorkItemAssignee": {
28457+
"description": "One assignee on a work item.",
28458+
"properties": {
28459+
"id": {
28460+
"description": "Member ID. Required when `type` is `person`. Omitted when `type` is `ai_sre`.",
28461+
"format": "int64",
28462+
"type": "integer"
28463+
},
28464+
"type": {
28465+
"description": "Assignee kind: `person` (a member) or `ai_sre` (the account AI SRE).",
28466+
"enum": [
28467+
"person",
28468+
"ai_sre"
28469+
],
28470+
"type": "string"
28471+
}
28472+
},
28473+
"required": [
28474+
"type"
28475+
],
28476+
"type": "object"
28477+
},
2843228478
"WorkItemCreateResult": {
2843328479
"description": "Result of creating a work item.",
2843428480
"properties": {
@@ -28456,14 +28502,33 @@
2845628502
"WorkItemItem": {
2845728503
"description": "A structured incident work item (action or post-mortem follow-up) with its assignees.",
2845828504
"properties": {
28505+
"agent_session_id": {
28506+
"description": "ID of the AI SRE session executing this item. Omitted when no session is recorded.",
28507+
"type": "string"
28508+
},
28509+
"agent_session_venue": {
28510+
"description": "Where that AI SRE session runs: `web` or `im`. Omitted when no session is recorded.",
28511+
"enum": [
28512+
"web",
28513+
"im"
28514+
],
28515+
"type": "string"
28516+
},
2845928517
"assignee_ids": {
28460-
"description": "Member IDs of the current assignees. Never null; an empty array means unassigned.",
28518+
"description": "Member IDs of the current person assignees. AI SRE is not included. Never null; an empty array means no person assignee.",
2846128519
"items": {
2846228520
"format": "int64",
2846328521
"type": "integer"
2846428522
},
2846528523
"type": "array"
2846628524
},
28525+
"assignees": {
28526+
"description": "Current assignees. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Never null; an empty array means unassigned. `assignee_ids` is the person-only subset of this list.",
28527+
"items": {
28528+
"$ref": "#/components/schemas/WorkItemAssignee"
28529+
},
28530+
"type": "array"
28531+
},
2846728532
"converted_at_seconds": {
2846828533
"description": "Conversion time as a Unix timestamp in seconds. Present only after conversion.",
2846928534
"format": "int64",
@@ -28563,6 +28628,7 @@
2856328628
"source_kind",
2856428629
"version",
2856528630
"assignee_ids",
28631+
"assignees",
2856628632
"created_by",
2856728633
"updated_by",
2856828634
"created_at_seconds",
@@ -40265,6 +40331,20 @@
4026540331
4756301322131,
4026640332
5068740052131
4026740333
],
40334+
"assignees": [
40335+
{
40336+
"id": 3790925372131,
40337+
"type": "person"
40338+
},
40339+
{
40340+
"id": 4756301322131,
40341+
"type": "person"
40342+
},
40343+
{
40344+
"id": 5068740052131,
40345+
"type": "person"
40346+
}
40347+
],
4026840348
"created_at_seconds": 1785495329,
4026940349
"created_by": 5329873302131,
4027040350
"incident_id": "6a5f1e28807515413b384bce",
@@ -40321,7 +40401,7 @@
4032140401
"On-call/Incidents"
4032240402
],
4032340403
"x-mint": {
40324-
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.",
40404+
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Set either `assignees` or the legacy `assignee_ids`, not both (sending both returns an error). An `ai_sre` entry omits `id`.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.",
4032540405
"href": "/en/api-reference/on-call/incidents/incident-work-item-reset-assignees",
4032640406
"metadata": {
4032740407
"sidebarTitle": "Reset work item assignees"
@@ -40361,6 +40441,20 @@
4036140441
4756301322131,
4036240442
5068740052131
4036340443
],
40444+
"assignees": [
40445+
{
40446+
"id": 3790925372131,
40447+
"type": "person"
40448+
},
40449+
{
40450+
"id": 4756301322131,
40451+
"type": "person"
40452+
},
40453+
{
40454+
"id": 5068740052131,
40455+
"type": "person"
40456+
}
40457+
],
4036440458
"created_at_seconds": 1785495329,
4036540459
"created_by": 5329873302131,
4036640460
"incident_id": "6a5f1e28807515413b384bce",
@@ -40454,6 +40548,20 @@
4045440548
4756301322131,
4045540549
5068740052131
4045640550
],
40551+
"assignees": [
40552+
{
40553+
"id": 3790925372131,
40554+
"type": "person"
40555+
},
40556+
{
40557+
"id": 4756301322131,
40558+
"type": "person"
40559+
},
40560+
{
40561+
"id": 5068740052131,
40562+
"type": "person"
40563+
}
40564+
],
4045740565
"created_at_seconds": 1785495329,
4045840566
"created_by": 5329873302131,
4045940567
"incident_id": "6a5f1e28807515413b384bce",
@@ -40554,6 +40662,12 @@
4055440662
"assignee_ids": [
4055540663
3790925372131
4055640664
],
40665+
"assignees": [
40666+
{
40667+
"id": 3790925372131,
40668+
"type": "person"
40669+
}
40670+
],
4055740671
"created_at_seconds": 1785496400,
4055840672
"created_by": 3790925372131,
4055940673
"incident_id": "6a5f1e28807515413b384bce",
@@ -40606,7 +40720,7 @@
4060640720
"On-call/Incidents"
4060740721
],
4060840722
"x-mint": {
40609-
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.",
40723+
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Set either `assignees` or the legacy `assignee_ids`, not both. `assignees` entries are `{type, id?}` with `type` `person` or `ai_sre`; an `ai_sre` entry omits `id`. `assignee_ids` is equivalent to an all-`person` list. Sending both returns an error.\n- Person assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.",
4061040724
"href": "/en/api-reference/on-call/incidents/incident-work-item-create",
4061140725
"metadata": {
4061240726
"sidebarTitle": "Create a work item"
@@ -40717,6 +40831,20 @@
4071740831
4756301322131,
4071840832
5068740052131
4071940833
],
40834+
"assignees": [
40835+
{
40836+
"id": 3790925372131,
40837+
"type": "person"
40838+
},
40839+
{
40840+
"id": 4756301322131,
40841+
"type": "person"
40842+
},
40843+
{
40844+
"id": 5068740052131,
40845+
"type": "person"
40846+
}
40847+
],
4072040848
"created_at_seconds": 1785495329,
4072140849
"created_by": 5329873302131,
4072240850
"incident_id": "6a5f1e28807515413b384bce",
@@ -40734,6 +40862,12 @@
4073440862
"assignee_ids": [
4073540863
5068740052131
4073640864
],
40865+
"assignees": [
40866+
{
40867+
"id": 5068740052131,
40868+
"type": "person"
40869+
}
40870+
],
4073740871
"created_at_seconds": 1785495164,
4073840872
"created_by": 3790925372131,
4073940873
"incident_id": "6a5f1e28807515413b384bce",
@@ -40789,7 +40923,7 @@
4078940923
"On-call/Incidents"
4079040924
],
4079140925
"x-mint": {
40792-
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.",
40926+
"content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.\n- `assignee_type` = `ai_sre` lists items assigned to AI SRE and can be used on its own.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.",
4079340927
"href": "/en/api-reference/on-call/incidents/incident-work-item-list",
4079440928
"metadata": {
4079540929
"sidebarTitle": "List work items"
@@ -40830,6 +40964,20 @@
4083040964
4756301322131,
4083140965
5068740052131
4083240966
],
40967+
"assignees": [
40968+
{
40969+
"id": 3790925372131,
40970+
"type": "person"
40971+
},
40972+
{
40973+
"id": 4756301322131,
40974+
"type": "person"
40975+
},
40976+
{
40977+
"id": 5068740052131,
40978+
"type": "person"
40979+
}
40980+
],
4083340981
"created_at_seconds": 1785495329,
4083440982
"created_by": 5329873302131,
4083540983
"incident_id": "6a5f1e28807515413b384bce",
@@ -40847,6 +40995,12 @@
4084740995
"assignee_ids": [
4084840996
5068740052131
4084940997
],
40998+
"assignees": [
40999+
{
41000+
"id": 5068740052131,
41001+
"type": "person"
41002+
}
41003+
],
4085041004
"created_at_seconds": 1785495164,
4085141005
"created_by": 3790925372131,
4085241006
"incident_id": "6a5f1e28807515413b384bce",
@@ -40941,6 +41095,20 @@
4094141095
4756301322131,
4094241096
5068740052131
4094341097
],
41098+
"assignees": [
41099+
{
41100+
"id": 3790925372131,
41101+
"type": "person"
41102+
},
41103+
{
41104+
"id": 4756301322131,
41105+
"type": "person"
41106+
},
41107+
{
41108+
"id": 5068740052131,
41109+
"type": "person"
41110+
}
41111+
],
4094441112
"created_at_seconds": 1785495329,
4094541113
"created_by": 5329873302131,
4094641114
"incident_id": "6a5f1e28807515413b384bce",

0 commit comments

Comments
 (0)