@allocator-one/harness-cli 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/spec/openapi.json CHANGED
@@ -14,26 +14,25 @@
14
14
  },
15
15
  "openapi": "3.0.0",
16
16
  "paths": {
17
- "/api/v1/attachments/{attachment_id}/{file}": {
18
- "get": {
17
+ "/api/v1/teams/{team_key}/workflow_states/{id}": {
18
+ "delete": {
19
19
  "callbacks": {},
20
20
  "deprecated": false,
21
- "description": "Requires the `harness:read` scope. Streams the attachment bytes (binary response).",
21
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Refused with 409 while issues still sit in the state — issues.state_id has no cascade, so deleting it would strand them in a state that no longer exists.",
22
22
  "parameters": [
23
23
  {
24
- "description": "Attachment UUID (the directory segment of the upload's URL)",
24
+ "description": "Team key, e.g. ALL",
25
25
  "in": "path",
26
- "name": "attachment_id",
26
+ "name": "team_key",
27
27
  "required": true,
28
28
  "schema": {
29
- "format": "uuid",
30
29
  "type": "string"
31
30
  }
32
31
  },
33
32
  {
34
- "description": "Stored filename (the final segment of the upload's URL)",
33
+ "description": "Resource id",
35
34
  "in": "path",
36
- "name": "file",
35
+ "name": "id",
37
36
  "required": true,
38
37
  "schema": {
39
38
  "type": "string"
@@ -44,6 +43,9 @@
44
43
  "200": {
45
44
  "description": "Success"
46
45
  },
46
+ "204": {
47
+ "description": "Deleted"
48
+ },
47
49
  "400": {
48
50
  "description": "Bad request"
49
51
  },
@@ -56,31 +58,61 @@
56
58
  "404": {
57
59
  "description": "Not found"
58
60
  },
61
+ "409": {
62
+ "description": "Issues are still in this state"
63
+ },
59
64
  "422": {
60
65
  "description": "Validation error"
61
66
  }
62
67
  },
63
- "summary": "Download an attachment",
68
+ "summary": "Delete a workflow state",
64
69
  "tags": []
65
- }
66
- },
67
- "/api/v1/cli/token-exchange": {
68
- "post": {
70
+ },
71
+ "patch": {
69
72
  "callbacks": {},
70
73
  "deprecated": false,
71
- "description": "Requires the `none (the code is the credential)` scope. Unauthenticated, tightly IP-rate-limited. Redeems the 60-second single-use code from the /cli/login browser handoff for a 30-day login token; the PKCE code_verifier must hash to the challenge the code was minted with.",
72
- "parameters": [],
74
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Name, type, and colour. A state belonging to another team answers 404.",
75
+ "parameters": [
76
+ {
77
+ "description": "Team key, e.g. ALL",
78
+ "in": "path",
79
+ "name": "team_key",
80
+ "required": true,
81
+ "schema": {
82
+ "type": "string"
83
+ }
84
+ },
85
+ {
86
+ "description": "Resource id",
87
+ "in": "path",
88
+ "name": "id",
89
+ "required": true,
90
+ "schema": {
91
+ "type": "string"
92
+ }
93
+ }
94
+ ],
73
95
  "requestBody": {
74
96
  "content": {
75
97
  "application/json": {
76
98
  "schema": {
77
99
  "properties": {
78
- "code": {
79
- "description": "Single-use login code from the browser handoff",
100
+ "color": {
101
+ "maxLength": 255,
80
102
  "type": "string"
81
103
  },
82
- "code_verifier": {
83
- "description": "PKCE verifier whose SHA-256 the code was bound to",
104
+ "name": {
105
+ "maxLength": 255,
106
+ "type": "string"
107
+ },
108
+ "type": {
109
+ "enum": [
110
+ "backlog",
111
+ "unstarted",
112
+ "started",
113
+ "completed",
114
+ "canceled"
115
+ ],
84
116
  "type": "string"
85
117
  }
86
118
  },
@@ -98,7 +130,7 @@
98
130
  "description": "Bad request"
99
131
  },
100
132
  "401": {
101
- "description": "Invalid, expired, used, or verifier-mismatched code"
133
+ "description": "Missing or invalid token"
102
134
  },
103
135
  "403": {
104
136
  "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
@@ -110,62 +142,83 @@
110
142
  "description": "Validation error"
111
143
  }
112
144
  },
113
- "summary": "Redeem a CLI login code",
145
+ "summary": "Update a workflow state",
114
146
  "tags": []
115
147
  }
116
148
  },
117
- "/api/v1/documents": {
149
+ "/api/v1/issues/{identifier}/comments": {
118
150
  "get": {
119
151
  "callbacks": {},
120
152
  "deprecated": false,
121
153
  "description": "Requires the `harness:read` scope.",
122
154
  "parameters": [
123
155
  {
124
- "description": "Page number (default 1)",
125
- "in": "query",
126
- "name": "page",
127
- "required": false,
156
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
157
+ "in": "path",
158
+ "name": "identifier",
159
+ "required": true,
128
160
  "schema": {
129
- "type": "integer"
161
+ "type": "string"
130
162
  }
163
+ }
164
+ ],
165
+ "responses": {
166
+ "200": {
167
+ "description": "Success"
131
168
  },
132
- {
133
- "description": "Items per page (max 100)",
134
- "in": "query",
135
- "name": "page_size",
136
- "required": false,
137
- "schema": {
138
- "type": "integer"
139
- }
169
+ "400": {
170
+ "description": "Bad request"
140
171
  },
141
- {
142
- "description": "title, inserted_at, or updated_at",
143
- "in": "query",
144
- "name": "order_by",
145
- "required": false,
146
- "schema": {
147
- "type": "string"
148
- }
172
+ "401": {
173
+ "description": "Missing or invalid token"
149
174
  },
150
- {
151
- "description": "asc or desc (default asc)",
152
- "in": "query",
153
- "name": "order_dir",
154
- "required": false,
155
- "schema": {
156
- "type": "string"
157
- }
175
+ "403": {
176
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
158
177
  },
178
+ "404": {
179
+ "description": "Not found"
180
+ },
181
+ "422": {
182
+ "description": "Validation error"
183
+ }
184
+ },
185
+ "summary": "List issue comments",
186
+ "tags": []
187
+ },
188
+ "post": {
189
+ "callbacks": {},
190
+ "deprecated": false,
191
+ "description": "Requires the `harness:write` scope.",
192
+ "parameters": [
159
193
  {
160
- "description": "Match document title",
161
- "in": "query",
162
- "name": "search",
163
- "required": false,
194
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
195
+ "in": "path",
196
+ "name": "identifier",
197
+ "required": true,
164
198
  "schema": {
165
199
  "type": "string"
166
200
  }
167
201
  }
168
202
  ],
203
+ "requestBody": {
204
+ "content": {
205
+ "application/json": {
206
+ "schema": {
207
+ "properties": {
208
+ "actor": {
209
+ "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
210
+ "type": "string"
211
+ },
212
+ "body": {
213
+ "type": "string"
214
+ }
215
+ },
216
+ "type": "object"
217
+ }
218
+ }
219
+ },
220
+ "required": true
221
+ },
169
222
  "responses": {
170
223
  "200": {
171
224
  "description": "Success"
@@ -186,28 +239,64 @@
186
239
  "description": "Validation error"
187
240
  }
188
241
  },
189
- "summary": "List documents",
242
+ "summary": "Add an issue comment",
243
+ "tags": []
244
+ }
245
+ },
246
+ "/api/v1/labels": {
247
+ "get": {
248
+ "callbacks": {},
249
+ "deprecated": false,
250
+ "description": "Requires the `harness:read` scope. Each label carries `issue_count` — one grouped query for the whole list.",
251
+ "parameters": [],
252
+ "responses": {
253
+ "200": {
254
+ "description": "Success"
255
+ },
256
+ "400": {
257
+ "description": "Bad request"
258
+ },
259
+ "401": {
260
+ "description": "Missing or invalid token"
261
+ },
262
+ "403": {
263
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
264
+ },
265
+ "404": {
266
+ "description": "Not found"
267
+ },
268
+ "422": {
269
+ "description": "Validation error"
270
+ }
271
+ },
272
+ "summary": "List labels",
190
273
  "tags": []
191
274
  },
192
275
  "post": {
193
276
  "callbacks": {},
194
277
  "deprecated": false,
195
- "description": "Requires the `harness:write` scope.",
278
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is.",
196
279
  "parameters": [],
197
280
  "requestBody": {
198
281
  "content": {
199
282
  "application/json": {
200
283
  "schema": {
201
284
  "properties": {
202
- "content": {
203
- "description": "Markdown body",
285
+ "color": {
286
+ "description": "A swatch name (purple, green, red, yellow, pink, blue, orange, gray) or a three- or six-digit hex code. Hex is what imported labels carry; the settings UI renders only swatch names in their own colour. Case-insensitive; stored downcased.",
287
+ "nullable": true,
204
288
  "type": "string"
205
289
  },
206
- "project_id": {
207
- "description": "Optional project to attach the document to",
290
+ "name": {
291
+ "maxLength": 255,
208
292
  "type": "string"
209
293
  },
210
- "title": {
294
+ "parent_id": {
295
+ "description": "Optional parent label (label groups)",
296
+ "type": "string"
297
+ },
298
+ "team_id": {
299
+ "description": "Optional; omit for a workspace-level label",
211
300
  "type": "string"
212
301
  }
213
302
  },
@@ -237,26 +326,16 @@
237
326
  "description": "Validation error"
238
327
  }
239
328
  },
240
- "summary": "Create a document",
329
+ "summary": "Create a label",
241
330
  "tags": []
242
331
  }
243
332
  },
244
- "/api/v1/documents/{id}": {
333
+ "/api/v1/stats": {
245
334
  "get": {
246
335
  "callbacks": {},
247
336
  "deprecated": false,
248
- "description": "Requires the `harness:read` scope.",
249
- "parameters": [
250
- {
251
- "description": "Resource id",
252
- "in": "path",
253
- "name": "id",
254
- "required": true,
255
- "schema": {
256
- "type": "string"
257
- }
258
- }
259
- ],
337
+ "description": "Requires the `harness:read` scope. Per-team and total open / started / blocked / ready / closed counts, one call.",
338
+ "parameters": [],
260
339
  "responses": {
261
340
  "200": {
262
341
  "description": "Success"
@@ -277,18 +356,20 @@
277
356
  "description": "Validation error"
278
357
  }
279
358
  },
280
- "summary": "Get a document",
359
+ "summary": "Workspace issue counts",
281
360
  "tags": []
282
- },
283
- "patch": {
361
+ }
362
+ },
363
+ "/api/v1/issues/{identifier}/labels": {
364
+ "put": {
284
365
  "callbacks": {},
285
366
  "deprecated": false,
286
367
  "description": "Requires the `harness:write` scope.",
287
368
  "parameters": [
288
369
  {
289
- "description": "Resource id",
370
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
290
371
  "in": "path",
291
- "name": "id",
372
+ "name": "identifier",
292
373
  "required": true,
293
374
  "schema": {
294
375
  "type": "string"
@@ -300,16 +381,11 @@
300
381
  "application/json": {
301
382
  "schema": {
302
383
  "properties": {
303
- "content": {
304
- "description": "Markdown body",
305
- "type": "string"
306
- },
307
- "project_id": {
308
- "description": "Optional project to attach the document to",
309
- "type": "string"
310
- },
311
- "title": {
312
- "type": "string"
384
+ "label_ids": {
385
+ "items": {
386
+ "type": "string"
387
+ },
388
+ "type": "array"
313
389
  }
314
390
  },
315
391
  "type": "object"
@@ -338,7 +414,57 @@
338
414
  "description": "Validation error"
339
415
  }
340
416
  },
341
- "summary": "Update a document",
417
+ "summary": "Replace issue labels",
418
+ "tags": []
419
+ }
420
+ },
421
+ "/api/v1/attachments/{attachment_id}/{file}": {
422
+ "get": {
423
+ "callbacks": {},
424
+ "deprecated": false,
425
+ "description": "Requires the `harness:read` scope. Streams the attachment bytes (binary response).",
426
+ "parameters": [
427
+ {
428
+ "description": "Attachment UUID (the directory segment of the upload's URL)",
429
+ "in": "path",
430
+ "name": "attachment_id",
431
+ "required": true,
432
+ "schema": {
433
+ "format": "uuid",
434
+ "type": "string"
435
+ }
436
+ },
437
+ {
438
+ "description": "Stored filename (the final segment of the upload's URL)",
439
+ "in": "path",
440
+ "name": "file",
441
+ "required": true,
442
+ "schema": {
443
+ "type": "string"
444
+ }
445
+ }
446
+ ],
447
+ "responses": {
448
+ "200": {
449
+ "description": "Success"
450
+ },
451
+ "400": {
452
+ "description": "Bad request"
453
+ },
454
+ "401": {
455
+ "description": "Missing or invalid token"
456
+ },
457
+ "403": {
458
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
459
+ },
460
+ "404": {
461
+ "description": "Not found"
462
+ },
463
+ "422": {
464
+ "description": "Validation error"
465
+ }
466
+ },
467
+ "summary": "Download an attachment",
342
468
  "tags": []
343
469
  }
344
470
  },
@@ -491,8 +617,190 @@
491
617
  "schema": {
492
618
  "type": "string"
493
619
  }
494
- }
495
- ],
620
+ }
621
+ ],
622
+ "responses": {
623
+ "200": {
624
+ "description": "Success"
625
+ },
626
+ "400": {
627
+ "description": "Bad request"
628
+ },
629
+ "401": {
630
+ "description": "Missing or invalid token"
631
+ },
632
+ "403": {
633
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
634
+ },
635
+ "404": {
636
+ "description": "Not found"
637
+ },
638
+ "422": {
639
+ "description": "Validation error"
640
+ }
641
+ },
642
+ "summary": "List issues",
643
+ "tags": []
644
+ }
645
+ },
646
+ "/api/v1/issues/{identifier}": {
647
+ "get": {
648
+ "callbacks": {},
649
+ "deprecated": false,
650
+ "description": "Requires the `harness:read` scope. The payload always carries `blocked` and `blocked_by` (identifiers of open blockers); `include` embeds relations (direction-aware), children, and recent comments in one response.",
651
+ "parameters": [
652
+ {
653
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
654
+ "in": "path",
655
+ "name": "identifier",
656
+ "required": true,
657
+ "schema": {
658
+ "type": "string"
659
+ }
660
+ },
661
+ {
662
+ "description": "Comma-separated embeds: relations, children, comments",
663
+ "in": "query",
664
+ "name": "include",
665
+ "required": false,
666
+ "schema": {
667
+ "type": "string"
668
+ }
669
+ }
670
+ ],
671
+ "responses": {
672
+ "200": {
673
+ "description": "Success"
674
+ },
675
+ "400": {
676
+ "description": "Bad request"
677
+ },
678
+ "401": {
679
+ "description": "Missing or invalid token"
680
+ },
681
+ "403": {
682
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
683
+ },
684
+ "404": {
685
+ "description": "Not found"
686
+ },
687
+ "422": {
688
+ "description": "Validation error"
689
+ }
690
+ },
691
+ "summary": "Get an issue",
692
+ "tags": []
693
+ },
694
+ "patch": {
695
+ "callbacks": {},
696
+ "deprecated": false,
697
+ "description": "Requires the `harness:write` scope.",
698
+ "parameters": [
699
+ {
700
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
701
+ "in": "path",
702
+ "name": "identifier",
703
+ "required": true,
704
+ "schema": {
705
+ "type": "string"
706
+ }
707
+ }
708
+ ],
709
+ "requestBody": {
710
+ "content": {
711
+ "application/json": {
712
+ "schema": {
713
+ "properties": {
714
+ "acceptance_criteria": {
715
+ "type": "string"
716
+ },
717
+ "assignee": {
718
+ "description": "\"me\" for the token owner, a user id, an email address, or an exact display name; empty/null clears the assignee",
719
+ "type": "string"
720
+ },
721
+ "assignee_id": {
722
+ "type": "string"
723
+ },
724
+ "description": {
725
+ "type": "string"
726
+ },
727
+ "design": {
728
+ "type": "string"
729
+ },
730
+ "due_date": {
731
+ "format": "date",
732
+ "type": "string"
733
+ },
734
+ "notes": {
735
+ "type": "string"
736
+ },
737
+ "parent": {
738
+ "description": "Parent issue identifier; empty/null clears the parent",
739
+ "type": "string"
740
+ },
741
+ "priority": {
742
+ "type": "integer"
743
+ },
744
+ "title": {
745
+ "type": "string"
746
+ }
747
+ },
748
+ "type": "object"
749
+ }
750
+ }
751
+ },
752
+ "required": true
753
+ },
754
+ "responses": {
755
+ "200": {
756
+ "description": "Success"
757
+ },
758
+ "400": {
759
+ "description": "Bad request"
760
+ },
761
+ "401": {
762
+ "description": "Missing or invalid token"
763
+ },
764
+ "403": {
765
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
766
+ },
767
+ "404": {
768
+ "description": "Not found"
769
+ },
770
+ "422": {
771
+ "description": "Validation error"
772
+ }
773
+ },
774
+ "summary": "Update issue fields",
775
+ "tags": []
776
+ }
777
+ },
778
+ "/api/v1/uploads": {
779
+ "post": {
780
+ "callbacks": {},
781
+ "deprecated": false,
782
+ "description": "Requires the `harness:write` scope. Multipart upload of a png, jpg, webp, or gif (max 25 MB). Returns the attachment URL and a ready-to-paste `![alt](url)` markdown snippet for issue descriptions and comments. Attachments are private: the URL serves admins with a session; API clients fetch the bytes via `GET /api/v1/attachments/{attachment_id}/{file}`.",
783
+ "parameters": [],
784
+ "requestBody": {
785
+ "content": {
786
+ "multipart/form-data": {
787
+ "schema": {
788
+ "properties": {
789
+ "file": {
790
+ "description": "png, jpg, webp, or gif up to 25 MB",
791
+ "format": "binary",
792
+ "type": "string"
793
+ }
794
+ },
795
+ "required": [
796
+ "file"
797
+ ],
798
+ "type": "object"
799
+ }
800
+ }
801
+ },
802
+ "required": true
803
+ },
496
804
  "responses": {
497
805
  "200": {
498
806
  "description": "Success"
@@ -511,37 +819,57 @@
511
819
  },
512
820
  "422": {
513
821
  "description": "Validation error"
822
+ },
823
+ "502": {
824
+ "description": "File storage failed (transient) — retry"
514
825
  }
515
826
  },
516
- "summary": "List issues",
827
+ "summary": "Upload an image attachment",
517
828
  "tags": []
518
829
  }
519
830
  },
520
- "/api/v1/issues/search": {
521
- "get": {
831
+ "/api/v1/members/{user_id}/role": {
832
+ "put": {
522
833
  "callbacks": {},
523
834
  "deprecated": false,
524
- "description": "Requires the `harness:read` scope. Ranked hybrid search: an exact identifier always comes first, then results ordered by relevance across a lexical and a semantic (embedding) signal — a query can match issues that share none of its words. Returns at most 20 results; there is no pagination. `meta.mode` is `hybrid` when the semantic side ran and `lexical` when it degraded (embeddings disabled or the provider unavailable). Unarchived issues only. For paginated, filterable listings use `GET /api/v1/issues` instead.",
835
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. `none` revokes. Refused with 422 when it would remove the organization's last Harness administrator, which would strand its settings surface. A user who is not already on the roster answers 404 — use POST /members to add someone.",
525
836
  "parameters": [
526
837
  {
527
- "description": "The question or phrase to search for — plain language works better than keywords",
528
- "in": "query",
529
- "name": "q",
530
- "required": false,
838
+ "description": "The member's user id",
839
+ "in": "path",
840
+ "name": "user_id",
841
+ "required": true,
531
842
  "schema": {
843
+ "format": "uuid",
532
844
  "type": "string"
533
845
  }
534
- },
535
- {
536
- "description": "Maximum results (default 10, capped at 20)",
537
- "in": "query",
538
- "name": "limit",
539
- "required": false,
540
- "schema": {
541
- "type": "integer"
542
- }
543
846
  }
544
847
  ],
848
+ "requestBody": {
849
+ "content": {
850
+ "application/json": {
851
+ "schema": {
852
+ "properties": {
853
+ "role": {
854
+ "description": "`none` revokes the rank; the person keeps whatever standing their membership gives them.",
855
+ "enum": [
856
+ "admin",
857
+ "staff",
858
+ "collaborator",
859
+ "none"
860
+ ],
861
+ "type": "string"
862
+ }
863
+ },
864
+ "required": [
865
+ "role"
866
+ ],
867
+ "type": "object"
868
+ }
869
+ }
870
+ },
871
+ "required": true
872
+ },
545
873
  "responses": {
546
874
  "200": {
547
875
  "description": "Success"
@@ -562,15 +890,15 @@
562
890
  "description": "Validation error"
563
891
  }
564
892
  },
565
- "summary": "Search issues by meaning",
893
+ "summary": "Set or revoke a member's rank",
566
894
  "tags": []
567
895
  }
568
896
  },
569
- "/api/v1/issues/{identifier}": {
897
+ "/api/v1/issues/{identifier}/links": {
570
898
  "get": {
571
899
  "callbacks": {},
572
900
  "deprecated": false,
573
- "description": "Requires the `harness:read` scope. The payload always carries `blocked` and `blocked_by` (identifiers of open blockers); `include` embeds relations (direction-aware), children, and recent comments in one response.",
901
+ "description": "Requires the `harness:read` scope.",
574
902
  "parameters": [
575
903
  {
576
904
  "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
@@ -580,17 +908,65 @@
580
908
  "schema": {
581
909
  "type": "string"
582
910
  }
911
+ }
912
+ ],
913
+ "responses": {
914
+ "200": {
915
+ "description": "Success"
916
+ },
917
+ "400": {
918
+ "description": "Bad request"
919
+ },
920
+ "401": {
921
+ "description": "Missing or invalid token"
583
922
  },
923
+ "403": {
924
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
925
+ },
926
+ "404": {
927
+ "description": "Not found"
928
+ },
929
+ "422": {
930
+ "description": "Validation error"
931
+ }
932
+ },
933
+ "summary": "List an issue's links",
934
+ "tags": []
935
+ },
936
+ "post": {
937
+ "callbacks": {},
938
+ "deprecated": false,
939
+ "description": "Requires the `harness:write` scope.",
940
+ "parameters": [
584
941
  {
585
- "description": "Comma-separated embeds: relations, children, comments",
586
- "in": "query",
587
- "name": "include",
588
- "required": false,
942
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
943
+ "in": "path",
944
+ "name": "identifier",
945
+ "required": true,
589
946
  "schema": {
590
947
  "type": "string"
591
948
  }
592
949
  }
593
950
  ],
951
+ "requestBody": {
952
+ "content": {
953
+ "application/json": {
954
+ "schema": {
955
+ "properties": {
956
+ "title": {
957
+ "type": "string"
958
+ },
959
+ "url": {
960
+ "description": "http(s) URL",
961
+ "type": "string"
962
+ }
963
+ },
964
+ "type": "object"
965
+ }
966
+ }
967
+ },
968
+ "required": true
969
+ },
594
970
  "responses": {
595
971
  "200": {
596
972
  "description": "Success"
@@ -611,18 +987,20 @@
611
987
  "description": "Validation error"
612
988
  }
613
989
  },
614
- "summary": "Get an issue",
990
+ "summary": "Add a link",
615
991
  "tags": []
616
- },
617
- "patch": {
992
+ }
993
+ },
994
+ "/api/v1/teams/{team_key}/issues": {
995
+ "post": {
618
996
  "callbacks": {},
619
997
  "deprecated": false,
620
998
  "description": "Requires the `harness:write` scope.",
621
999
  "parameters": [
622
1000
  {
623
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1001
+ "description": "Team key, e.g. ALL",
624
1002
  "in": "path",
625
- "name": "identifier",
1003
+ "name": "team_key",
626
1004
  "required": true,
627
1005
  "schema": {
628
1006
  "type": "string"
@@ -635,10 +1013,15 @@
635
1013
  "schema": {
636
1014
  "properties": {
637
1015
  "acceptance_criteria": {
1016
+ "description": "Acceptance criteria (markdown)",
1017
+ "type": "string"
1018
+ },
1019
+ "actor": {
1020
+ "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
638
1021
  "type": "string"
639
1022
  },
640
1023
  "assignee": {
641
- "description": "\"me\" for the token owner, a user id, an email address, or an exact display name; empty/null clears the assignee",
1024
+ "description": "\"me\" for the token owner, a user id, an email address, or an exact display name",
642
1025
  "type": "string"
643
1026
  },
644
1027
  "assignee_id": {
@@ -648,6 +1031,7 @@
648
1031
  "type": "string"
649
1032
  },
650
1033
  "design": {
1034
+ "description": "Design decisions (markdown)",
651
1035
  "type": "string"
652
1036
  },
653
1037
  "due_date": {
@@ -655,15 +1039,21 @@
655
1039
  "type": "string"
656
1040
  },
657
1041
  "notes": {
1042
+ "description": "Working notes (markdown)",
658
1043
  "type": "string"
659
1044
  },
660
1045
  "parent": {
661
- "description": "Parent issue identifier; empty/null clears the parent",
1046
+ "description": "Parent issue identifier, e.g. ALL-4223",
662
1047
  "type": "string"
663
1048
  },
664
1049
  "priority": {
1050
+ "description": "0 none, 1 urgent, 2 high, 3 medium, 4 low",
665
1051
  "type": "integer"
666
1052
  },
1053
+ "state_id": {
1054
+ "description": "Defaults to the team's first workflow state",
1055
+ "type": "string"
1056
+ },
667
1057
  "title": {
668
1058
  "type": "string"
669
1059
  }
@@ -694,11 +1084,11 @@
694
1084
  "description": "Validation error"
695
1085
  }
696
1086
  },
697
- "summary": "Update issue fields",
1087
+ "summary": "Create an issue",
698
1088
  "tags": []
699
1089
  }
700
1090
  },
701
- "/api/v1/issues/{identifier}/archive_state": {
1091
+ "/api/v1/issues/{identifier}/state": {
702
1092
  "put": {
703
1093
  "callbacks": {},
704
1094
  "deprecated": false,
@@ -719,8 +1109,8 @@
719
1109
  "application/json": {
720
1110
  "schema": {
721
1111
  "properties": {
722
- "archived": {
723
- "type": "boolean"
1112
+ "state_id": {
1113
+ "type": "string"
724
1114
  }
725
1115
  },
726
1116
  "type": "object"
@@ -749,20 +1139,20 @@
749
1139
  "description": "Validation error"
750
1140
  }
751
1141
  },
752
- "summary": "Set archive state",
1142
+ "summary": "Set issue state",
753
1143
  "tags": []
754
1144
  }
755
1145
  },
756
- "/api/v1/issues/{identifier}/claim": {
757
- "post": {
1146
+ "/api/v1/projects/{id}": {
1147
+ "get": {
758
1148
  "callbacks": {},
759
1149
  "deprecated": false,
760
- "description": "Requires the `harness:write` scope. Atomic compare-and-swap: assigns the caller and moves the issue to the team's first started-type state. Idempotent for the current claimant.",
1150
+ "description": "Requires the `harness:read` scope.",
761
1151
  "parameters": [
762
1152
  {
763
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1153
+ "description": "Resource id",
764
1154
  "in": "path",
765
- "name": "identifier",
1155
+ "name": "id",
766
1156
  "required": true,
767
1157
  "schema": {
768
1158
  "type": "string"
@@ -785,27 +1175,22 @@
785
1175
  "404": {
786
1176
  "description": "Not found"
787
1177
  },
788
- "409": {
789
- "description": "Already claimed by someone else"
790
- },
791
1178
  "422": {
792
1179
  "description": "Validation error"
793
1180
  }
794
1181
  },
795
- "summary": "Claim an issue",
1182
+ "summary": "Get a project",
796
1183
  "tags": []
797
- }
798
- },
799
- "/api/v1/issues/{identifier}/close": {
800
- "post": {
1184
+ },
1185
+ "patch": {
801
1186
  "callbacks": {},
802
1187
  "deprecated": false,
803
- "description": "Requires the `harness:write` scope. Moves the issue to the team's first completed-type state (canceled-type with `cancel`), posting `reason` as a comment first. The response's `unblocked` lists identifiers of issues that became ready because this one closed.",
1188
+ "description": "Requires the `harness:write` scope.",
804
1189
  "parameters": [
805
1190
  {
806
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1191
+ "description": "Resource id",
807
1192
  "in": "path",
808
- "name": "identifier",
1193
+ "name": "id",
809
1194
  "required": true,
810
1195
  "schema": {
811
1196
  "type": "string"
@@ -817,16 +1202,31 @@
817
1202
  "application/json": {
818
1203
  "schema": {
819
1204
  "properties": {
820
- "actor": {
821
- "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
1205
+ "description": {
822
1206
  "type": "string"
823
1207
  },
824
- "cancel": {
825
- "description": "Move to a canceled-type state instead of completed",
826
- "type": "boolean"
1208
+ "lead_id": {
1209
+ "type": "string"
827
1210
  },
828
- "reason": {
829
- "description": "Optional close reason, posted as a comment",
1211
+ "name": {
1212
+ "type": "string"
1213
+ },
1214
+ "sort_order": {
1215
+ "type": "number"
1216
+ },
1217
+ "start_date": {
1218
+ "format": "date",
1219
+ "type": "string"
1220
+ },
1221
+ "state": {
1222
+ "description": "backlog, planned, started, completed, or canceled",
1223
+ "type": "string"
1224
+ },
1225
+ "summary": {
1226
+ "type": "string"
1227
+ },
1228
+ "target_date": {
1229
+ "format": "date",
830
1230
  "type": "string"
831
1231
  }
832
1232
  },
@@ -856,26 +1256,16 @@
856
1256
  "description": "Validation error"
857
1257
  }
858
1258
  },
859
- "summary": "Close an issue",
1259
+ "summary": "Update a project",
860
1260
  "tags": []
861
1261
  }
862
1262
  },
863
- "/api/v1/issues/{identifier}/comments": {
1263
+ "/api/v1/users": {
864
1264
  "get": {
865
1265
  "callbacks": {},
866
1266
  "deprecated": false,
867
1267
  "description": "Requires the `harness:read` scope.",
868
- "parameters": [
869
- {
870
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
871
- "in": "path",
872
- "name": "identifier",
873
- "required": true,
874
- "schema": {
875
- "type": "string"
876
- }
877
- }
878
- ],
1268
+ "parameters": [],
879
1269
  "responses": {
880
1270
  "200": {
881
1271
  "description": "Success"
@@ -896,18 +1286,20 @@
896
1286
  "description": "Validation error"
897
1287
  }
898
1288
  },
899
- "summary": "List issue comments",
1289
+ "summary": "List assignable users",
900
1290
  "tags": []
901
- },
902
- "post": {
1291
+ }
1292
+ },
1293
+ "/api/v1/teams/{team_key}": {
1294
+ "patch": {
903
1295
  "callbacks": {},
904
1296
  "deprecated": false,
905
- "description": "Requires the `harness:write` scope.",
1297
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Renames the team. Absent fields are left unchanged. The key is create-only and `is_default` has its own endpoint: a request that changes either is refused with 422 rather than silently ignored. Responds with the team WITHOUT `issue_count` — that annotation belongs to the list endpoint, which pays one grouped query for the whole page.",
906
1298
  "parameters": [
907
1299
  {
908
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1300
+ "description": "Team key, e.g. ALL",
909
1301
  "in": "path",
910
- "name": "identifier",
1302
+ "name": "team_key",
911
1303
  "required": true,
912
1304
  "schema": {
913
1305
  "type": "string"
@@ -919,11 +1311,11 @@
919
1311
  "application/json": {
920
1312
  "schema": {
921
1313
  "properties": {
922
- "actor": {
923
- "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
1314
+ "key": {
1315
+ "description": "Create-only. May be echoed back unchanged; any other value is refused with 422 rather than ignored, since changing it would orphan every issue already filed under the team.",
924
1316
  "type": "string"
925
1317
  },
926
- "body": {
1318
+ "name": {
927
1319
  "type": "string"
928
1320
  }
929
1321
  },
@@ -953,38 +1345,66 @@
953
1345
  "description": "Validation error"
954
1346
  }
955
1347
  },
956
- "summary": "Add an issue comment",
1348
+ "summary": "Rename a team",
1349
+ "tags": []
1350
+ }
1351
+ },
1352
+ "/api/v1/members": {
1353
+ "get": {
1354
+ "callbacks": {},
1355
+ "deprecated": false,
1356
+ "description": "Requires the `harness:read` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Everyone who can reach this organization's tracker: its harness grant holders plus its own admins, who get staff standing without a grant. Each entry carries both `role` (the grant rank, null when none) and `standing` — they differ, and the difference is the point: an org admin holds no rank and is still staff. Distinct from GET /users, which is the deployment-wide assignee picker and never lists a collaborator.",
1357
+ "parameters": [],
1358
+ "responses": {
1359
+ "200": {
1360
+ "description": "Success"
1361
+ },
1362
+ "400": {
1363
+ "description": "Bad request"
1364
+ },
1365
+ "401": {
1366
+ "description": "Missing or invalid token"
1367
+ },
1368
+ "403": {
1369
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
1370
+ },
1371
+ "404": {
1372
+ "description": "Not found"
1373
+ },
1374
+ "422": {
1375
+ "description": "Validation error"
1376
+ }
1377
+ },
1378
+ "summary": "List the organization's tracker roster",
957
1379
  "tags": []
958
- }
959
- },
960
- "/api/v1/issues/{identifier}/labels": {
961
- "put": {
1380
+ },
1381
+ "post": {
962
1382
  "callbacks": {},
963
1383
  "deprecated": false,
964
- "description": "Requires the `harness:write` scope.",
965
- "parameters": [
966
- {
967
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
968
- "in": "path",
969
- "name": "identifier",
970
- "required": true,
971
- "schema": {
972
- "type": "string"
973
- }
974
- }
975
- ],
1384
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Mints the organization membership when the person has none, so joining the tracker does not detour through the organization's own people page. The account must already exist: an unknown email is refused with 422 naming that, since the fix is for them to register. Email matching is case-insensitive.",
1385
+ "parameters": [],
976
1386
  "requestBody": {
977
1387
  "content": {
978
1388
  "application/json": {
979
1389
  "schema": {
980
1390
  "properties": {
981
- "label_ids": {
982
- "items": {
983
- "type": "string"
984
- },
985
- "type": "array"
1391
+ "email": {
1392
+ "description": "Address of an existing account; matched case-insensitively.",
1393
+ "type": "string"
1394
+ },
1395
+ "role": {
1396
+ "enum": [
1397
+ "admin",
1398
+ "staff",
1399
+ "collaborator"
1400
+ ],
1401
+ "type": "string"
986
1402
  }
987
1403
  },
1404
+ "required": [
1405
+ "email",
1406
+ "role"
1407
+ ],
988
1408
  "type": "object"
989
1409
  }
990
1410
  }
@@ -1011,15 +1431,15 @@
1011
1431
  "description": "Validation error"
1012
1432
  }
1013
1433
  },
1014
- "summary": "Replace issue labels",
1434
+ "summary": "Grant a rank to an existing account",
1015
1435
  "tags": []
1016
1436
  }
1017
1437
  },
1018
- "/api/v1/issues/{identifier}/links": {
1019
- "get": {
1438
+ "/api/v1/issues/{identifier}/claim": {
1439
+ "post": {
1020
1440
  "callbacks": {},
1021
1441
  "deprecated": false,
1022
- "description": "Requires the `harness:read` scope.",
1442
+ "description": "Requires the `harness:write` scope. Atomic compare-and-swap: assigns the caller and moves the issue to the team's first started-type state. Idempotent for the current claimant.",
1023
1443
  "parameters": [
1024
1444
  {
1025
1445
  "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
@@ -1047,14 +1467,19 @@
1047
1467
  "404": {
1048
1468
  "description": "Not found"
1049
1469
  },
1470
+ "409": {
1471
+ "description": "Already claimed by someone else"
1472
+ },
1050
1473
  "422": {
1051
1474
  "description": "Validation error"
1052
1475
  }
1053
1476
  },
1054
- "summary": "List an issue's links",
1477
+ "summary": "Claim an issue",
1055
1478
  "tags": []
1056
- },
1057
- "post": {
1479
+ }
1480
+ },
1481
+ "/api/v1/issues/{identifier}/archive_state": {
1482
+ "put": {
1058
1483
  "callbacks": {},
1059
1484
  "deprecated": false,
1060
1485
  "description": "Requires the `harness:write` scope.",
@@ -1074,12 +1499,8 @@
1074
1499
  "application/json": {
1075
1500
  "schema": {
1076
1501
  "properties": {
1077
- "title": {
1078
- "type": "string"
1079
- },
1080
- "url": {
1081
- "description": "http(s) URL",
1082
- "type": "string"
1502
+ "archived": {
1503
+ "type": "boolean"
1083
1504
  }
1084
1505
  },
1085
1506
  "type": "object"
@@ -1108,35 +1529,49 @@
1108
1529
  "description": "Validation error"
1109
1530
  }
1110
1531
  },
1111
- "summary": "Add a link",
1532
+ "summary": "Set archive state",
1112
1533
  "tags": []
1113
1534
  }
1114
1535
  },
1115
- "/api/v1/issues/{identifier}/links/{id}": {
1116
- "delete": {
1536
+ "/api/v1/teams/{team_key}/workflow_states/order": {
1537
+ "put": {
1117
1538
  "callbacks": {},
1118
1539
  "deprecated": false,
1119
- "description": "Requires the `harness:write` scope.",
1540
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Takes the team's WHOLE ordering and rewrites every position in one transaction. A list that is not exactly this team's states is refused with 400 rather than half-applied, since a partial order would renumber from zero and collide with the positions it left alone. Responds with the team's states in their new order.",
1120
1541
  "parameters": [
1121
1542
  {
1122
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1123
- "in": "path",
1124
- "name": "identifier",
1125
- "required": true,
1126
- "schema": {
1127
- "type": "string"
1128
- }
1129
- },
1130
- {
1131
- "description": "Resource id",
1543
+ "description": "Team key, e.g. ALL",
1132
1544
  "in": "path",
1133
- "name": "id",
1545
+ "name": "team_key",
1134
1546
  "required": true,
1135
1547
  "schema": {
1136
1548
  "type": "string"
1137
1549
  }
1138
1550
  }
1139
1551
  ],
1552
+ "requestBody": {
1553
+ "content": {
1554
+ "application/json": {
1555
+ "schema": {
1556
+ "properties": {
1557
+ "state_ids": {
1558
+ "description": "Every one of the team's workflow state ids, in the order they should appear.",
1559
+ "items": {
1560
+ "format": "uuid",
1561
+ "type": "string"
1562
+ },
1563
+ "type": "array"
1564
+ }
1565
+ },
1566
+ "required": [
1567
+ "state_ids"
1568
+ ],
1569
+ "type": "object"
1570
+ }
1571
+ }
1572
+ },
1573
+ "required": true
1574
+ },
1140
1575
  "responses": {
1141
1576
  "200": {
1142
1577
  "description": "Success"
@@ -1157,20 +1592,20 @@
1157
1592
  "description": "Validation error"
1158
1593
  }
1159
1594
  },
1160
- "summary": "Delete a link",
1595
+ "summary": "Reorder a team's workflow states",
1161
1596
  "tags": []
1162
1597
  }
1163
1598
  },
1164
- "/api/v1/issues/{identifier}/relations": {
1599
+ "/api/v1/teams/{team_key}/workflow_states": {
1165
1600
  "get": {
1166
1601
  "callbacks": {},
1167
1602
  "deprecated": false,
1168
1603
  "description": "Requires the `harness:read` scope.",
1169
1604
  "parameters": [
1170
1605
  {
1171
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1606
+ "description": "Team key, e.g. ALL",
1172
1607
  "in": "path",
1173
- "name": "identifier",
1608
+ "name": "team_key",
1174
1609
  "required": true,
1175
1610
  "schema": {
1176
1611
  "type": "string"
@@ -1197,18 +1632,18 @@
1197
1632
  "description": "Validation error"
1198
1633
  }
1199
1634
  },
1200
- "summary": "List an issue's relations",
1635
+ "summary": "List a team's workflow states",
1201
1636
  "tags": []
1202
1637
  },
1203
1638
  "post": {
1204
1639
  "callbacks": {},
1205
1640
  "deprecated": false,
1206
- "description": "Requires the `harness:write` scope.",
1641
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Appended after the team's existing states; use the order endpoint to place it elsewhere.",
1207
1642
  "parameters": [
1208
1643
  {
1209
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1644
+ "description": "Team key, e.g. ALL",
1210
1645
  "in": "path",
1211
- "name": "identifier",
1646
+ "name": "team_key",
1212
1647
  "required": true,
1213
1648
  "schema": {
1214
1649
  "type": "string"
@@ -1220,23 +1655,31 @@
1220
1655
  "application/json": {
1221
1656
  "schema": {
1222
1657
  "properties": {
1223
- "related_issue": {
1224
- "description": "Identifier of the related issue, e.g. ALL-7",
1658
+ "color": {
1659
+ "description": "Optional swatch name. Omitting it stores no colour — the conventional colour for the type is a rendering fallback, not a stored default, so the field comes back null.",
1660
+ "maxLength": 255,
1661
+ "type": "string"
1662
+ },
1663
+ "name": {
1664
+ "maxLength": 255,
1225
1665
  "type": "string"
1226
1666
  },
1227
1667
  "type": {
1228
- "description": "Directional aliases (blocked_by, duplicated_by) store the inverse edge",
1668
+ "description": "The state's semantics, independent of its display name.",
1229
1669
  "enum": [
1230
- "blocks",
1231
- "blocked_by",
1232
- "related",
1233
- "duplicate",
1234
- "duplicate_of",
1235
- "duplicated_by"
1670
+ "backlog",
1671
+ "unstarted",
1672
+ "started",
1673
+ "completed",
1674
+ "canceled"
1236
1675
  ],
1237
1676
  "type": "string"
1238
1677
  }
1239
1678
  },
1679
+ "required": [
1680
+ "name",
1681
+ "type"
1682
+ ],
1240
1683
  "type": "object"
1241
1684
  }
1242
1685
  }
@@ -1263,35 +1706,63 @@
1263
1706
  "description": "Validation error"
1264
1707
  }
1265
1708
  },
1266
- "summary": "Create a relation",
1709
+ "summary": "Add a workflow state",
1267
1710
  "tags": []
1268
1711
  }
1269
1712
  },
1270
- "/api/v1/issues/{identifier}/relations/{id}": {
1271
- "delete": {
1713
+ "/api/v1/teams": {
1714
+ "get": {
1272
1715
  "callbacks": {},
1273
1716
  "deprecated": false,
1274
- "description": "Requires the `harness:write` scope.",
1275
- "parameters": [
1276
- {
1277
- "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
1278
- "in": "path",
1279
- "name": "identifier",
1280
- "required": true,
1281
- "schema": {
1282
- "type": "string"
1283
- }
1717
+ "description": "Requires the `harness:read` scope. Each team carries `issue_count`, its total issues — one grouped query for the whole list.",
1718
+ "parameters": [],
1719
+ "responses": {
1720
+ "200": {
1721
+ "description": "Success"
1284
1722
  },
1285
- {
1286
- "description": "Resource id",
1287
- "in": "path",
1288
- "name": "id",
1289
- "required": true,
1290
- "schema": {
1291
- "type": "string"
1292
- }
1723
+ "400": {
1724
+ "description": "Bad request"
1725
+ },
1726
+ "401": {
1727
+ "description": "Missing or invalid token"
1728
+ },
1729
+ "403": {
1730
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
1731
+ },
1732
+ "404": {
1733
+ "description": "Not found"
1734
+ },
1735
+ "422": {
1736
+ "description": "Validation error"
1293
1737
  }
1294
- ],
1738
+ },
1739
+ "summary": "List teams",
1740
+ "tags": []
1741
+ },
1742
+ "post": {
1743
+ "callbacks": {},
1744
+ "deprecated": false,
1745
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Creates a team seeded with the default workflow states (Backlog, Todo, In Progress, Done, Canceled), so it is immediately usable for the full issue lifecycle. The key is upcased and must match `^[A-Z][A-Z0-9]*$`; numbering starts above any issues that already carry the key as their prefix.",
1746
+ "parameters": [],
1747
+ "requestBody": {
1748
+ "content": {
1749
+ "application/json": {
1750
+ "schema": {
1751
+ "properties": {
1752
+ "key": {
1753
+ "description": "Identifier prefix for the team's issues (e.g. ALL in ALL-4901). Upcased; create-only.",
1754
+ "type": "string"
1755
+ },
1756
+ "name": {
1757
+ "type": "string"
1758
+ }
1759
+ },
1760
+ "type": "object"
1761
+ }
1762
+ }
1763
+ },
1764
+ "required": true
1765
+ },
1295
1766
  "responses": {
1296
1767
  "200": {
1297
1768
  "description": "Success"
@@ -1312,15 +1783,15 @@
1312
1783
  "description": "Validation error"
1313
1784
  }
1314
1785
  },
1315
- "summary": "Delete a relation",
1786
+ "summary": "Create a team",
1316
1787
  "tags": []
1317
1788
  }
1318
1789
  },
1319
- "/api/v1/issues/{identifier}/state": {
1320
- "put": {
1790
+ "/api/v1/issues/{identifier}/close": {
1791
+ "post": {
1321
1792
  "callbacks": {},
1322
1793
  "deprecated": false,
1323
- "description": "Requires the `harness:write` scope.",
1794
+ "description": "Requires the `harness:write` scope. Moves the issue to the team's first completed-type state (canceled-type with `cancel`), posting `reason` as a comment first. The response's `unblocked` lists identifiers of issues that became ready because this one closed.",
1324
1795
  "parameters": [
1325
1796
  {
1326
1797
  "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
@@ -1337,7 +1808,16 @@
1337
1808
  "application/json": {
1338
1809
  "schema": {
1339
1810
  "properties": {
1340
- "state_id": {
1811
+ "actor": {
1812
+ "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
1813
+ "type": "string"
1814
+ },
1815
+ "cancel": {
1816
+ "description": "Move to a canceled-type state instead of completed",
1817
+ "type": "boolean"
1818
+ },
1819
+ "reason": {
1820
+ "description": "Optional close reason, posted as a comment",
1341
1821
  "type": "string"
1342
1822
  }
1343
1823
  },
@@ -1367,16 +1847,26 @@
1367
1847
  "description": "Validation error"
1368
1848
  }
1369
1849
  },
1370
- "summary": "Set issue state",
1850
+ "summary": "Close an issue",
1371
1851
  "tags": []
1372
1852
  }
1373
1853
  },
1374
- "/api/v1/labels": {
1854
+ "/api/v1/documents/{id}": {
1375
1855
  "get": {
1376
1856
  "callbacks": {},
1377
1857
  "deprecated": false,
1378
1858
  "description": "Requires the `harness:read` scope.",
1379
- "parameters": [],
1859
+ "parameters": [
1860
+ {
1861
+ "description": "Resource id",
1862
+ "in": "path",
1863
+ "name": "id",
1864
+ "required": true,
1865
+ "schema": {
1866
+ "type": "string"
1867
+ }
1868
+ }
1869
+ ],
1380
1870
  "responses": {
1381
1871
  "200": {
1382
1872
  "description": "Success"
@@ -1397,31 +1887,38 @@
1397
1887
  "description": "Validation error"
1398
1888
  }
1399
1889
  },
1400
- "summary": "List labels",
1890
+ "summary": "Get a document",
1401
1891
  "tags": []
1402
1892
  },
1403
- "post": {
1893
+ "patch": {
1404
1894
  "callbacks": {},
1405
1895
  "deprecated": false,
1406
1896
  "description": "Requires the `harness:write` scope.",
1407
- "parameters": [],
1897
+ "parameters": [
1898
+ {
1899
+ "description": "Resource id",
1900
+ "in": "path",
1901
+ "name": "id",
1902
+ "required": true,
1903
+ "schema": {
1904
+ "type": "string"
1905
+ }
1906
+ }
1907
+ ],
1408
1908
  "requestBody": {
1409
1909
  "content": {
1410
1910
  "application/json": {
1411
1911
  "schema": {
1412
1912
  "properties": {
1413
- "color": {
1414
- "type": "string"
1415
- },
1416
- "name": {
1913
+ "content": {
1914
+ "description": "Markdown body",
1417
1915
  "type": "string"
1418
1916
  },
1419
- "parent_id": {
1420
- "description": "Optional parent label (label groups)",
1917
+ "project_id": {
1918
+ "description": "Optional project to attach the document to",
1421
1919
  "type": "string"
1422
1920
  },
1423
- "team_id": {
1424
- "description": "Optional; omit for a workspace-level label",
1921
+ "title": {
1425
1922
  "type": "string"
1426
1923
  }
1427
1924
  },
@@ -1451,11 +1948,11 @@
1451
1948
  "description": "Validation error"
1452
1949
  }
1453
1950
  },
1454
- "summary": "Create a label",
1951
+ "summary": "Update a document",
1455
1952
  "tags": []
1456
1953
  }
1457
1954
  },
1458
- "/api/v1/projects": {
1955
+ "/api/v1/documents": {
1459
1956
  "get": {
1460
1957
  "callbacks": {},
1461
1958
  "deprecated": false,
@@ -1480,7 +1977,7 @@
1480
1977
  }
1481
1978
  },
1482
1979
  {
1483
- "description": "name, sort_order, inserted_at, or updated_at",
1980
+ "description": "title, inserted_at, or updated_at",
1484
1981
  "in": "query",
1485
1982
  "name": "order_by",
1486
1983
  "required": false,
@@ -1498,22 +1995,13 @@
1498
1995
  }
1499
1996
  },
1500
1997
  {
1501
- "description": "Match project name or summary",
1998
+ "description": "Match document title",
1502
1999
  "in": "query",
1503
2000
  "name": "search",
1504
2001
  "required": false,
1505
2002
  "schema": {
1506
2003
  "type": "string"
1507
2004
  }
1508
- },
1509
- {
1510
- "description": "Filter by state: backlog, planned, started, completed, canceled",
1511
- "in": "query",
1512
- "name": "state",
1513
- "required": false,
1514
- "schema": {
1515
- "type": "string"
1516
- }
1517
2005
  }
1518
2006
  ],
1519
2007
  "responses": {
@@ -1536,7 +2024,7 @@
1536
2024
  "description": "Validation error"
1537
2025
  }
1538
2026
  },
1539
- "summary": "List projects",
2027
+ "summary": "List documents",
1540
2028
  "tags": []
1541
2029
  },
1542
2030
  "post": {
@@ -1549,31 +2037,15 @@
1549
2037
  "application/json": {
1550
2038
  "schema": {
1551
2039
  "properties": {
1552
- "description": {
1553
- "type": "string"
1554
- },
1555
- "lead_id": {
1556
- "type": "string"
1557
- },
1558
- "name": {
1559
- "type": "string"
1560
- },
1561
- "sort_order": {
1562
- "type": "number"
1563
- },
1564
- "start_date": {
1565
- "format": "date",
1566
- "type": "string"
1567
- },
1568
- "state": {
1569
- "description": "backlog, planned, started, completed, or canceled",
2040
+ "content": {
2041
+ "description": "Markdown body",
1570
2042
  "type": "string"
1571
2043
  },
1572
- "summary": {
2044
+ "project_id": {
2045
+ "description": "Optional project to attach the document to",
1573
2046
  "type": "string"
1574
2047
  },
1575
- "target_date": {
1576
- "format": "date",
2048
+ "title": {
1577
2049
  "type": "string"
1578
2050
  }
1579
2051
  },
@@ -1603,15 +2075,15 @@
1603
2075
  "description": "Validation error"
1604
2076
  }
1605
2077
  },
1606
- "summary": "Create a project",
2078
+ "summary": "Create a document",
1607
2079
  "tags": []
1608
2080
  }
1609
2081
  },
1610
- "/api/v1/projects/{id}": {
1611
- "get": {
2082
+ "/api/v1/labels/{id}": {
2083
+ "delete": {
1612
2084
  "callbacks": {},
1613
2085
  "deprecated": false,
1614
- "description": "Requires the `harness:read` scope.",
2086
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Refused with 409 while the label is still in use — either issues carry it or other labels are nested under it — rather than silently stripping it from them or orphaning the children.",
1615
2087
  "parameters": [
1616
2088
  {
1617
2089
  "description": "Resource id",
@@ -1627,6 +2099,9 @@
1627
2099
  "200": {
1628
2100
  "description": "Success"
1629
2101
  },
2102
+ "204": {
2103
+ "description": "Deleted"
2104
+ },
1630
2105
  "400": {
1631
2106
  "description": "Bad request"
1632
2107
  },
@@ -1639,17 +2114,20 @@
1639
2114
  "404": {
1640
2115
  "description": "Not found"
1641
2116
  },
2117
+ "409": {
2118
+ "description": "Issues carry this label, or other labels are nested under it"
2119
+ },
1642
2120
  "422": {
1643
2121
  "description": "Validation error"
1644
2122
  }
1645
2123
  },
1646
- "summary": "Get a project",
2124
+ "summary": "Delete a label",
1647
2125
  "tags": []
1648
2126
  },
1649
2127
  "patch": {
1650
2128
  "callbacks": {},
1651
2129
  "deprecated": false,
1652
- "description": "Requires the `harness:write` scope.",
2130
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Name and colour only. `team_id` and `parent_id` are create-only: moving a label between teams changes which issues may carry it, and re-parenting rearranges a label tree — neither is something a rename should smuggle in.",
1653
2131
  "parameters": [
1654
2132
  {
1655
2133
  "description": "Resource id",
@@ -1666,31 +2144,13 @@
1666
2144
  "application/json": {
1667
2145
  "schema": {
1668
2146
  "properties": {
1669
- "description": {
1670
- "type": "string"
1671
- },
1672
- "lead_id": {
2147
+ "color": {
2148
+ "description": "A swatch name (purple, green, red, yellow, pink, blue, orange, gray) or a three- or six-digit hex code. Hex is what imported labels carry; the settings UI renders only swatch names in their own colour. Case-insensitive; stored downcased.",
2149
+ "nullable": true,
1673
2150
  "type": "string"
1674
2151
  },
1675
2152
  "name": {
1676
- "type": "string"
1677
- },
1678
- "sort_order": {
1679
- "type": "number"
1680
- },
1681
- "start_date": {
1682
- "format": "date",
1683
- "type": "string"
1684
- },
1685
- "state": {
1686
- "description": "backlog, planned, started, completed, or canceled",
1687
- "type": "string"
1688
- },
1689
- "summary": {
1690
- "type": "string"
1691
- },
1692
- "target_date": {
1693
- "format": "date",
2153
+ "maxLength": 255,
1694
2154
  "type": "string"
1695
2155
  }
1696
2156
  },
@@ -1720,20 +2180,20 @@
1720
2180
  "description": "Validation error"
1721
2181
  }
1722
2182
  },
1723
- "summary": "Update a project",
2183
+ "summary": "Rename or recolor a label",
1724
2184
  "tags": []
1725
2185
  }
1726
2186
  },
1727
- "/api/v1/projects/{project_id}/milestones": {
1728
- "get": {
2187
+ "/api/v1/teams/{team_key}/default": {
2188
+ "put": {
1729
2189
  "callbacks": {},
1730
2190
  "deprecated": false,
1731
- "description": "Requires the `harness:read` scope.",
2191
+ "description": "Requires the `harness:write` scope AND Harness administrator standing in the organization the credential is bound to — this is a settings write, gated exactly as the settings UI is. Clears the organization's previous default in the same transaction. Re-flagging is a no-op. Responds with the team WITHOUT `issue_count`, matching the other write responses.",
1732
2192
  "parameters": [
1733
2193
  {
1734
- "description": "Project id",
2194
+ "description": "Team key, e.g. ALL",
1735
2195
  "in": "path",
1736
- "name": "project_id",
2196
+ "name": "team_key",
1737
2197
  "required": true,
1738
2198
  "schema": {
1739
2199
  "type": "string"
@@ -1760,24 +2220,178 @@
1760
2220
  "description": "Validation error"
1761
2221
  }
1762
2222
  },
1763
- "summary": "List a project's milestones",
2223
+ "summary": "Set the organization's default filing target",
2224
+ "tags": []
2225
+ }
2226
+ },
2227
+ "/api/v1/issues/search": {
2228
+ "get": {
2229
+ "callbacks": {},
2230
+ "deprecated": false,
2231
+ "description": "Requires the `harness:read` scope. Ranked hybrid search: an exact identifier always comes first, then results ordered by relevance across a lexical and a semantic (embedding) signal — a query can match issues that share none of its words. Returns at most 20 results; there is no pagination. `meta.mode` is `hybrid` when the semantic side ran and `lexical` when it degraded (embeddings disabled or the provider unavailable). Unarchived issues only. For paginated, filterable listings use `GET /api/v1/issues` instead.",
2232
+ "parameters": [
2233
+ {
2234
+ "description": "The question or phrase to search for — plain language works better than keywords",
2235
+ "in": "query",
2236
+ "name": "q",
2237
+ "required": false,
2238
+ "schema": {
2239
+ "type": "string"
2240
+ }
2241
+ },
2242
+ {
2243
+ "description": "Maximum results (default 10, capped at 20)",
2244
+ "in": "query",
2245
+ "name": "limit",
2246
+ "required": false,
2247
+ "schema": {
2248
+ "type": "integer"
2249
+ }
2250
+ }
2251
+ ],
2252
+ "responses": {
2253
+ "200": {
2254
+ "description": "Success"
2255
+ },
2256
+ "400": {
2257
+ "description": "Bad request"
2258
+ },
2259
+ "401": {
2260
+ "description": "Missing or invalid token"
2261
+ },
2262
+ "403": {
2263
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
2264
+ },
2265
+ "404": {
2266
+ "description": "Not found"
2267
+ },
2268
+ "422": {
2269
+ "description": "Validation error"
2270
+ }
2271
+ },
2272
+ "summary": "Search issues by meaning",
2273
+ "tags": []
2274
+ }
2275
+ },
2276
+ "/api/v1/model-keys": {
2277
+ "get": {
2278
+ "callbacks": {},
2279
+ "deprecated": false,
2280
+ "description": "Requires the `model-keys:read` scope. The org's model-provider API keys as a provider => key map (e.g. anthropic, openai, google, openrouter), for tools that dispatch model calls, such as rcl. Which providers are offered is server configuration; the response is never cached. Login tokens carry the scope automatically; aone_ tokens need it minted explicitly.",
2281
+ "parameters": [],
2282
+ "responses": {
2283
+ "200": {
2284
+ "description": "Success"
2285
+ },
2286
+ "400": {
2287
+ "description": "Bad request"
2288
+ },
2289
+ "401": {
2290
+ "description": "Missing or invalid token"
2291
+ },
2292
+ "403": {
2293
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
2294
+ },
2295
+ "404": {
2296
+ "description": "Not found"
2297
+ },
2298
+ "422": {
2299
+ "description": "Validation error"
2300
+ }
2301
+ },
2302
+ "summary": "Model-provider API keys",
2303
+ "tags": []
2304
+ }
2305
+ },
2306
+ "/api/v1/projects": {
2307
+ "get": {
2308
+ "callbacks": {},
2309
+ "deprecated": false,
2310
+ "description": "Requires the `harness:read` scope.",
2311
+ "parameters": [
2312
+ {
2313
+ "description": "Page number (default 1)",
2314
+ "in": "query",
2315
+ "name": "page",
2316
+ "required": false,
2317
+ "schema": {
2318
+ "type": "integer"
2319
+ }
2320
+ },
2321
+ {
2322
+ "description": "Items per page (max 100)",
2323
+ "in": "query",
2324
+ "name": "page_size",
2325
+ "required": false,
2326
+ "schema": {
2327
+ "type": "integer"
2328
+ }
2329
+ },
2330
+ {
2331
+ "description": "name, sort_order, inserted_at, or updated_at",
2332
+ "in": "query",
2333
+ "name": "order_by",
2334
+ "required": false,
2335
+ "schema": {
2336
+ "type": "string"
2337
+ }
2338
+ },
2339
+ {
2340
+ "description": "asc or desc (default asc)",
2341
+ "in": "query",
2342
+ "name": "order_dir",
2343
+ "required": false,
2344
+ "schema": {
2345
+ "type": "string"
2346
+ }
2347
+ },
2348
+ {
2349
+ "description": "Match project name or summary",
2350
+ "in": "query",
2351
+ "name": "search",
2352
+ "required": false,
2353
+ "schema": {
2354
+ "type": "string"
2355
+ }
2356
+ },
2357
+ {
2358
+ "description": "Filter by state: backlog, planned, started, completed, canceled",
2359
+ "in": "query",
2360
+ "name": "state",
2361
+ "required": false,
2362
+ "schema": {
2363
+ "type": "string"
2364
+ }
2365
+ }
2366
+ ],
2367
+ "responses": {
2368
+ "200": {
2369
+ "description": "Success"
2370
+ },
2371
+ "400": {
2372
+ "description": "Bad request"
2373
+ },
2374
+ "401": {
2375
+ "description": "Missing or invalid token"
2376
+ },
2377
+ "403": {
2378
+ "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
2379
+ },
2380
+ "404": {
2381
+ "description": "Not found"
2382
+ },
2383
+ "422": {
2384
+ "description": "Validation error"
2385
+ }
2386
+ },
2387
+ "summary": "List projects",
1764
2388
  "tags": []
1765
2389
  },
1766
2390
  "post": {
1767
2391
  "callbacks": {},
1768
2392
  "deprecated": false,
1769
2393
  "description": "Requires the `harness:write` scope.",
1770
- "parameters": [
1771
- {
1772
- "description": "Project id",
1773
- "in": "path",
1774
- "name": "project_id",
1775
- "required": true,
1776
- "schema": {
1777
- "type": "string"
1778
- }
1779
- }
1780
- ],
2394
+ "parameters": [],
1781
2395
  "requestBody": {
1782
2396
  "content": {
1783
2397
  "application/json": {
@@ -1786,12 +2400,26 @@
1786
2400
  "description": {
1787
2401
  "type": "string"
1788
2402
  },
2403
+ "lead_id": {
2404
+ "type": "string"
2405
+ },
1789
2406
  "name": {
1790
2407
  "type": "string"
1791
2408
  },
1792
2409
  "sort_order": {
1793
2410
  "type": "number"
1794
2411
  },
2412
+ "start_date": {
2413
+ "format": "date",
2414
+ "type": "string"
2415
+ },
2416
+ "state": {
2417
+ "description": "backlog, planned, started, completed, or canceled",
2418
+ "type": "string"
2419
+ },
2420
+ "summary": {
2421
+ "type": "string"
2422
+ },
1795
2423
  "target_date": {
1796
2424
  "format": "date",
1797
2425
  "type": "string"
@@ -1823,16 +2451,35 @@
1823
2451
  "description": "Validation error"
1824
2452
  }
1825
2453
  },
1826
- "summary": "Create a milestone",
2454
+ "summary": "Create a project",
1827
2455
  "tags": []
1828
2456
  }
1829
2457
  },
1830
- "/api/v1/session": {
2458
+ "/api/v1/issues/{identifier}/relations/{id}": {
1831
2459
  "delete": {
1832
2460
  "callbacks": {},
1833
2461
  "deprecated": false,
1834
- "description": "Requires the `harness:read` scope. Logout for the harness CLI: revokes the bearer login token making the request. aone_ API tokens are refused (400) — manage those in the admin UI.",
1835
- "parameters": [],
2462
+ "description": "Requires the `harness:write` scope.",
2463
+ "parameters": [
2464
+ {
2465
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
2466
+ "in": "path",
2467
+ "name": "identifier",
2468
+ "required": true,
2469
+ "schema": {
2470
+ "type": "string"
2471
+ }
2472
+ },
2473
+ {
2474
+ "description": "Resource id",
2475
+ "in": "path",
2476
+ "name": "id",
2477
+ "required": true,
2478
+ "schema": {
2479
+ "type": "string"
2480
+ }
2481
+ }
2482
+ ],
1836
2483
  "responses": {
1837
2484
  "200": {
1838
2485
  "description": "Success"
@@ -1853,16 +2500,35 @@
1853
2500
  "description": "Validation error"
1854
2501
  }
1855
2502
  },
1856
- "summary": "Revoke the presented login token",
2503
+ "summary": "Delete a relation",
1857
2504
  "tags": []
1858
2505
  }
1859
2506
  },
1860
- "/api/v1/stats": {
1861
- "get": {
2507
+ "/api/v1/issues/{identifier}/links/{id}": {
2508
+ "delete": {
1862
2509
  "callbacks": {},
1863
2510
  "deprecated": false,
1864
- "description": "Requires the `harness:read` scope. Per-team and total open / started / blocked / ready / closed counts, one call.",
1865
- "parameters": [],
2511
+ "description": "Requires the `harness:write` scope.",
2512
+ "parameters": [
2513
+ {
2514
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
2515
+ "in": "path",
2516
+ "name": "identifier",
2517
+ "required": true,
2518
+ "schema": {
2519
+ "type": "string"
2520
+ }
2521
+ },
2522
+ {
2523
+ "description": "Resource id",
2524
+ "in": "path",
2525
+ "name": "id",
2526
+ "required": true,
2527
+ "schema": {
2528
+ "type": "string"
2529
+ }
2530
+ }
2531
+ ],
1866
2532
  "responses": {
1867
2533
  "200": {
1868
2534
  "description": "Success"
@@ -1883,16 +2549,26 @@
1883
2549
  "description": "Validation error"
1884
2550
  }
1885
2551
  },
1886
- "summary": "Workspace issue counts",
2552
+ "summary": "Delete a link",
1887
2553
  "tags": []
1888
2554
  }
1889
2555
  },
1890
- "/api/v1/teams": {
2556
+ "/api/v1/issues/{identifier}/relations": {
1891
2557
  "get": {
1892
2558
  "callbacks": {},
1893
2559
  "deprecated": false,
1894
2560
  "description": "Requires the `harness:read` scope.",
1895
- "parameters": [],
2561
+ "parameters": [
2562
+ {
2563
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
2564
+ "in": "path",
2565
+ "name": "identifier",
2566
+ "required": true,
2567
+ "schema": {
2568
+ "type": "string"
2569
+ }
2570
+ }
2571
+ ],
1896
2572
  "responses": {
1897
2573
  "200": {
1898
2574
  "description": "Success"
@@ -1913,24 +2589,43 @@
1913
2589
  "description": "Validation error"
1914
2590
  }
1915
2591
  },
1916
- "summary": "List teams",
2592
+ "summary": "List an issue's relations",
1917
2593
  "tags": []
1918
2594
  },
1919
2595
  "post": {
1920
2596
  "callbacks": {},
1921
2597
  "deprecated": false,
1922
- "description": "Requires the `harness:write` scope. Creates a team seeded with the default workflow states (Backlog, Todo, In Progress, Done, Canceled), so it is immediately usable for the full issue lifecycle. The key is upcased and must match `^[A-Z][A-Z0-9]*$`; numbering starts above any issues that already carry the key as their prefix.",
1923
- "parameters": [],
2598
+ "description": "Requires the `harness:write` scope.",
2599
+ "parameters": [
2600
+ {
2601
+ "description": "Issue identifier, e.g. ALL-4901 or CLI-12 (issues minted before team-prefixed numbering carry IO-)",
2602
+ "in": "path",
2603
+ "name": "identifier",
2604
+ "required": true,
2605
+ "schema": {
2606
+ "type": "string"
2607
+ }
2608
+ }
2609
+ ],
1924
2610
  "requestBody": {
1925
2611
  "content": {
1926
2612
  "application/json": {
1927
2613
  "schema": {
1928
2614
  "properties": {
1929
- "key": {
1930
- "description": "Identifier prefix for the team's issues (e.g. ALL in ALL-4901). Upcased; create-only.",
2615
+ "related_issue": {
2616
+ "description": "Identifier of the related issue, e.g. ALL-7",
1931
2617
  "type": "string"
1932
2618
  },
1933
- "name": {
2619
+ "type": {
2620
+ "description": "Directional aliases (blocked_by, duplicated_by) store the inverse edge",
2621
+ "enum": [
2622
+ "blocks",
2623
+ "blocked_by",
2624
+ "related",
2625
+ "duplicate",
2626
+ "duplicate_of",
2627
+ "duplicated_by"
2628
+ ],
1934
2629
  "type": "string"
1935
2630
  }
1936
2631
  },
@@ -1960,74 +2655,27 @@
1960
2655
  "description": "Validation error"
1961
2656
  }
1962
2657
  },
1963
- "summary": "Create a team",
2658
+ "summary": "Create a relation",
1964
2659
  "tags": []
1965
2660
  }
1966
2661
  },
1967
- "/api/v1/teams/{team_key}/issues": {
2662
+ "/api/v1/cli/token-exchange": {
1968
2663
  "post": {
1969
2664
  "callbacks": {},
1970
2665
  "deprecated": false,
1971
- "description": "Requires the `harness:write` scope.",
1972
- "parameters": [
1973
- {
1974
- "description": "Team key, e.g. ALL",
1975
- "in": "path",
1976
- "name": "team_key",
1977
- "required": true,
1978
- "schema": {
1979
- "type": "string"
1980
- }
1981
- }
1982
- ],
2666
+ "description": "Requires the `none (the code is the credential)` scope. Unauthenticated, tightly IP-rate-limited. Redeems the 60-second single-use code from the /cli/login browser handoff for a 30-day login token; the PKCE code_verifier must hash to the challenge the code was minted with.",
2667
+ "parameters": [],
1983
2668
  "requestBody": {
1984
2669
  "content": {
1985
2670
  "application/json": {
1986
2671
  "schema": {
1987
2672
  "properties": {
1988
- "acceptance_criteria": {
1989
- "description": "Acceptance criteria (markdown)",
1990
- "type": "string"
1991
- },
1992
- "actor": {
1993
- "description": "Display name to attribute the write to (e.g. an agent). Defaults to the token name for API tokens and to the signed-in user for login tokens. Display-only, never an access-control input.",
1994
- "type": "string"
1995
- },
1996
- "assignee": {
1997
- "description": "\"me\" for the token owner, a user id, an email address, or an exact display name",
1998
- "type": "string"
1999
- },
2000
- "assignee_id": {
2001
- "type": "string"
2002
- },
2003
- "description": {
2004
- "type": "string"
2005
- },
2006
- "design": {
2007
- "description": "Design decisions (markdown)",
2008
- "type": "string"
2009
- },
2010
- "due_date": {
2011
- "format": "date",
2012
- "type": "string"
2013
- },
2014
- "notes": {
2015
- "description": "Working notes (markdown)",
2016
- "type": "string"
2017
- },
2018
- "parent": {
2019
- "description": "Parent issue identifier, e.g. ALL-4223",
2020
- "type": "string"
2021
- },
2022
- "priority": {
2023
- "description": "0 none, 1 urgent, 2 high, 3 medium, 4 low",
2024
- "type": "integer"
2025
- },
2026
- "state_id": {
2027
- "description": "Defaults to the team's first workflow state",
2673
+ "code": {
2674
+ "description": "Single-use login code from the browser handoff",
2028
2675
  "type": "string"
2029
2676
  },
2030
- "title": {
2677
+ "code_verifier": {
2678
+ "description": "PKCE verifier whose SHA-256 the code was bound to",
2031
2679
  "type": "string"
2032
2680
  }
2033
2681
  },
@@ -2045,7 +2693,7 @@
2045
2693
  "description": "Bad request"
2046
2694
  },
2047
2695
  "401": {
2048
- "description": "Missing or invalid token"
2696
+ "description": "Invalid, expired, used, or verifier-mismatched code"
2049
2697
  },
2050
2698
  "403": {
2051
2699
  "description": "Token not permitted (org-scoped, non-admin, or missing scope)"
@@ -2057,20 +2705,20 @@
2057
2705
  "description": "Validation error"
2058
2706
  }
2059
2707
  },
2060
- "summary": "Create an issue",
2708
+ "summary": "Redeem a CLI login code",
2061
2709
  "tags": []
2062
2710
  }
2063
2711
  },
2064
- "/api/v1/teams/{team_key}/workflow_states": {
2712
+ "/api/v1/projects/{project_id}/milestones": {
2065
2713
  "get": {
2066
2714
  "callbacks": {},
2067
2715
  "deprecated": false,
2068
2716
  "description": "Requires the `harness:read` scope.",
2069
2717
  "parameters": [
2070
2718
  {
2071
- "description": "Team key, e.g. ALL",
2719
+ "description": "Project id",
2072
2720
  "in": "path",
2073
- "name": "team_key",
2721
+ "name": "project_id",
2074
2722
  "required": true,
2075
2723
  "schema": {
2076
2724
  "type": "string"
@@ -2097,30 +2745,43 @@
2097
2745
  "description": "Validation error"
2098
2746
  }
2099
2747
  },
2100
- "summary": "List a team's workflow states",
2748
+ "summary": "List a project's milestones",
2101
2749
  "tags": []
2102
- }
2103
- },
2104
- "/api/v1/uploads": {
2750
+ },
2105
2751
  "post": {
2106
2752
  "callbacks": {},
2107
2753
  "deprecated": false,
2108
- "description": "Requires the `harness:write` scope. Multipart upload of a png, jpg, webp, or gif (max 25 MB). Returns the attachment URL and a ready-to-paste `![alt](url)` markdown snippet for issue descriptions and comments. Attachments are private: the URL serves admins with a session; API clients fetch the bytes via `GET /api/v1/attachments/{attachment_id}/{file}`.",
2109
- "parameters": [],
2754
+ "description": "Requires the `harness:write` scope.",
2755
+ "parameters": [
2756
+ {
2757
+ "description": "Project id",
2758
+ "in": "path",
2759
+ "name": "project_id",
2760
+ "required": true,
2761
+ "schema": {
2762
+ "type": "string"
2763
+ }
2764
+ }
2765
+ ],
2110
2766
  "requestBody": {
2111
2767
  "content": {
2112
- "multipart/form-data": {
2768
+ "application/json": {
2113
2769
  "schema": {
2114
2770
  "properties": {
2115
- "file": {
2116
- "description": "png, jpg, webp, or gif up to 25 MB",
2117
- "format": "binary",
2771
+ "description": {
2772
+ "type": "string"
2773
+ },
2774
+ "name": {
2775
+ "type": "string"
2776
+ },
2777
+ "sort_order": {
2778
+ "type": "number"
2779
+ },
2780
+ "target_date": {
2781
+ "format": "date",
2118
2782
  "type": "string"
2119
2783
  }
2120
2784
  },
2121
- "required": [
2122
- "file"
2123
- ],
2124
2785
  "type": "object"
2125
2786
  }
2126
2787
  }
@@ -2145,20 +2806,17 @@
2145
2806
  },
2146
2807
  "422": {
2147
2808
  "description": "Validation error"
2148
- },
2149
- "502": {
2150
- "description": "File storage failed (transient) — retry"
2151
2809
  }
2152
2810
  },
2153
- "summary": "Upload an image attachment",
2811
+ "summary": "Create a milestone",
2154
2812
  "tags": []
2155
2813
  }
2156
2814
  },
2157
- "/api/v1/users": {
2158
- "get": {
2815
+ "/api/v1/session": {
2816
+ "delete": {
2159
2817
  "callbacks": {},
2160
2818
  "deprecated": false,
2161
- "description": "Requires the `harness:read` scope.",
2819
+ "description": "Requires the `harness:read` scope. Logout for the harness CLI: revokes the bearer login token making the request. aone_ API tokens are refused (400) — manage those in the admin UI.",
2162
2820
  "parameters": [],
2163
2821
  "responses": {
2164
2822
  "200": {
@@ -2180,7 +2838,7 @@
2180
2838
  "description": "Validation error"
2181
2839
  }
2182
2840
  },
2183
- "summary": "List assignable users",
2841
+ "summary": "Revoke the presented login token",
2184
2842
  "tags": []
2185
2843
  }
2186
2844
  }
@@ -2192,4 +2850,4 @@
2192
2850
  ],
2193
2851
  "servers": [],
2194
2852
  "tags": []
2195
- }
2853
+ }