-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdid-openapi.yml
More file actions
2560 lines (2461 loc) · 93.1 KB
/
Copy pathdid-openapi.yml
File metadata and controls
2560 lines (2461 loc) · 93.1 KB
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
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.4
info:
title: DID REST API
version: 0.1.0
description: |
Manage Decentralized Identifiers (DIDs) and resolve them to W3C DID documents.
The API can create, resolve, and deactivate DIDs, and can manage the DID
document parts independently: verification methods, verification relationships,
services, controllers, key mappings to KMS-held keys, aliases, and cached
resolution results.
Locally created DIDs are `MANAGED`; their private keys live in the connected
KMS. DIDs that are only looked up are tracked as `EXTERNAL` references whose
documents are resolved and cached. The `/methods` endpoints report which DID
methods are available in the deployment and which operations each method
supports.
Listing DIDs returns the shared `PageMeta` envelope. Requesting an unknown DID
returns `404`; attempting a mutation a method does not support, such as adding
a verification method to immutable `did:key`, returns `422` with
`UNSUPPORTED_OPERATION`.
contact:
name: Product Engineering
email: support@example.com
url: 'https://example.com'
servers:
- url: /api/did/v1
description: DID management API base path.
security:
- bearer: []
tags:
- name: Dids
description: CRUD operations for DIDs.
- name: VerificationMethods
description: Manage verification methods within a DID.
- name: VerificationRelationships
description: Manage verification relationships (purposes) within a DID.
- name: Services
description: Manage service endpoints within a DID.
- name: KeyMappings
description: Manage key mappings between verification methods and KMS keys.
- name: DocumentCache
description: |
Access and refresh cached DID documents. The document cache is a
read-only convenience layer, not the source of truth for managed
signing operations. For managed DIDs the DID resource, verification
methods, and key mappings are authoritative; the cached document
reflects the last-known resolved state.
- name: Controllers
description: Manage controller entries for a DID.
- name: AlsoKnownAs
description: Manage also-known-as entries for a DID.
- name: EquivalentIds
description: Manage equivalent-id entries for a DID.
- name: Capabilities
description: Inspect DID method capabilities supported by the deployment.
paths:
# --------------------------------------------------------------------
# DIDs
# --------------------------------------------------------------------
/identifiers:
post:
tags: [Dids]
summary: Create a new DID
description: |
Creates a MANAGED DID using an already registered KMS key reference.
The request never carries raw key material; `keyInfo` points at the
KMS provider and alias or key id that should back the initial
verification method. Method-specific options are passed in `options`.
operationId: createDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DidCreateRequest'
examples:
createWebDid:
$ref: '#/components/examples/CreateWebDidRequest'
responses:
'201':
description: DID created successfully.
headers:
Location:
description: URI of the newly created DID.
schema:
type: string
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
examples:
createdWebDid:
$ref: '#/components/examples/CreatedWebDid'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'409':
$ref: './common-components.yml#/components/responses/Conflict'
'500':
$ref: './common-components.yml#/components/responses/Error'
get:
tags: [Dids]
summary: List DIDs
description: |
Returns a page of local DID records. Filters are applied before
pagination. `role` is parsed from `MANAGED` or `EXTERNAL`; `expand`
accepts `document`, `keys`, or `all` as a comma-separated query value.
operationId: listDids
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
- name: method
in: query
description: Filter by DID method (e.g., key, web, ion).
schema:
type: string
- name: role
in: query
description: Filter by DID role.
schema:
$ref: './did-components.yml#/components/schemas/DidRole'
- name: alias
in: query
description: Filter by exact alias match.
schema:
type: string
- name: search
in: query
description: Case-insensitive contains search on DID string and alias.
schema:
type: string
- name: includeDeactivated
in: query
description: Include deactivated DIDs in results.
schema:
type: boolean
default: false
- name: includeDeleted
in: query
description: Include soft-deleted DIDs in results.
schema:
type: boolean
default: false
- name: page
in: query
description: Page number (zero-based).
schema:
type: integer
minimum: 0
default: 0
- name: size
in: query
description: Page size.
schema:
type: integer
minimum: 1
maximum: 1000
default: 100
- name: sort
in: query
description: Sort field.
schema:
type: string
enum:
- createdAt
- updatedAt
- did
- method
- alias
default: createdAt
- name: sortDirection
in: query
description: Sort direction.
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- in: query
name: expand
required: false
description: |
Comma-separated list of optional projections to include inline on
each returned `Did`. The default response carries only the
lightweight summary fields per item; keep this default for
cheap pagination over large result sets. `all` is shorthand for every
supported projection. Adding new values is backward-compatible.
schema:
type: array
items:
type: string
enum: [document, keys, all]
style: form
explode: false
example:
- document
responses:
'200':
description: Paginated list of DIDs.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: '#/components/schemas/DidListResponse'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/external:
post:
tags: [Dids]
summary: Track an externally-managed DID
description: |
Registers a reference to an externally-managed DID for local tracking.
Only the DID string (and optional alias) is persisted; the resolver
fetches the document and the IDK CacheService holds it. The tracked
DID always gets `role = EXTERNAL`. KMS key material is never bound to
external DIDs; keys belong to MANAGED DIDs created locally via
`POST /identifiers`.
operationId: trackExternalDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TrackExternalDidRequest'
example:
did: "did:web:partner.example.com"
alias: "partner-did"
responses:
'201':
description: External DID reference created successfully.
headers:
Location:
description: URI of the tracked DID.
schema:
type: string
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'409':
$ref: './common-components.yml#/components/responses/Conflict'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
get:
tags: [Dids]
summary: Get DID
description: |
Returns a single DID. The default response is the lightweight `Did`
summary, the same shape as items in `GET /identifiers`. Use `?expand=document,keys`
(or `?expand=all`) to include the resolved DID document and KMS key
mappings inline on the returned object.
Sub-resource collections (controllers, also-known-as, equivalent-ids,
verification methods, verification relationships, services) are
deliberately not folded into this response; fetch them via their
dedicated sub-resource endpoints (`/identifiers/{did}/controllers`,
`/identifiers/{did}/verification-methods`, etc.).
operationId: getDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
- in: query
name: expand
required: false
description: |
Comma-separated list of optional projections to include inline on the
returned `Did`. The default response carries only the lightweight
summary fields. `all` is shorthand for every supported projection.
Adding new values is backward-compatible; clients should ignore
unknown values.
schema:
type: array
items:
type: string
enum: [document, keys, all]
style: form
explode: false
example:
- document
- keys
responses:
'200':
description: DID retrieved successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
patch:
tags: [Dids]
summary: Partially update a DID
description: |
Follows JSON Merge Patch semantics: absent fields are ignored, and
explicitly setting a field to null removes it.
operationId: updateDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DidUpdateRequest'
example:
alias: "acme-issuer-renamed"
canonicalId: "did:web:issuer.example.com"
responses:
'200':
description: DID updated successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
put:
tags: [Dids]
summary: Replace a DID
description: |
Replaces the mutable declarative fields of a DID in one request.
Collections in the body are full replacement sets. Verification
methods and key mappings are intentionally managed through their
dedicated sub-resource endpoints.
operationId: replaceDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DidReplaceRequest'
example:
alias: "acme-issuer"
controllers:
- "did:web:controller-a.example.com"
alsoKnownAs:
- "https://issuer.example.com/about"
equivalentIds:
- "did:web:issuer.example.com"
contexts:
- "https://www.w3.org/ns/did/v1"
canonicalId: "did:web:issuer.example.com"
deactivated: false
services:
- id: "svc-linked-domains"
type: "LinkedDomains"
serviceEndpoint: "https://issuer.example.com"
relationships:
- purpose: "assertionMethod"
verificationMethodId: "#key-1"
responses:
'200':
description: DID replaced successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
delete:
tags: [Dids]
summary: Delete a DID
description: |
Soft-deletes the local DID resource (sets deletedAt timestamp).
Does NOT deactivate the DID on the network/ledger. The DID can be
recovered by querying with includeDeleted=true. To deactivate a DID
on the network, use the deactivate action instead.
operationId: deleteDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'204':
description: DID deleted successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}/actions/deactivate:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
post:
tags: [Dids]
summary: Deactivate a DID
description: |
Publishes a deactivation operation to the DID method's network or
ledger. This is irreversible for most DID methods. Sets the
deactivated flag to true on the local DID. This is fundamentally
different from DELETE, which only soft-deletes the local DID.
operationId: deactivateDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/DeactivateDidRequest'
example:
options: {}
responses:
'200':
description: DID deactivated successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/Did'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}/resolve:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
get:
tags: [Dids]
summary: Resolve a DID or dereference a DID URL
description: |
Resolves a locally managed DID or dereferences a DID URL.
When a plain DID is provided, returns a ResolutionResult containing
the DID document with resolution and document metadata.
When a DID URL with a fragment is provided (e.g.,
did:example:123#key-1), returns a DereferencingResult containing
the specific resource (verification method, service, etc.).
This performs a local DID lookup first. If the DID is not
locally managed, behavior depends on configuration (may fall
through to remote resolution).
For DIF Universal Resolver interop, use the separate endpoint
at /1.0/identifiers/{identifier}.
operationId: resolveDid
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
- name: Accept
in: header
required: false
description: |
Content negotiation for response format.
Preferred W3C DID document representations for plain DID resolution:
- application/did+json: DID document JSON representation
- application/did+ld+json: DID document JSON-LD representation
Compatibility wrapper representations:
- application/did-resolution: full ResolutionResult
- application/did-url-dereferencing: DereferencingResult
When absent, defaults to application/did-resolution for plain DIDs
and application/did-url-dereferencing for DID URLs with fragments.
schema:
type: string
enum:
- application/did+json
- application/did+ld+json
- application/did-resolution
- application/did-url-dereferencing
responses:
'200':
description: |
DID resolved or DID URL dereferenced successfully.
Response schema depends on Accept header:
- application/did-resolution: ResolutionResult
- application/did+json: DID document JSON representation
- application/did+ld+json: DID document JSON-LD representation
- application/did-url-dereferencing: DereferencingResult
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/did+json:
schema:
$ref: '#/components/schemas/DidDocument'
application/did+ld+json:
schema:
$ref: '#/components/schemas/DidDocument'
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
application/did-url-dereferencing:
schema:
$ref: '#/components/schemas/DereferencingResult'
application/json:
schema:
$ref: '#/components/schemas/ResolutionResult'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'410':
description: DID has been deactivated.
content:
application/did-resolution:
schema:
$ref: '#/components/schemas/ResolutionResult'
application/json:
schema:
$ref: '#/components/schemas/ResolutionResult'
'500':
$ref: './common-components.yml#/components/responses/Error'
# --------------------------------------------------------------------
# Verification Methods
# --------------------------------------------------------------------
/identifiers/{did}/verification-methods:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
get:
tags: [VerificationMethods]
summary: List verification methods
description: |
Lists verification methods persisted for the DID. Relationship
membership is carried on each method through
`valueVerificationRelation` and `referenceVerificationRelations`.
operationId: listVerificationMethods
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'200':
description: List of verification methods.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: '#/components/schemas/VerificationMethodListResponse'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'500':
$ref: './common-components.yml#/components/responses/Error'
post:
tags: [VerificationMethods]
summary: Add a verification method
description: |
Adds a verification method backed by an existing KMS key reference.
Use `valueVerificationRelation` to embed the method by value in one
relationship, and `referenceVerificationRelations` to reference it by
DID URL from one or more relationships.
operationId: addVerificationMethod
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VerificationMethodCreateRequest'
example:
id: "#key-2"
type: "JsonWebKey2020"
controller: "did:web:issuer.example.com"
keyInfo:
providerId: "softwaretest"
alias: "issuer-assertion-key"
referenceVerificationRelations:
- "authentication"
- "assertionMethod"
responses:
'201':
description: Verification method created successfully.
headers:
Location:
description: URI of the newly created verification method.
schema:
type: string
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/VerificationMethod'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}/verification-methods/{methodId}:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
- $ref: './did-components.yml#/components/parameters/MethodId'
get:
tags: [VerificationMethods]
summary: Get a verification method
description: |
Returns one verification method by fragment or absolute DID URL. The
path segment is percent-decoded before lookup.
operationId: getVerificationMethod
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'200':
description: Verification method retrieved successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/VerificationMethod'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
patch:
tags: [VerificationMethods]
summary: Update a verification method
description: |
Follows JSON Merge Patch semantics: absent fields are ignored, and
explicitly setting a nullable field to null removes it. `keyInfo` can
be partially supplied to rebind only selected KMS-key fields.
operationId: updateVerificationMethod
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VerificationMethodUpdateRequest'
example:
referenceVerificationRelations:
- "assertionMethod"
revokedAt: null
responses:
'200':
description: Verification method updated successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/VerificationMethod'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
delete:
tags: [VerificationMethods]
summary: Remove a verification method
description: |
Removes the verification method from the DID and drops relationship
bindings that point at it.
operationId: removeVerificationMethod
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'204':
description: Verification method deleted successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
# --------------------------------------------------------------------
# Verification Relationships
# --------------------------------------------------------------------
/identifiers/{did}/verification-relationships:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
get:
tags: [VerificationRelationships]
summary: List verification relationships (derived view)
description: |
Returns the per-purpose view of verification relationships derived
from the DID's verification methods. Read-only; to add or remove
a VM from a relationship, update the VM's
`valueVerificationRelation` / `referenceVerificationRelations`.
operationId: listVerificationRelationships
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
- name: purpose
in: query
description: Filter by verification purpose.
schema:
$ref: './did-components.yml#/components/schemas/VerificationPurpose'
responses:
'200':
description: List of verification relationships.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: '#/components/schemas/VerificationRelationshipListResponse'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'500':
$ref: './common-components.yml#/components/responses/Error'
post:
tags: [VerificationRelationships]
summary: Add a verification relationship
description: |
Binds an existing verification method to a verification relationship
purpose. The default is a referenced relationship; set `embed` to true
to serialize the relationship as an inline verification method object.
operationId: addVerificationRelationship
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [verificationMethodId, purpose]
properties:
verificationMethodId:
type: string
description: The verification method id (or fragment) to bind.
example: "#key-1"
purpose:
type: string
description: One of authentication, assertionMethod, keyAgreement, capabilityInvocation, capabilityDelegation.
example: "assertionMethod"
embed:
type: boolean
description: Render this relationship as an embedded verification method instead of a DID URL reference.
default: false
example: false
example:
verificationMethodId: "#key-1"
purpose: "assertionMethod"
embed: false
responses:
'201':
description: Verification relationship added successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/VerificationRelationship'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'422':
$ref: './common-components.yml#/components/responses/ValidationError'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}/verification-relationships/{relationshipId}:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
- name: relationshipId
in: path
required: true
description: |
Identifier of the verification relationship binding to remove.
Implementations typically encode this as `<purpose>:<verificationMethodId>`.
schema:
type: string
delete:
tags: [VerificationRelationships]
summary: Remove a verification relationship
description: |
Removes one stored relationship binding by id. Use the id returned by
`POST /identifiers/{did}/verification-relationships`.
operationId: removeVerificationRelationship
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'204':
description: Verification relationship removed successfully.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'422':
$ref: './common-components.yml#/components/responses/ValidationError'
'500':
$ref: './common-components.yml#/components/responses/Error'
# --------------------------------------------------------------------
# DID Services
# --------------------------------------------------------------------
/identifiers/{did}/services:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
get:
tags: [Services]
summary: List DID services
description: |
Lists the DID document service entries currently stored for the DID.
Service entries use the DID Core wire shape: `id`, `type`, and
`serviceEndpoint`.
operationId: listDidServices
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
responses:
'200':
description: List of DID services.
headers:
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: '#/components/schemas/DidServiceListResponse'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'500':
$ref: './common-components.yml#/components/responses/Error'
post:
tags: [Services]
summary: Add a DID service
description: |
Adds a DID Core service entry. `type` may be a string or an array of
strings; `serviceEndpoint` may be a URI string, object, or array.
operationId: addDidService
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DidServiceCreateRequest'
example:
id: "svc-linked-domains"
type: "LinkedDomains"
serviceEndpoint: "https://issuer.example.com"
responses:
'201':
description: DID service created successfully.
headers:
Location:
description: URI of the newly created DID service.
schema:
type: string
X-Correlation-ID:
$ref: './common-components.yml#/components/headers/CorrelationId'
content:
application/json:
schema:
$ref: './did-components.yml#/components/schemas/DidDocumentService'
'400':
$ref: './common-components.yml#/components/responses/ValidationError'
'401':
$ref: './common-components.yml#/components/responses/Unauthorized'
'403':
$ref: './common-components.yml#/components/responses/Forbidden'
'404':
$ref: './common-components.yml#/components/responses/NotFound'
'500':
$ref: './common-components.yml#/components/responses/Error'
/identifiers/{did}/services/{serviceId}:
parameters:
- $ref: './did-components.yml#/components/parameters/Did'
- $ref: './did-components.yml#/components/parameters/ServiceId'
get:
tags: [Services]
summary: Get a DID service
description: |
Returns one service entry by the service id used in the DID document.
operationId: getDidService
parameters:
- $ref: './common-components.yml#/components/parameters/CorrelationId'