-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.json
147 lines (147 loc) · 6.61 KB
/
openapi.json
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
{
"openapi": "3.0.3",
"info": {
"title": "TravelTrust API",
"version": "1.0.0",
"description": "API for managing connections and data access between business and private wallets in TravelTrust"
},
"paths": {
"/createDRP": {
"post": {
"summary": "Checks or creates a Connection Key",
"description": "This endpoint verifies if a connection exists between `privateWalletId` and `businessWalletId`. If a connection is already established, it returns a Connection Hash. If no connection exists, the owner of the `privateWalletId` is notified of the request and asked to confirm or deny the connection, enabling a controlled and secure data-sharing process.",
"operationId": "createDRP",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"initiatorWalletId": {
"type": "string",
"description": "The unique identifier of the wallet initiating the data request or action. This wallet ID is used to log the time and identity of the party requesting the Data Read Permission (DRP), enabling traceability and accountability within the Travel Trust system."
},
"readerWalletId": {
"type": "string",
"description": "The unique identifier of the wallet that is intended to receive read access. This wallet ID represents the party requesting permission to view specific data within the Travel-Trust system."
},
"dataWalletId": {
"type": "string",
"description": "The unique identifier of the wallet holding the data requested for read access. If no prior agreement exists between the readerWalletId and dataWalletId, the holder of the dataWalletId is notified of the request and can choose to approve or deny access."
}
},
"required": ["initiatorWalletId", "readerWalletId", "dataWalletId"]
}
}
}
},
"responses": {
"200": {
"description": "Connection exists. Data read permission Hash returned.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"drpHash": {
"type": "string",
"description": "The Data Read Permission Hash (drp) is a security mechanism designed to control and restrict access to sensitive data. It acts as a unique access key, granted to authorized entities (such as specific reader wallets) to read particular data. The drp is paired with the readerWalletId, meaning that both values must match correctly to unlock and decrypt the information. This ensures that only authorized parties with both the drp and the correct wallet ID can access the data, thereby protecting it from unauthorized access and maintaining privacy and control over sensitive information."
}
}
}
}
}
},
"202": {
"description": "Connection does not exist yet. The owner of `privateWalletId` has been notified.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "The owner of the private wallet has been notified for connection confirmation."
},
"status": {
"type": "string",
"example": "Pending Confirmation"
}
}
}
}
}
},
"400": {
"description": "Invalid request. Missing or incorrect parameters."
},
"500": {
"description": "Internal server error. Connection could not be checked or created."
}
}
}
},
"/readData": {
"post": {
"summary": "Reads allowed data via the Connection Key",
"description": "Uses the `connectionKey` to read all data allowed in TravelTrust. TravelTrust also notifies the owner of the `privateWalletId` that their data has been accessed.",
"operationId": "readData",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"readerWalletId": {
"type": "string",
"description": "The unique identifier of the wallet that is requesting data access. This ID serves as proof of authorization, demonstrating that the requestor has the permission to read the specified data."
},
"drpHash": {
"type": "string",
"description": "The Data Read Permission Hash, which specifies the exact data set to be read. This hash acts as a unique key to the data, indicating the specific information that the readerWalletId is requesting access to."
}
},
"required": ["readerWalletId","drpHash"]
}
}
}
},
"responses": {
"200": {
"description": "Data successfully read and returned.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"description": "All data allowed in TravelTrust for the owner of the `privateWalletId`.",
"additionalProperties": true
},
"notification": {
"type": "string",
"example": "Owner of the private wallet has been notified of the data access."
}
}
}
}
}
},
"400": {
"description": "Invalid Connection Key or missing parameters."
},
"401": {
"description": "Unauthorized. No access to the requested data."
},
"500": {
"description": "Internal server error. Data could not be read."
}
}
}
}
},
"components": {}
}