openapi.osdu.yaml 58.1 KB
Newer Older
Diego Molteni's avatar
Diego Molteni committed
1
#  ***************************************************************************
Diego Molteni's avatar
Diego Molteni committed
2
#  Copyright 2017 - 2021, Schlumberger
Diego Molteni's avatar
Diego Molteni committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
#  Licensed under the Apache License, Version 2.0(the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#  ***************************************************************************

# ===========================================================================
# Endpoints Description
# ===========================================================================

Daniel Perez's avatar
Daniel Perez committed
21
swagger: "2.0.0"
Diego Molteni's avatar
Diego Molteni committed
22
23

info:
Diego Molteni's avatar
Diego Molteni committed
24
  title: "Seismic Store Service"
Daniel Perez's avatar
Daniel Perez committed
25
  version: "3.0.0"
Diego Molteni's avatar
Diego Molteni committed
26
  description: "Seismic Domain Data Management APIs to store and manage seismic datasets ."
27
28
29
  license:
    name: "Apache 2.0"
    url: "https://www.apache.org/licenses/LICENSE-2.0.html"
Diego Molteni's avatar
Diego Molteni committed
30
31
32
33
34
35
36
37
38
39
40
41

consumes:
  - application/json
produces:
  - application/json
schemes:
  - https

# ===========================================================================
# Endpoints Paths Section
# ===========================================================================

42
43
basePath: /seistore-svc/api/v3

Diego Molteni's avatar
Diego Molteni committed
44
paths:
Diego Molteni's avatar
Diego Molteni committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  /svcstatus:
    get:
      summary: "Seismic store service status (fast check)"
      description: "<ul><li>Return the seismic store service status.</li><li>Required roles: none</li></ul>"
      security:
        - api-key: []
      operationId: service-status
      tags:
        - General
      responses:
        200:
          description: "service status"
          schema:
            type: string
            example: "service OK"
Diego Molteni's avatar
Diego Molteni committed
60

Diego Molteni's avatar
Diego Molteni committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  /svcstatus/access:
    get:
      summary: "Seismic store service status"
      description: "<ul><li>Return the seismic store service status.</li><li>Required roles: none</li></ul>"
      operationId: service-status-check
      tags:
        - General
      responses:
        200:
          description: "seismic store service status"
          schema:
            $ref: "#/definitions/Status"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
Diego Molteni's avatar
Diego Molteni committed
77
78
79
80
81
82
83
84
85

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}:
    post:
      summary: "Register a new dataset"
      description: "<ul><li>Register a new dataset in seismic store.</li><li>Required roles: subproject.admin, subproject.editor</li></ul>"
      operationId: dataset-register
      tags:
        - Dataset
      parameters:
Diego Molteni's avatar
Diego Molteni committed
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
        - description: "Legal tag of the dataset"
          in: header
          name: ltag
          type: string
          required: false
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Request body"
          in: body
          name: request body
          required: false
          schema:
            $ref: "#/definitions/DatasetRegisterBody"
Diego Molteni's avatar
Diego Molteni committed
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
      responses:
        200:
          description: "Registered dataset metadata"
          schema:
            $ref: "#/definitions/Dataset"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        409:
          description: "Conflict"
        423:
          description: "Locked"

    get:
      summary: "Retrieve a dataset"
      description: "<ul><li>Return the dataset metadata from seismic store.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
      operationId: dataset-get
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Include the seismic storage metadata record if it exists"
          in: query
          name: seismicmeta
          required: false
Diego Molteni's avatar
Diego Molteni committed
166
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
      responses:
        200:
          description: "Metadata of the dataset"
          schema:
            $ref: "#/definitions/Dataset"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    delete:
      summary: "Delete a dataset"
