seismic_dms_seistore_openapi.yaml 60.3 KB
Newer Older
Diego Molteni's avatar
Diego Molteni committed
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
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
256
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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
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
415
416
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
451
452
453
454
455
456
457
458
459
460
461
462
463
464
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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
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
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
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
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
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
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
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
811
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
840
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
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
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
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#  ***************************************************************************
#  Copyright 2017 - 2020, Schlumberger
#
#  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
# ===========================================================================

swagger: '2.0'

info:
  title: 'Seismic Store Service'
  version: '2.0.0'
  description: "Seismic Domain Data Management APIs to store and manage seismic datasets ."

host: "api.evq.csp.slb.com"
basePath: "/seistore-svc/api/v3"

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

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

paths:

  # /api/v3/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"

  # /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"

  /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:
      - description: "Legal tag of the dataset" 
        in: header
        name: ltag
        type: string
        required: false
        default: 'Slb-Private-USA-EHC'           
      - description: "Name of the tenant"
        in: path
        name: tenantid
        required: true
        type: string
        default: 'common'
      - description: "Name of the subproject"
        in: path
        name: subprojectid
        required: true
        type: string
        default: 'carbon'
      - description: "Hierarchical path of the dataset"
        in: query
        name: path
        required: true
        type: string
        default: 'a/b/c'
      - description: "Name of the dataset"
        in: path
        name: datasetid
        required: true
        type: string
        default: 'slb-dataset'
      - description: "Request body"
        in: body
        name: request body
        required: false
        schema:
          $ref: '#/definitions/DatasetRegisterBody'
      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
          default: common
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: 'a/b/c'
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: 'slb-dataset'
        - description: "Include the seismic storage metadata record if it exists"
          in: query
          name: seismicmeta
          required: false
          type: boolean  
      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"
      description: "<ul><li>Delete a dataset in seismic store.</li><li>Required roles: subproject.admin, subproject.editor</li></ul>"      
      operationId: dataset-delete
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          default: common
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: 'a/b/c'
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: 'slb-dataset'
      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:
        - Dataset          
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
        - 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
          type: string            
      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
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c 
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
        - 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
          type: number       
      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."
      description: "<ul><li>Removes the lock for a dataset id.</li><li>Required roles: subproject.admin</li></ul>" 
      operationId: dataset-lock-rm
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
      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
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
      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:
      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>"       
      operationId: ctag-check
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
        - description: "Ctag to be validated"
          in: query
          name: ctag
          required: true
          type: string
          default: slb-dataset-ctag
      responses:
        200:
          description: "Return true if the ctag is valid or false if it is invalid"
          schema:
            type: boolean
            example: 'true'
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/gtags:
    put:
      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>"       
      operationId: add-tag
      tags:
        - Dataset
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
          type: string
          default: a/b/c
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
          default: slb-dataset
        - description: "Gtags array list"
          in: query
          name: gtag    
          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
  # /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"

  /dataset/tenant/{tenantid}/subproject/{subprojectid}:
    get:
      summary: "Get the list of datasets in a subproject."
      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>"      
      operationId: dataset-list
      tags:
        - Dataset      
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Gtags associated with dataset metadata"
          in: query
          name: gtag
          type: array
          items: 
            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."
      description: "<ul><li>Check if the dataset exists.</li><li>Required roles: subproject.admin, subproject.editor, subproject.viewer</li></ul>"         
      operationId: dataset-exist
      tags:
        - Dataset     
      parameters:
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: '#/definitions/DatasetCheckList'
      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
          default: common
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
            $ref: '#/definitions/DatasetCheckList'
      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"
      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>"      
      operationId: ls
      tags:
        - Utility 
      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:
              $ref: '#/definitions/LsDatasets'
        201:
          description: "Paginated seismic store path content - For documentation purpose if limit or cursor is given status code here is 200"
          schema:
              $ref: '#/definitions/LsPaginatedDatasets'
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /utility/cp:
    post:
      summary: "Copy dataset"
      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>"      
      operationId: cp
      tags:
        - Utility 
      parameters:
        - description: "Seismic store source dataset path"
          in: query
          name: sdpath_from
          required: true
          type: string
          default: sd://common/carbon/a/b/c/slb-dataset
        - description: "Seismic store destination dataset path"
          in: query
          name: sdpath_to
          required: true
          type: string
          default: sd://common/carbon/a/b/c/slb-dataset-copy
        - description: "Lock source and destination while copying"
          in: query
          name: lock
          required: false
          type: boolean       
      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:
      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>"       
      operationId: gcs-access-token
      tags:
        - Utility 
      parameters:
      - 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 
      responses:
        200:
          description: "The GCS access token"
          schema:
            $ref: '#/definitions/AccessToken'
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  # /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: "The request body"
  #         in: body
  #         name: request body
  #         required: true
  #         schema:
  #           $ref: '#/definitions/ImpTokenRequest'
  #     responses:
  #       200:
  #         description: "The impersonation credentials token"
  #         schema:
  #           $ref: '#/definitions/ImpToken'
  #       400:
  #         description: "Bad request"
  #       401:
  #         description: "Unauthorized"
  #       403:
  #         description: "Forbidden"
  #       404:
  #         description: "Not found"

  #   put:
  #     summary: "refresh an impersonation credentials 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: "The request body"
  #         in: body
  #         name: request body
  #         required: true
  #         schema:
  #           $ref: '#/definitions/RefreshTokenRequest'
  #     responses:
  #       200:
  #         description: "The impersonation credentials token refreshed"
  #         schema:
  #           $ref: '#/definitions/ImpToken'   
  #       400:
  #         description: "Bad request"
  #       401:
  #         description: "Unauthorized"
  #       403:
  #         description: "Forbidden"
  #       404:
  #         description: "Not found"

  #   patch:
  #     summary: "patch an impersonation credentials token"
  #     description: "<ul><li>Patch an impersonation credential token by updating the refresh-url.</li><li>Required roles: none</li></ul>"
  #     operationId: imp-token-patch
  #     tags:
  #       - Impersonation Token
  #     parameters:
  #       - description: "The request body"
  #         in: body
  #         name: request body
  #         required: true
  #         schema:
  #           $ref: '#/definitions/ImpTokenPatchRequest'
  #     responses:
  #       200:
  #         description: "The generated impersonation token"
  #         schema:
  #           $ref: '#/definitions/ImpToken'
  #       400:
  #         description: "Bad request"
  #       401:
  #         description: "Unauthorized"
  #       403:
  #         description: "Forbidden"
  #       404:
  #         description: "Not found"

  /subproject/tenant/{tenantid}/subproject/{subprojectid}:
    post:
      summary: "Create a new subproject"    
      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:
      - description: "Legal tag of the datapartition/tenant" 
        in: header
        name: ltag
        type: string
        required: true
        default: 'Slb-Private-USA-EHC'
      - description: "Name of the subproject"
        in: path
        name: subprojectid
        type: string
        required: true
        default: carbon
      - description: "Name of the tenant"
        in: path
        name: tenantid
        type: string
        required: true
        default: common
      - description: "Request body"
        in: body
        name: request body
        required: true
        schema:
          $ref: '#/definitions/SubProjectCreateBody'
      responses:
        200:
          description: "Creation of the subproject is successful."
          schema:
            $ref: "#/definitions/SubProject"          
        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:
        - SubProject 
      parameters:
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
          default: carbon      
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
          default: common
      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: