generated from Apodini/Template-Repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1password-0.5.0.yaml
893 lines (891 loc) · 25.4 KB
/
1password-0.5.0.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
openapi: 3.0.2
servers:
- url: http://1password.local
- url: http://localhost:8080/v1
info:
contact:
email: [email protected]
name: 1Password Integrations
url: https://support.1password.com/
description: REST API interface for 1Password Connect.
title: 1Password Connect
version: 0.5.0
x-apisguru-categories:
- security
x-origin:
- format: openapi
url: https://i.1password.com/media/1password-connect/1password-connect-api.yaml
version: "3.0"
x-providerName: 1password.local
tags:
- description: Access and manage items inside 1Password Vaults
name: Items
- description: Access 1Password Vaults
name: Vaults
- description: Access API Request Activity
name: Activity
paths:
/activity:
get:
operationId: GetApiActivity
parameters:
- description: How many API Events should be retrieved in a single request.
in: query
name: limit
schema:
default: 50
example: 10
type: integer
- description: How far into the collection of API Events should the response start
in: query
name: offset
schema:
default: 0
example: 50
type: integer
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/APIRequest"
type: array
description: OK
headers:
Content-Range:
description: An decription of what part of the collection has been returned as
well as the total size.
schema:
example: 1-50/1134
type: string
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
security:
- ConnectToken: []
summary: Retrieve a list of API Requests that have been made.
tags:
- Activity
/vaults:
get:
operationId: GetVaults
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/Vault"
type: array
description: OK
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
security:
- ConnectToken: []
summary: Get all Vaults
tags:
- Vaults
"/vaults/{vaultUuid}":
get:
operationId: GetVaultById
parameters:
- description: The UUID of the Vault to fetch Items from
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Vault"
description: OK
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
example:
message: vault {itemUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Vault not found
security:
- ConnectToken: []
summary: Get Vault details and metadata
tags:
- Vaults
"/vaults/{vaultUuid}/items":
get:
operationId: GetVaultItems
parameters:
- description: The UUID of the Vault to fetch Items from
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
- description: Filter the Item collection based on Item name using SCIM eq filter
in: query
name: filter
schema:
example: title eq "Some Item Name"
type: string
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/Item"
type: array
description: OK
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"404":
content:
application/json:
example:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Vault not found
security:
- ConnectToken: []
summary: Get all items for inside a Vault
tags:
- Items
post:
operationId: CreateVaultItem
parameters:
- description: The UUID of the Vault to create an Item in
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
description: OK
"400":
content:
application/json:
example:
message: Invalid item category
status: 400
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unable to create item due to invalid input
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
examples:
vaultNotFound:
summary: Vault not found
value:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Item not found
security:
- ConnectToken: []
summary: Create a new Item
tags:
- Items
"/vaults/{vaultUuid}/items/{itemUuid}":
delete:
operationId: DeleteVaultItem
parameters:
- description: The UUID of the Vault the item is in
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
- description: The UUID of the Item to update
in: path
name: itemUuid
required: true
schema:
format: uuid
type: string
responses:
"204":
description: Successfully deleted an item
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
examples:
vaultNotFound:
summary: Vault not found
value:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Item not found
security:
- ConnectToken: []
summary: Delete an Item
tags:
- Items
get:
operationId: GetVaultItemById
parameters:
- description: The UUID of the Vault to fetch Item from
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
- description: The UUID of the Item to fetch
in: path
name: itemUuid
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
description: OK
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
examples:
itemNotFound:
summary: Item not found
value:
message: item {itemUuid} not found
status: 404
vaultNotFound:
summary: Vault not found
value:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Item not found
security:
- ConnectToken: []
summary: Get the details of an Item
tags:
- Items
patch:
description: >
Applies a modified [RFC6902 JSON
Patch](https://tools.ietf.org/html/rfc6902) document to an Item or
ItemField. This endpoint only supports `add`, `remove` and `replace`
operations.
When modifying a specific ItemField, the ItemField's ID in the `path` attribute of the operation object: `/fields/{fieldId}`
operationId: PatchVaultItem
parameters:
- description: The UUID of the Vault the item is in
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
- description: The UUID of the Item to update
in: path
name: itemUuid
required: true
schema:
format: uuid
type: string
requestBody:
content:
application/json:
examples:
PatchItemAttr:
summary: Update specific Item attributes
value:
- op: replace
path: /favorite
value: true
- op: remove
path: /tags/1
PatchItemField:
summary: Add a new ItemField to the Item
value:
- op: add
path: /fields
value:
label: New Field
type: string
value: hunter2
PatchItemFieldAttr:
summary: Modify a specific ItemField attribute.
value:
- op: add
path: /fields/vy09gd8EXAMPLE/label
value: New field name
- op: remove
path: /fields/vy09gd8EXAMPLE/value
PatchItemFieldWithID:
summary: Modify or remove an ItemField.
value:
- op: replace
path: /fields/h4we9a4fEXAMPLE00
value:
label: Replacement Title
type: string
value: new value
- op: remove
path: /fields/inm42xcf0EXAMPLE02
ReplaceAllAttributes:
summary: Replace an entire Item with new fields. Equivalent to a PUT request.
value:
- op: replace
path: /
value:
...: Any attr from FullItem schema
favorite: true
tags:
- tag1
- tag2
title: New Title
schema:
$ref: "#/components/schemas/Patch"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
description: OK - Item updated. If no Patch operations were provided, Item is
unmodified.
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
examples:
itemNotFound:
summary: Item not found
value:
message: item {itemUuid} not found
status: 404
vaultNotFound:
summary: Vault not found
value:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Item not found
security:
- ConnectToken: []
summary: Update a subset of Item attributes
tags:
- Items
put:
operationId: UpdateVaultItem
parameters:
- description: The UUID of the Item's Vault
in: path
name: vaultUuid
required: true
schema:
format: uuid
type: string
- description: The UUID of the Item to update
in: path
name: itemUuid
required: true
schema:
format: uuid
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/FullItem"
description: OK
"400":
content:
application/json:
example:
message: The item doesn't have a {example field name} field.
status: 400
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unable to create item due to invalid input
"401":
content:
application/json:
example:
message: Invalid token signature
status: 401
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Invalid or missing token
"403":
content:
application/json:
example:
message: vault {vaultUuid} is not in scope
status: 403
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Unauthorized access
"404":
content:
application/json:
examples:
itemNotFound:
summary: Item not found
value:
message: item {itemUuid} not found
status: 404
vaultNotFound:
summary: Vault not found
value:
message: vault {vaultUuid} not found
status: 404
schema:
$ref: "#/components/schemas/ErrorResponse"
description: Item not found
security:
- ConnectToken: []
summary: Update an Item
tags:
- Items
components:
schemas:
APIRequest:
description: Represents a request that was made to the API. Including what Token
was used and what resource was accessed.
properties:
action:
enum:
- READ
- CREATE
- UPDATE
- DELETE
type: string
actor:
properties:
account:
format: uuid
type: string
id:
format: uuid
type: string
jti:
format: uuid
type: string
requestIp:
type: string
userAgent:
type: string
type: object
requestId:
description: The unique id used to identify a single request.
format: uuid
type: string
resource:
properties:
item:
properties:
id:
format: uuid
type: string
type: object
itemVersion:
type: integer
type:
enum:
- ITEM
- VAULT
type: string
vault:
properties:
id:
format: uuid
type: string
type: object
type: object
result:
enum:
- SUCCESS
- DENY
type: string
timestamp:
format: date-time
readOnly: true
type: string
type: object
ErrorResponse:
properties:
message:
description: A message detailing the error
type: string
status:
description: HTTP Status Code
type: integer
type: object
FullItem:
allOf:
- $ref: "#/components/schemas/Item"
- properties:
fields:
items:
properties:
entropy:
description: For fields with a purpose of `PASSWORD` this is the entropy of the
value
readOnly: true
type: number
generate:
default: false
description: If value is not present then a new value should be generated for
this field
type: boolean
id:
type: string
label:
type: string
purpose:
description: Some item types, Login and Password, have fields used for autofill.
This property indicates that purpose and is required for
some item types.
enum:
- ""
- USERNAME
- PASSWORD
- NOTES
type: string
recipe:
$ref: "#/components/schemas/GeneratorRecipe"
section:
properties:
id:
format: uuid
type: string
type: object
type:
default: STRING
enum:
- STRING
- EMAIL
- CONCEALED
- URL
- TOTP
- DATE
- MONTH_YEAR
- MENU
type: string
value:
type: string
type: object
type: array
sections:
items:
properties:
id:
format: uuid
type: string
label:
type: string
type: object
type: array
type: object
GeneratorRecipe:
description: The recipe is used in conjunction with the "generate" property to
set the character set used to generate a new secure value
properties:
characterSets:
items:
enum:
- LETTERS
- DIGITS
- SYMBOLS
type: string
maximum: 3
minimum: 0
type: array
uniqueItems: true
length:
default: 32
description: Length of the generated value
maximum: 64
minimum: 1
type: integer
type: object
Item:
properties:
category:
enum:
- LOGIN
- PASSWORD
- SERVER
- DATABASE
- CREDIT_CARD
- MEMBERSHIP
- PASSPORT
- SOFTWARE_LICENSE
- OUTDOOR_LICENSE
- SECURE_NOTE
- WIRELESS_ROUTER
- BANK_ACCOUNT
- DRIVER_LICENSE
- IDENTITY
- REWARD_PROGRAM
- DOCUMENT
- EMAIL_ACCOUNT
- SOCIAL_SECURITY_NUMBER
- CUSTOM
type: string
createdAt:
format: date-time
readOnly: true
type: string
favorite:
default: false
type: boolean
id:
format: uuid
type: string
lastEditedBy:
format: uuid
readOnly: true
type: string
tags:
items:
type: string
type: array
title:
type: string
trashed:
default: false
type: boolean
updatedAt:
format: date-time
readOnly: true
type: string
urls:
example:
- primary: true
url: https://example.com
- url: https://example.org
items:
properties:
href:
format: url
type: string
primary:
type: boolean
required:
- href
type: object
type: array
vault:
properties:
id:
format: uuid
type: string
required:
- id
type: object
version:
type: integer
required:
- vault
- category
type: object
Patch:
items:
properties:
op:
enum:
- add
- remove
- replace
type: string
path:
description: An RFC6901 JSON Pointer pointing to the Item document, an Item
Attribute, an Item Field by Field ID, or an Item Field Attribute
example: /fields/vy09gd8EXAMPLE/label
type: string
value: {}
required:
- op
- path
type: object
type: array
Vault:
properties:
attributeVersion:
description: The vault version
type: integer
contentVersion:
description: The version of the vault contents
type: integer
createdAt:
format: date-time
readOnly: true
type: string
description:
type: string
id:
format: uuid
type: string
items:
description: Number of active items in the vault
type: integer
name:
type: string
type:
enum:
- USER_CREATED
- PERSONAL
- EVERYONE
- TRANSFER
type: string
updatedAt:
format: date-time
readOnly: true
type: string
type: object
securitySchemes:
ConnectToken:
bearerFormat: JWT
scheme: bearer
type: http