Diego Molteni's avatar
Diego Molteni committed
183
      description: "<ul><li>Delete a dataset in seismic store.</li><li>Required roles: subproject.admin, subproject.editor</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
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
      operationId: dataset-delete
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
      responses:
        200:
          description: "The resource was deleted successfully."
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    patch:
      summary: "Patch the dataset metadata"
      description: "<ul><li>Update the dataset meta information in seismic store or close(unlock) the dataset. If the endpoint is used without the close parameter, at least one body field is required or the endpoint will return an error.</li><li>Required roles: subproject.admin, subproject.editor</li><li>Patchable fields: <ul><li><b>dataset_new_name:</b> new name to use for the dataset (rename)</li><li><b>filemetadata:</b> this is a seistore specific field and describe how the physical data are stored in the cloud storage system (GCS/AzureContainer etc etc). This metadata is mainly used by client libraries to correctly reconstruct the dataset. For example you can store a dataset as truncated in multiple objects of 64MB each, name them from 0 to N and save the filemetadata = “{nOboject: N, totalSize: 1024, objsize: 64, sizeUnit: MB }”.</li><li><b>last_modified_date:</b> mark this field as true to update the dataset last modified date</li><li><b>gtags:</b> upsert tags to an existing dataset metadata. If the dataset metadata already has gtags, then new gtags are appended to this list.</li><li><b>ltag:</b> update the existing legalTag value</b></li><li><b>readonly:</b> update the dataset mode to readonly(true) or to read/write(false)</li><li><b>seismicmeta:</b> update the DataEcosystem storage metadata (refer to the DataEcosystem storage service tutorial for more help)</b></li></ul></li></ul>"
      operationId: dataset-patch
      tags:
Diego Molteni's avatar
Diego Molteni committed
225
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
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
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Request body"
          in: body
          name: request body
          schema:
            $ref: "#/definitions/DatasetPatch"
        - description: "Non null sbit value of the dataset. Using this value here will close the dataset"
          in: query
          name: close
          required: false
Diego Molteni's avatar
Diego Molteni committed
256
          type: string
Diego Molteni's avatar
Diego Molteni committed
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
      responses:
        200:
          description: "Metadata of the patched dataset"
          schema:
            $ref: "#/definitions/Dataset"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        409:
          description: "Conflict"
        423:
          description: "Locked"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/lock:
    put:
      summary: "Acquire a lock for a dataset id"
      description: "<ul><li>Open a dataset for read or write and lock its state.</li><li>Required roles open lock for write: subproject.admin, subproject.editor</li><li>Required roles open lock for read: subproject.admin, subproject.editor, subproject.viewer</ul>"
      operationId: dataset-lock
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Type of the lock which can be set to 'read' (default) or 'write'"
          in: query
          name: openmode
          required: false
          type: string
        - description: "Session identifier issued for a previous write lock acquisition operation"
          in: query
          name: wid
          required: false
Diego Molteni's avatar
Diego Molteni committed
312
          type: number
Diego Molteni's avatar
Diego Molteni committed
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
      responses:
        200:
          description: "Acquired a lock and the return value is the dataset metadata with session identifier stored in 'sbit' attribute"
          schema:
            $ref: "#/definitions/Dataset"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        423:
          description: "Locked"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/unlock:
    put:
      summary: "Remove the lock associated with a dataset id."
Diego Molteni's avatar
Diego Molteni committed
332
      description: "<ul><li>Removes the lock for a dataset id.</li><li>Required roles: subproject.admin</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
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
      operationId: dataset-lock-rm
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
      responses:
        200:
          description: "Removed the lock value associated with dataset id"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        423:
          description: "Locked"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/permission:
    get:
      summary: "Retrieve the access permissions of a user on a dataset id."
      description: "<ul><li>Retrieve the access permission of a user on a dataset.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
      operationId: dataset-permission
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
      responses:
        200:
          description: "User access permission on the dataset."
          schema:
            $ref: "#/definitions/DatasetPermission"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/ctagcheck:
    get:
Diego Molteni's avatar
Diego Molteni committed
415
416
      summary: "Validate if a dataset ctag matches the pre-existing ctag in metadata catalog."
      description: "<ul><li>Check if the provided dataset cTag match the one stored in the metadata catalog.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
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
      operationId: ctag-check
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Ctag to be validated"
          in: query
          name: ctag
          required: true
          type: string
      responses:
        200:
          description: "Return true if the ctag is valid or false if it is invalid"
          schema:
            type: boolean
Diego Molteni's avatar
Diego Molteni committed
451
            example: "true"
