forked from oceanprotocol/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrizo.json
More file actions
200 lines (198 loc) Β· 7.12 KB
/
brizo.json
File metadata and controls
200 lines (198 loc) Β· 7.12 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
{
"basePath":"/api/v1/brizo",
"definitions":{
},
"host":"myfancybrizo.com",
"info":{
"description":"Brizo is the technical component executed by Publishers allowing them to provide extended data services. When running with our Docker images, it is exposed under `http://localhost:8030`.",
"title":"Brizo",
"version":"0.1.2"
},
"paths":{
"/api/v1/brizo/services/access/initialize":{
"post":{
"consumes":[
"application/json"
],
"description":"",
"parameters":[
{
"description":"Service agreement initialization.",
"in":"body",
"name":"body",
"required":true,
"schema":{
"properties":{
"consumerAddress":{
"description":"Consumer address.",
"example":"0x00a329c0648769A73afAc7F9381E08FB43dBEA72",
"type":"string"
},
"did":{
"description":"Identifier of the asset registered in ocean.",
"example":"did:op:08a429b8529856d59867503f8056903a680935a76950bb9649785cc97869a43d",
"type":"string"
},
"serviceAgreementId":{
"description":"Identifier of the service agreement.",
"example":"bb23s87856d59867503f80a690357406857698570b964ac8dcc9d86da4ada010",
"type":"string"
},
"serviceDefinitionId":{
"description":"Identifier of the service definition.",
"example":"0",
"type":"string"
},
"signature":{
"description":"Signature",
"example":"cade376598342cdae231321a0097876aeda656a567a67c6767fd8710129a9dc1",
"type":"string"
}
},
"required":[
"did",
"serviceAgreementId",
"serviceDefinitionId",
"signature",
{
"consumerAddress":null
}
],
"type":"object"
}
}
],
"responses":{
"201":{
"description":"Service agreement successfully initialized."
},
"400":{
"description":"One of the required attributes is missing."
},
"404":{
"description":"Invalid signature."
},
"500":{
"description":"Error"
}
},
"summary":"Initialize the SLA between the publisher and the consumer.",
"tags":[
"services"
]
}
},
"/api/v1/brizo/services/compute":{
"post":{
"consumes":[
"application/json"
],
"description":"",
"parameters":[
{
"description":"Asset metadata.",
"in":"body",
"name":"body",
"required":true,
"schema":{
"properties":{
"algorithm_did":{
"description":"Identifier of the algorithm to execute",
"example":"0x0234242345",
"type":"string"
},
"asset_did":{
"description":"Identifier of the asset registered in Ocean",
"example":"0x0234242345",
"type":"string"
},
"consumer_wallet":{
"description":"Address of the wallet of the asset consumer. Ex. data-science...",
"example":"0x0234242345",
"type":"string"
},
"cpu":{
"description":"Number of CPUs to execute the algorithm.",
"example":1,
"type":"integer"
},
"docker_image":{
"description":"Docker image where the algorithm is going to be executed. Docker image must include all the libraries needed to run it.",
"example":"python:3.6-alpine",
"type":"string"
},
"memory":{
"description":"Ammout of memory in GB to run the algorithm",
"example":1.5,
"type":"number"
}
},
"required":[
"asset_did",
"algorithm_did",
"consumer_wallet"
],
"type":"object"
}
}
],
"responses":{
},
"summary":"Allows to execute an algorithm inside a Docker instance in the cloud. Requires the publisher of the assets to provide this service in the service agreement related with the requested `asset_did`.",
"tags":[
"services"
]
}
},
"/api/v1/brizo/services/consume":{
"get":{
"consumes":[
"application/json"
],
"description":"",
"parameters":[
{
"description":"The consumer address.",
"in":"query",
"name":"consumerAddress",
"required":true,
"type":"string"
},
{
"description":"The ID of the service agreement.",
"in":"query",
"name":"serviceAgreementId",
"required":true,
"type":"string"
},
{
"description":"This URL is only valid if Brizo acts as a proxy. Consumer can't download using the URL if it's not through Brizo.",
"in":"query",
"name":"url",
"required":true,
"type":"string"
}
],
"responses":{
"302":{
"description":"Redirect to valid asset url."
},
"400":{
"description":"One of the required attributes is missing."
},
"404":{
"description":"Invalid asset data."
},
"500":{
"description":"Error"
}
},
"summary":"Allows download of asset data file.",
"tags":[
"services"
]
}
}
},
"swagger":"2.0"
}