@@ -6,17 +6,16 @@ option go_package="github.com/datatrails/go-datatrails-common-api-gen/assets/v2/
6
6
7
7
import "google/api/annotations.proto" ;
8
8
import "protoc-gen-openapiv2/options/annotations.proto" ;
9
-
10
- import "datatrails-common-api/assets/v2/assets/assetresponse.proto" ;
9
+ import "datatrails-common-api/caps/v1/caps/caps.proto" ;
11
10
import "datatrails-common-api/assets/v2/assets/createasset.proto" ;
11
+ import "datatrails-common-api/assets/v2/assets/assetresponse.proto" ;
12
+ import "datatrails-common-api/assets/v2/assets/getasset.proto" ;
13
+ import "datatrails-common-api/assets/v2/assets/listassets.proto" ;
12
14
import "datatrails-common-api/assets/v2/assets/createevent.proto" ;
13
15
import "datatrails-common-api/assets/v2/assets/eventresponse.proto" ;
14
- import "datatrails-common-api/assets/v2/assets/getasset.proto" ;
15
16
import "datatrails-common-api/assets/v2/assets/getevent.proto" ;
16
- import "datatrails-common-api/assets/v2/assets/listassets.proto" ;
17
17
import "datatrails-common-api/assets/v2/assets/listevents.proto" ;
18
18
import "datatrails-common-api/assets/v2/assets/miscmessages.proto" ;
19
- import "datatrails-common-api/caps/v1/caps/caps.proto" ;
20
19
21
20
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger ) = {
22
21
info : {
@@ -25,41 +24,28 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
25
24
version : "2.0"
26
25
contact : {
27
26
name : "DataTrails"
28
- url : "https://www.datatrails.com "
27
+ url : "https://www.datatrails.ai "
29
28
}
30
29
};
31
- base_path : "/_api " ;
30
+ base_path : "/archivist/v2/assets " ;
32
31
schemes : HTTPS;
33
32
consumes : "application/json" ;
34
33
produces : "application/json" ;
35
34
tags : [
36
35
{
37
- name : "Assets & Events" ,
36
+ name : "Assets and Events" ,
38
37
description : "Primary API for Asset management"
39
- },
40
- {
41
- name : "Unsupported" ,
42
- description : "Internal APIs that are unstable and should not be used in a production setting."
43
38
}
44
39
];
45
40
};
46
41
47
- service Events {
48
- rpc Create (CreateEventRequest ) returns (EventResponse ) {
49
- option (google.api.http ) = {
50
- post : "/archivist/v2/assets/{uuid}/events"
51
- body : "*"
52
- };
53
- }
54
- }
55
-
56
42
service Assets {
57
43
rpc ListAssets (ListAssetsRequest ) returns (ListAssetsResponse ) {
58
44
option (google.api.http ) = {
59
45
get : "/archivist/v2/assets"
60
46
};
61
47
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
62
- tags : [ "Assets & Events" ]
48
+ tags : [ "Assets and Events" ]
63
49
summary : "List Assets"
64
50
description : "Retrieves a list of Assets"
65
51
responses : {
@@ -83,6 +69,12 @@ service Assets {
83
69
description : "Returned when the user is not authenticated to the system."
84
70
}
85
71
}
72
+ responses : {
73
+ key : "402" ;
74
+ value : {
75
+ description : "Returned when the user's quota of Assets for the given proof mechanism has been reached."
76
+ }
77
+ }
86
78
responses : {
87
79
key : "403" ;
88
80
value : {
@@ -104,7 +96,7 @@ service Assets {
104
96
body : "*"
105
97
};
106
98
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
107
- tags : [ "Assets & Events" ]
99
+ tags : [ "Assets and Events" ]
108
100
summary : "Create an Asset"
109
101
description : "Creates an Asset"
110
102
responses : {
@@ -139,7 +131,7 @@ service Assets {
139
131
get : "/archivist/v2/assets/{uuid}"
140
132
};
141
133
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
142
- tags : [ "Assets & Events" ]
134
+ tags : [ "Assets and Events" ]
143
135
summary : "Retrieves a specific Asset"
144
136
description : "Retrieves a specific Asset"
145
137
responses : {
@@ -174,7 +166,7 @@ service Assets {
174
166
get : "/archivist/v2/assets/{uuid}:publicurl"
175
167
};
176
168
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
177
- tags : [ "Assets & Events" ]
169
+ tags : [ "Assets and Events" ]
178
170
summary : "Retrieves the public url for a specific Asset."
179
171
description : "Retrieves the public url for a specific Asset."
180
172
responses : {
@@ -209,7 +201,7 @@ service Assets {
209
201
get : "/archivist/v2/assets/{asset_uuid}/events/{uuid}"
210
202
};
211
203
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
212
- tags : [ "Assets & Events" ]
204
+ tags : [ "Assets and Events" ]
213
205
summary : "Retrieves Event"
214
206
description : "Retrieves a specific Event"
215
207
responses : {
@@ -244,7 +236,7 @@ service Assets {
244
236
get : "/archivist/v2/assets/{asset_uuid}/events/{uuid}:publicurl"
245
237
};
246
238
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
247
- tags : [ "Assets & Events" ]
239
+ tags : [ "Assets and Events" ]
248
240
summary : "Retrieves the public url for a specific Event."
249
241
description : "Retrieves the public url for a specific Event."
250
242
responses : {
@@ -279,7 +271,7 @@ service Assets {
279
271
get : "/archivist/v2/assets/{uuid}/events"
280
272
};
281
273
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
282
- tags : [ "Assets & Events" ]
274
+ tags : [ "Assets and Events" ]
283
275
summary : "List Events"
284
276
description : "Lists Events"
285
277
responses : {
@@ -324,7 +316,7 @@ service Assets {
324
316
get : "/archivist/v2/assets:caps"
325
317
};
326
318
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
327
- tags : [ "Assets & Events", "Unsupported" ] // Unsupported is signal for future OAPI parsing
319
+ tags : [ "Assets and Events", "Unsupported" ] // Unsupported is signal for future OAPI parsing
328
320
summary : "Get remaining capped resources for Assets"
329
321
description : "Not stable or officially supported. Get remaining capped resources for Assets"
330
322
responses : {
@@ -341,4 +333,37 @@ service Assets {
341
333
}
342
334
};
343
335
}
344
- }
336
+ }
337
+
338
+ service Events {
339
+ rpc Create (CreateEventRequest ) returns (EventResponse ) {
340
+ option (google.api.http ) = {
341
+ post : "/archivist/v2/assets/{uuid}/events"
342
+ body : "*"
343
+ };
344
+ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation ) = {
345
+ tags : [ "Assets and Events" ]
346
+ summary : "Creates an Event"
347
+ description : "Creates an Event"
348
+ responses : {
349
+ key : "401" ;
350
+ value : {
351
+ description : "Returned when the user is not authenticated to the system."
352
+ }
353
+ }
354
+ responses : {
355
+ key : "402" ;
356
+ value : {
357
+ description : "Returned when the user's quota of Events has been reached."
358
+ }
359
+ }
360
+ responses : {
361
+ key : "429" ;
362
+ value : {
363
+ description : "Returned when a user exceeds their subscription's rate limit for requests." ;
364
+ }
365
+ }
366
+ };
367
+ }
368
+ }
369
+
0 commit comments