Diego Molteni's avatar
Diego Molteni committed
452
453
454
455
456
457
458
459
460
461
462
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/gtags:
    put:
Diego Molteni's avatar
Diego Molteni committed
463
464
      summary: "Upsert tags to a dataset"
      description: "<ul><li>Upsert tags to an existing dataset metadata. If the dataset metadata already has gtags, then  new gtags are appended to this list.</li><li>Required roles: subproject.admin, subproject.editor</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
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
      operationId: add-tag
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
        - description: "Gtags array list"
          in: query
Diego Molteni's avatar
Diego Molteni committed
491
          name: gtag
Diego Molteni's avatar
Diego Molteni committed
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
          required: true
          type: array
          items:
            type: string
            default: "tag1"
          collectionFormat: multi
      responses:
        200:
          description: "Gtags were upserted to the dataset metadata."
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  # To deprecate in favor of /utility/ls
Diego Molteni's avatar
Diego Molteni committed
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
  /dataset/tenant/{tenantid}/subproject/{subprojectid}/readdsdirfulllist:
    get:
      summary: "content list"
      description: "<ul><li>List datasets and sub-directories for a directory path.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
      operationId: dataset-read-directory
      tags:
        - Dataset
      parameters:
        - description: "The tenant project name"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "The sub-project name"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "The hierarchy path"
          in: query
          name: path
          required: true
          type: string
      responses:
        200:
          description: "The list of datasets and directories in the requested directory path."
          schema:
            $ref: "#/definitions/DatasetAndDirectories"
Diego Molteni's avatar
Diego Molteni committed
539
540
541
542

  /dataset/tenant/{tenantid}/subproject/{subprojectid}:
    get:
      summary: "Get the list of datasets in a subproject."
Diego Molteni's avatar
Diego Molteni committed
543
      description: "<ul><li>Return the list of datasets in a sub-project.If gtags are in the request parameters, then get only those datasets that have the exact list of gtags.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
544
545
      operationId: dataset-list
      tags:
Diego Molteni's avatar
Diego Molteni committed
546
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Gtags associated with dataset metadata"
          in: query
          name: gtag
          type: array
Diego Molteni's avatar
Diego Molteni committed
562
          items:
Diego Molteni's avatar
Diego Molteni committed
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
            type: string
          collectionFormat: multi

      responses:
        200:
          description: "The list of all datasets in the subproject if no gtags are in the request parameters. If gtags exist in the request parameters, then datasets that have the same list of gtags."
          schema:
            type: array
            items:
              $ref: "#/definitions/Dataset"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/exist:
    post:
      summary: "Check if list of datasets exists in the subproject."
Diego Molteni's avatar
Diego Molteni committed
585
      description: "<ul><li>Check if the dataset exists.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
586
587
      operationId: dataset-exist
      tags:
Diego Molteni's avatar
Diego Molteni committed
588
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
605
            $ref: "#/definitions/DatasetCheckList"
Diego Molteni's avatar
Diego Molteni committed
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
      responses:
        200:
          description: "A list of boolean values for all the input datasets in the request body. If a value is true, then corresponding dataset exists and if it is false, then the dataset does not exist"
          schema:
            type: array
            items:
              type: boolean
            example: [true, false]
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/sizes:
    post:
      summary: "Retrieve the size of datasets"
      description: "<ul><li>Return a list with the sizes of the requested datasets.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
      operationId: dataset-sizes
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
646
            $ref: "#/definitions/DatasetCheckList"
Diego Molteni's avatar
Diego Molteni committed
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
      responses:
        200:
          description: "The sizes list of all the datasets. If the dataset does not exist, the size would be -1"
          schema:
            type: array
            items:
              type: number
            example: [1024, -1]
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /utility/ls:
    get:
      summary: "Retrieve list of datasets and sub-directories inside a seismic store path"
Diego Molteni's avatar
Diego Molteni committed
667
      description: "<ul><li>Return the list of datasets and sub-directories of a seismic store path.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
668
669
      operationId: ls
      tags:
Diego Molteni's avatar
Diego Molteni committed
670
        - Utility
