-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathissuer.yml
123 lines (123 loc) · 4.27 KB
/
issuer.yml
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
openapi: 3.0.0
servers:
- url: https://issuer.qa.veres.app/issuers/z19mTE4x8KHRaQLgdoYwsfPnU
description: Veres Issuer (Quality Assurance)
info:
version: "0.0.3-unstable"
title: VC Issuer API
description: This is an Experimental Open API Specification for the [VC Data Model](https://www.w3.org/TR/vc-data-model/).
license:
name: W3C Software and Document License
url: http://www.w3.org/Consortium/Legal/copyright-software.
contact:
name: GitHub Source Code
url: https://github.com/w3c-ccg/vc-api
paths:
/credentials/issue:
post:
summary: Issues a credential and returns it in the response body.
tags:
- Credentials
security:
- networkAuth: []
- oAuth2: []
- zCap: []
operationId: issueCredential
x-expectedCaller: "Issuer Coordinator"
description: Issues a credential and returns it in the response body.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/IssueCredentialRequest"
description: Parameters for issuing the credential.
responses:
"201":
description: Credential successfully issued!
content:
application/json:
schema:
$ref: "#/components/schemas/IssueCredentialResponse"
"400":
description: >
The request could not be processed due to one of the following reasons:
- The provided value of 'issuer' does not match the expected configuration.
- Another condition that results in a Bad Request.
/credentials/status:
post:
summary: Updates the status of an issued credential
tags:
- Credentials
security:
- networkAuth: []
- oAuth2: []
- zCap: []
operationId: updateCredentialStatus
x-expectedCaller: "Issuer Service"
description: Updates the status of an issued credential.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateCredentialStatusRequest"
description: Parameters for updating the status of the issued credential.
responses:
"200":
description: Credential status successfully updated
"400":
description: Bad Request
"404":
description: Credential not found
components:
securitySchemes:
$ref: "./components/SecuritySchemes.yml#/components/securitySchemes"
schemas:
UpdateCredentialStatusRequest:
type: object
required: ['credentialId', 'credentialStatus', 'status']
additionalProperties: false
description: Credential status information to be updated.
properties:
credentialId:
type: string
description: Identifies the credential (the identifier does not have to appear in the VC itself).
credentialStatus:
type: object
description: Identifies the specific status list entry to update.
required: ['type', 'statusPurpose']
additionalProperties: false
properties:
id:
type: string
type:
type: string
statusPurpose:
type: string
statusListIndex:
type: string
statusListCredential:
type: string
status:
type: boolean
description: Specifies the new status.
indexAllocator:
type: string
description: For services to use which indexes are being used/assigned to VCs.
example:
{
"credentialId": "0fc754bc-fc32-46a0-aec1-a5ef385e7ea0",
"credentialStatus": { "type": "BitstringStatusList", "statusPurpose": "revocation" },
"status": True
}
IssueCredentialRequest:
type: object
properties:
credential:
$ref: "./components/Credential.yml#/components/schemas/UnsecuredCredential"
options:
$ref: "./components/IssueCredentialOptions.yml#/components/schemas/IssueCredentialOptions"
IssueCredentialResponse:
type: object
properties:
IssueCredentialSuccess:
$ref: "./components/IssueCredentialSuccess.yml#/components/schemas/IssueCredentialSuccess"