Diego Molteni's avatar
Diego Molteni committed
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
      parameters:
        - description: "Seismic store path, sd://tenant/sub-project/path"
          in: query
          name: sdpath
          required: true
          type: string
          default: sd://common/carbon/a/b/c
        - description: "Working mode, dirs or datasets or undefined for both"
          in: query
          name: wmode
          required: false
          type: string
        - description: "Limits total number of datasets to be returned"
          in: query
          name: limit
          required: false
          type: number
        - description: "Pagination token - this query parameter can be omitted on first call"
          in: query
          name: cursor
          required: false
          type: string
      responses:
        200:
          description: "Seismic store path content"
          schema:
Diego Molteni's avatar
Diego Molteni committed
697
            $ref: "#/definitions/LsDatasets"
Diego Molteni's avatar
Diego Molteni committed
698
699
700
        201:
          description: "Paginated seismic store path content - For documentation purpose if limit or cursor is given status code here is 200"
          schema:
Diego Molteni's avatar
Diego Molteni committed
701
            $ref: "#/definitions/LsPaginatedDatasets"
Diego Molteni's avatar
Diego Molteni committed
702
703
704
705
706
707
708
709
710
711
712
713
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /utility/cp:
    post:
      summary: "Copy dataset"
Diego Molteni's avatar
Diego Molteni committed
714
      description: "<ul><li>Copy a seismic store dataset. The source and destination dataset must be in the same sub-project.</li><li>Required roles: subproject.admin, subproject.editor</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
715
716
      operationId: cp
      tags:
Diego Molteni's avatar
Diego Molteni committed
717
        - Utility
Diego Molteni's avatar
Diego Molteni committed
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
      parameters:
        - description: "Seismic store source dataset path"
          in: query
          name: sdpath_from
          required: true
          type: string
        - description: "Seismic store destination dataset path"
          in: query
          name: sdpath_to
          required: true
          type: string
        - description: "Lock source and destination while copying"
          in: query
          name: lock
          required: false
Diego Molteni's avatar
Diego Molteni committed
733
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
      responses:
        200:
          description: "Copy operation succeeded"
          schema:
            type: object
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        409:
          description: "Conflict"
        423:
          description: "Locked"

  /utility/gcs-access-token:
    get:
Diego Molteni's avatar
Diego Molteni committed
754
755
      summary: "Generate a GCS access token"
      description: "<ul><li>Generate a GCS access token for a specified seismic store resource. The source and destination dataset must be in the same sub-project.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
756
757
      operationId: gcs-access-token
      tags:
Diego Molteni's avatar
Diego Molteni committed
758
        - Utility
Diego Molteni's avatar
Diego Molteni committed
759
      parameters:
Diego Molteni's avatar
Diego Molteni committed
760
761
762
763
764
765
766
767
768
769
        - description: "Seismic store path in the format sd://tenant/sub-project"
          in: query
          name: sdpath
          type: string
          required: true
          default: sd://common/carbon
        - description: "Readonly access, true(default) or false"
          in: query
          name: readonly
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
770
771
772
773
      responses:
        200:
          description: "The GCS access token"
          schema:
Diego Molteni's avatar
Diego Molteni committed
774
            $ref: "#/definitions/AccessToken"
Diego Molteni's avatar
Diego Molteni committed
775
776
777
778
779
780
781
782
783
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

Diego Molteni's avatar
Diego Molteni committed
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
  /imptoken:
    post:
      summary: "Generate impersonation credentials token"
      description: "<ul><li>Generate an impersonation credential token of a user for a set of subproject resources.</li><li>Required roles: app.trusted</li></ul>"
      operationId: imp-token
      tags:
        - Impersonation Token
      parameters:
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: "#/definitions/ImpTokenRequest"
      responses:
        200:
          description: "Generated a impersonation credentials token successfully"
          schema:
            $ref: "#/definitions/ImpToken"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
Diego Molteni's avatar
Diego Molteni committed
811

Diego Molteni's avatar
Diego Molteni committed
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
    put:
      summary: "Refresh an impersonation credential token"
      description: "<ul><li>Refresh an impersonation credential token.</li><li>Required roles: none</li></ul>"
      security:
        - api-key: []
      operationId: imp-token-refresh
      tags:
        - Impersonation Token
      parameters:
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: "#/definitions/RefreshTokenRequest"
      responses:
        200:
          description: "Refreshed impersonation credential token successfully"
          schema:
            $ref: "#/definitions/ImpToken"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
Diego Molteni's avatar
Diego Molteni committed
840

Diego Molteni's avatar
Diego Molteni committed
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
    patch:
      summary: "Patch an impersonation credential token's refresh url and generate a new impersonation token"
      description: "<ul><li>Patch an impersonation credential token's refresh url and generate a new impersonation token.</li><li>Required roles: none</li></ul>"
      operationId: imp-token-patch
      tags:
        - Impersonation Token
      parameters:
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: "#/definitions/ImpTokenPatchRequest"
      responses:
        200:
          description: "Generated impersonation token successfully and its refresh url is updated"
          schema:
            $ref: "#/definitions/ImpToken"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
Diego Molteni's avatar
Diego Molteni committed
867
868
869

  /subproject/tenant/{tenantid}/subproject/{subprojectid}:
    post:
Diego Molteni's avatar
Diego Molteni committed
870
      summary: "Create a new subproject"
Diego Molteni's avatar
Diego Molteni committed
871
872
873
874
875
      description: "<ul><li>Creates a new sub-project resource in seismic store.</li><li>Required roles: users.datalake.admin</li></ul>"
      operationId: subproject-create
      tags:
        - SubProject
      parameters:
Diego Molteni's avatar
Diego Molteni committed
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
        - description: "Legal tag of the datapartition/tenant"
          in: header
          name: ltag
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          type: string
          required: true
        - description: "Name of the tenant"
          in: path
          name: tenantid
          type: string
          required: true
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: "#/definitions/SubProjectCreateBody"
Diego Molteni's avatar
Diego Molteni committed
896
897
898
899
      responses:
        200:
          description: "Creation of the subproject is successful."
          schema:
Diego Molteni's avatar
Diego Molteni committed
900
            $ref: "#/definitions/SubProject"
Diego Molteni's avatar
Diego Molteni committed
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"
        409:
          description: "Conflict"
    get:
      summary: "Retrieve the subproject metadata"
      description: "<ul><li>Return the metadata for a requested sub-project.</li><li>Required roles: subproject.admin</li></ul>"
      operationId: subproject-get
      tags:
Diego Molteni's avatar
Diego Molteni committed
916
        - SubProject
Diego Molteni's avatar
Diego Molteni committed
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
      parameters:
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
      responses:
        200:
          description: "Retrieved subproject metadata successfully"
          schema:
            $ref: "#/definitions/SubProject"
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    delete:
      summary: "Delete a subproject"
      description: "<ul><li>Delete a subproject in seismic store.</li><li>Required roles: subproject.admin</li></ul>"
      operationId: subproject-delete
      tags:
Diego Molteni's avatar
Diego Molteni committed
947
        - SubProject
Diego Molteni's avatar
Diego Molteni committed
948
949
950
951
952
953
954
955
956
957
958
959
960
      parameters:
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
      responses:
        200:
Diego Molteni's avatar
Diego Molteni committed
961
          description: "Deletion of the subproject completed"
Diego Molteni's avatar
Diego Molteni committed
962
963
964
965
966
967
968
969
970
971
972
973
974
975
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    patch:
      summary: "Patch a subproject metadata"
      description: "<ul><li>Patch a subproject metadata in seismic store.</li><li>Required roles: subproject.admin</li></ul>"
      operationId: subproject-patch
      tags:
Diego Molteni's avatar
Diego Molteni committed
976
        - SubProject
Diego Molteni's avatar
Diego Molteni committed
977
      parameters:
Diego Molteni's avatar
Diego Molteni committed
978
        - description: "Legal tag of the subproject"
Diego Molteni's avatar
Diego Molteni committed
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
          in: header
          name: ltag
          type: string
          required: true
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
        - description: "True if the legal tags of all datasets in a subproject needs to be updated"
          in: query
          name: recursive
          required: false
          type: boolean
      responses:
        200:
          description: "Updated subproject metadata successfully"