openapi.yaml 71.5 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
# ===========================================================================

Diego Molteni's avatar
Diego Molteni committed
21
swagger: "2.0"
Diego Molteni's avatar
Diego Molteni committed
22
23

info:
Daniel Perez's avatar
Daniel Perez committed
24
  title: "Seismic DMS Service (#{app.environment.identifier}#)"
Diego Molteni's avatar
Diego Molteni committed
25
  version: "3.0.0"
Daniel Perez's avatar
Daniel Perez committed
26
  description: "Seismic Data Management APIs to store and manage seismic datasets ."
Diego Molteni's avatar
Diego Molteni committed
27
28

host: "#{gcp.endpoints.service.name}#"
Varunkumar Manohar's avatar
Varunkumar Manohar committed
29
basePath: "/seistore-svc"
Diego Molteni's avatar
Diego Molteni committed
30
31

x-google-endpoints:
Diego Molteni's avatar
Diego Molteni committed
32
33
  - name: "#{gcp.endpoints.service.name}#"
    allowCors: True
Diego Molteni's avatar
Diego Molteni committed
34

Varunkumar Manohar's avatar
Varunkumar Manohar committed
35
x-google-allow: configured
Diego Molteni's avatar
Diego Molteni committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

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:
Diego Molteni's avatar
Diego Molteni committed
54
        - api-key: []
Diego Molteni's avatar
Diego Molteni committed
55
56
57
58
59
60
61
62
63
64
65
66
      operationId: service-status
      tags:
        - General
      responses:
        200:
          description: "service status"
          schema:
            type: string
            example: "service OK"

  /api/v3/svcstatus/access:
    get:
varungbt's avatar
varungbt committed
67
68
      summary: "Seismic store service access check"
      description: "<ul><li>Validates if the token audience is allowed</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
69
70
71
72
73
      operationId: service-status-check
      tags:
        - General
      responses:
        200:
varungbt's avatar
varungbt committed
74
          description: "User token audience is allowed by seismic store service"
Diego Molteni's avatar
Diego Molteni committed
75
          schema:
Diego Molteni's avatar
Diego Molteni committed
76
            $ref: "#/definitions/Status"
Diego Molteni's avatar
Diego Molteni committed
77
        401:
Diego Molteni's avatar
Diego Molteni committed
78
          description: "Unauthorized"
Diego Molteni's avatar
Diego Molteni committed
79
        403:
Diego Molteni's avatar
Diego Molteni committed
80
          description: "Forbidden"
Diego Molteni's avatar
Diego Molteni committed
81
82
83
84
85
86
87
88
89

  /api/v3/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
90
91
92
93
94
        - description: "Legal tag of the dataset"
          in: header
          name: ltag
          type: string
          required: false
Diego Molteni's avatar
Diego Molteni committed
95
          default: "Slb-Private-USA-EHC"
96
97
98
99
100
101
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""
Diego Molteni's avatar
Diego Molteni committed
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
        - 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"
Diego Molteni's avatar
Diego Molteni committed
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
      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:
157
158
159
160
161
162
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
163
164
165
166
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
Diego Molteni's avatar
Diego Molteni committed
167
          default: common
Diego Molteni's avatar
Diego Molteni committed
168
169
170
171
172
173
          type: string
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
174
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
175
176
177
178
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
179
          type: string
Diego Molteni's avatar
Diego Molteni committed
180
          default: "a/b/c"
Diego Molteni's avatar
Diego Molteni committed
181
182
183
184
185
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
186
          default: "slb-dataset"
Diego Molteni's avatar
Diego Molteni committed
187
188
189
190
        - description: "Include the seismic storage metadata record if it exists"
          in: query
          name: seismicmeta
          required: false
Diego Molteni's avatar
Diego Molteni committed
191
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
      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
208
      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
209
210
211
212
      operationId: dataset-delete
      tags:
        - Dataset
      parameters:
213
214
215
216
217
218
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
219
220
221
222
223
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
224
          default: common
Diego Molteni's avatar
Diego Molteni committed
225
226
227
228
229
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
230
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
231
232
233
234
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
235
          type: string
Diego Molteni's avatar
Diego Molteni committed
236
          default: "a/b/c"
Diego Molteni's avatar
Diego Molteni committed
237
238
239
240
241
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
242
          default: "slb-dataset"
Diego Molteni's avatar
Diego Molteni committed
243
244
245
246
247
248
249
250
251
252
253
254
255
256
      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"
Diego Molteni's avatar
Diego Molteni committed
257
      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 = “{nObject: 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>"
Diego Molteni's avatar
Diego Molteni committed
258
259
      operationId: dataset-patch
      tags:
Diego Molteni's avatar
Diego Molteni committed
260
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
261
      parameters:
262
263
264
265
266
267
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
268
269
270
271
272
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
273
          default: common
Diego Molteni's avatar
Diego Molteni committed
274
275
276
277
278
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
279
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
280
281
282
283
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
284
          type: string
Diego Molteni's avatar
Diego Molteni committed
285
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
286
287
288
289
290
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
291
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
292
293
294
295
296
297
298
299
300
        - 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
301
          type: string
Diego Molteni's avatar
Diego Molteni committed
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
      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"

  /api/v3/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:
328
329
330
331
332
333
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
334
335
336
337
338
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
339
          default: common
Diego Molteni's avatar
Diego Molteni committed
340
341
342
343
344
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
345
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
346
347
348
349
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
350
          type: string
Diego Molteni's avatar
Diego Molteni committed
351
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
352
353
354
355
356
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
357
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
358
359
360
361
362
363
364
365
366
        - 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
367
          type: number
Diego Molteni's avatar
Diego Molteni committed
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
      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"

  /api/v3/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
387
      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
388
389
390
391
      operationId: dataset-lock-rm
      tags:
        - Dataset
      parameters:
392
393
394
395
396
397
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
398
399
400
401
402
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
403
          default: common
Diego Molteni's avatar
Diego Molteni committed
404
405
406
407
408
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
409
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
410
411
412
413
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
414
          type: string
Diego Molteni's avatar
Diego Molteni committed
415
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
416
417
418
419
420
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
421
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
      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"

  /api/v3/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:
444
445
446
447
448
449
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
450
451
452
453
454
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
455
          default: common
Diego Molteni's avatar
Diego Molteni committed
456
457
458
459
460
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
461
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
462
463
464
465
        - description: "Hierarchical path for the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
466
          type: string
Diego Molteni's avatar
Diego Molteni committed
467
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
468
469
470
471
472
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
473
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
      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"

  /api/v3/dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/ctagcheck:
    get:
Diego Molteni's avatar
Diego Molteni committed
490
491
      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
492
493
494
495
      operationId: ctag-check
      tags:
        - Dataset
      parameters:
496
497
498
499
500
501
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
502
503
504
505
506
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
507
          default: common
Diego Molteni's avatar
Diego Molteni committed
508
509
510
511
512
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
513
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
514
515
516
517
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
518
          type: string
Diego Molteni's avatar
Diego Molteni committed
519
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
520
521
522
523
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
Diego Molteni's avatar
Diego Molteni committed
524
          type: string
Diego Molteni's avatar
Diego Molteni committed
525
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
526
527
528
529
530
        - description: "Ctag to be validated"
          in: query
          name: ctag
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
531
          default: slb-dataset-ctag
Diego Molteni's avatar
Diego Molteni committed
532
533
534
535
536
      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
537
            example: "true"
Diego Molteni's avatar
Diego Molteni committed
538
539
540
541
542
543
544
545
546
547
548
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /api/v3/dataset/tenant/{tenantid}/subproject/{subprojectid}/dataset/{datasetid}/gtags:
    put:
Diego Molteni's avatar
Diego Molteni committed
549
550
      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
551
552
553
554
      operationId: add-tag
      tags:
        - Dataset
      parameters:
555
556
557
558
559
560
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
561
562
563
564
565
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
566
          default: common
Diego Molteni's avatar
Diego Molteni committed
567
568
569
570
571
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
572
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
573
574
575
576
        - description: "Hierarchical path of the dataset"
          in: query
          name: path
          required: true
Diego Molteni's avatar
Diego Molteni committed
577
          type: string
Diego Molteni's avatar
Diego Molteni committed
578
          default: a/b/c
Diego Molteni's avatar
Diego Molteni committed
579
580
581
582
        - description: "Name of the dataset"
          in: path
          name: datasetid
          required: true
Diego Molteni's avatar
Diego Molteni committed
583
          type: string
Diego Molteni's avatar
Diego Molteni committed
584
          default: slb-dataset
Diego Molteni's avatar
Diego Molteni committed
585
586
        - description: "Gtags array list"
          in: query
Diego Molteni's avatar
Diego Molteni committed
587
          name: gtag
Diego Molteni's avatar
Diego Molteni committed
588
589
590
591
592
          required: true
          type: array
          items:
            type: string
            default: "tag1"
Diego Molteni's avatar
Diego Molteni committed
593
          collectionFormat: multi
Diego Molteni's avatar
Diego Molteni committed
594
595
596
597
598
599
600
601
602
603
604
605
606
      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
607
608
609
610
611
612
613
614
  /api/v3/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:
615
616
617
618
619
620
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
        - 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
641
642
643
644

  /api/v3/dataset/tenant/{tenantid}/subproject/{subprojectid}:
    get:
      summary: "Get the list of datasets in a subproject."
Diego Molteni's avatar
Diego Molteni committed
645
      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
646
647
      operationId: dataset-list
      tags:
Diego Molteni's avatar
Diego Molteni committed
648
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
649
      parameters:
650
651
652
653
654
655
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
656
657
658
659
660
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
661
          default: common
Diego Molteni's avatar
Diego Molteni committed
662
663
664
665
666
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
667
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
668
669
670
671
        - description: "Gtags associated with dataset metadata"
          in: query
          name: gtag
          type: array
Diego Molteni's avatar
Diego Molteni committed
672
          items:
Diego Molteni's avatar
Diego Molteni committed
673
            type: string
Diego Molteni's avatar
Diego Molteni committed
674
          collectionFormat: multi
675
676
677
678
679
680
681
682
        - description: 'Limit the number of datasets in the response'
          in: query
          name: limit
          type: string 
        - description: 'Cursor for pagination on the datasets list'
          in: query
          name: cursor
          type: string 
Diego Molteni's avatar
Diego Molteni committed
683
684
685
686
687
688
689
690

      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"
691
692
693
694
695
              
        201:
          description: "Paginated dataset list with nextPageCursor. For documentation purposes, if limit or cursor is given, status code here is 200."
          schema:
            $ref: "#/definitions/PaginatedDatasets"
Diego Molteni's avatar
Diego Molteni committed
696
697
698
699
700
701
702
703
704
705
706
707
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /api/v3/dataset/tenant/{tenantid}/subproject/{subprojectid}/exist:
    post:
      summary: "Check if list of datasets exists in the subproject."
Diego Molteni's avatar
Diego Molteni committed
708
      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
709
710
      operationId: dataset-exist
      tags:
Diego Molteni's avatar
Diego Molteni committed
711
        - Dataset
Diego Molteni's avatar
Diego Molteni committed
712
      parameters:
713
714
715
716
717
718
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
719
720
721
722
723
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
724
          default: common
Diego Molteni's avatar
Diego Molteni committed
725
726
727
728
729
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
730
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
731
732
733
734
735
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
736
            $ref: "#/definitions/DatasetCheckList"
Diego Molteni's avatar
Diego Molteni committed
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
      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"

  /api/v3/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:
762
763
764
765
766
767
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
768
769
770
771
772
        - description: "Name of the tenant"
          in: path
          name: tenantid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
773
          default: common
Diego Molteni's avatar
Diego Molteni committed
774
775
776
777
778
        - description: "Name of the subproject"
          in: path
          name: subprojectid
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
779
          default: carbon
Diego Molteni's avatar
Diego Molteni committed
780
781
782
783
784
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
785
            $ref: "#/definitions/DatasetCheckList"
Diego Molteni's avatar
Diego Molteni committed
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
      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"

  /api/v3/utility/ls:
    get:
      summary: "Retrieve list of datasets and sub-directories inside a seismic store path"
Diego Molteni's avatar
Diego Molteni committed
806
      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
807
808
      operationId: ls
      tags:
Diego Molteni's avatar
Diego Molteni committed
809
        - Utility
Diego Molteni's avatar
Diego Molteni committed
810
      parameters:
811
812
813
814
815
816
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
        - description: "Seismic store path, sd://tenant/sub-project/path"
          in: query
          name: sdpath
          required: true
          type: string
        - 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
841
            $ref: "#/definitions/LsDatasets"
Diego Molteni's avatar
Diego Molteni committed
842
843
844
        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
845
            $ref: "#/definitions/LsPaginatedDatasets"
Diego Molteni's avatar
Diego Molteni committed
846
847
848
849
850
851
852
853
854
855
856
857
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /api/v3/utility/cp:
    post:
      summary: "Copy dataset"
Diego Molteni's avatar
Diego Molteni committed
858
      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
859
860
      operationId: cp
      tags:
Diego Molteni's avatar
Diego Molteni committed
861
        - Utility
Diego Molteni's avatar
Diego Molteni committed
862
      parameters:
863
864
865
866
867
868
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
869
870
871
872
873
        - description: "Seismic store source dataset path"
          in: query
          name: sdpath_from
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
874
          default: sd://common/carbon/a/b/c/slb-dataset
Diego Molteni's avatar
Diego Molteni committed
875
876
877
878
879
        - description: "Seismic store destination dataset path"
          in: query
          name: sdpath_to
          required: true
          type: string
Diego Molteni's avatar
Diego Molteni committed
880
          default: sd://common/carbon/a/b/c/slb-dataset-copy
Diego Molteni's avatar
Diego Molteni committed
881
882
883
884
        - description: "Lock source and destination while copying"
          in: query
          name: lock
          required: false
Diego Molteni's avatar
Diego Molteni committed
885
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
      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"

  /api/v3/utility/gcs-access-token:
    get:
Diego Molteni's avatar
Diego Molteni committed
906
907
      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
908
909
      operationId: gcs-access-token
      tags:
Diego Molteni's avatar
Diego Molteni committed
910
        - Utility
Diego Molteni's avatar
Diego Molteni committed
911
      parameters:
912
913
914
915
916
917
        - description: "The impersonation token context (required only with impersonation token credentials)"
          in: header
          name: impersonation-token-context
          type: string
          required: false
          default: ""      
Diego Molteni's avatar
Diego Molteni committed
918
919
920
921
922
        - description: "Seismic store path in the format sd://tenant/sub-project"
          in: query
          name: sdpath
          type: string
          required: true
Diego Molteni's avatar
Diego Molteni committed
923
          default: sd://common/carbon
Diego Molteni's avatar
Diego Molteni committed
924
925
926
927
        - description: "Readonly access, true(default) or false"
          in: query
          name: readonly
          type: boolean
Diego Molteni's avatar
Diego Molteni committed
928
929
930
931
      responses:
        200:
          description: "The GCS access token"
          schema:
Diego Molteni's avatar
Diego Molteni committed
932
            $ref: "#/definitions/AccessToken"
Diego Molteni's avatar
Diego Molteni committed
933
934
935
936
937
938
939
940
941
942
943
944
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

  /api/v3/imptoken:
    post:
      summary: "Generate impersonation credentials token"
Diego Molteni's avatar
Diego Molteni committed
945
      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>"
Diego Molteni's avatar
Diego Molteni committed
946
947
      operationId: imp-token
      tags:
Diego Molteni's avatar
Diego Molteni committed
948
        - Impersonation Token (Obsolete)
Diego Molteni's avatar
Diego Molteni committed
949
950
951
952
953
954
      parameters:
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
955
            $ref: "#/definitions/ImpTokenRequest"
Diego Molteni's avatar
Diego Molteni committed
956
957
958
959
      responses:
        200:
          description: "Generated a impersonation credentials token successfully"
          schema:
Diego Molteni's avatar
Diego Molteni committed
960
            $ref: "#/definitions/ImpersonationToken"
Diego Molteni's avatar
Diego Molteni committed
961
962
963
964
965
966
967
968
969
970
971
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    put:
      summary: "Refresh an impersonation credential token"
Diego Molteni's avatar
Diego Molteni committed
972
      description: "<ul><li>Refresh an impersonation credential token.</li><li>Required roles: none</li></ul>"
Diego Molteni's avatar
Diego Molteni committed
973
      security:
Diego Molteni's avatar
Diego Molteni committed
974
        - api-key: []
Diego Molteni's avatar
Diego Molteni committed
975
976
      operationId: imp-token-refresh
      tags:
Diego Molteni's avatar
Diego Molteni committed
977
        - Impersonation Token (Obsolete)
Diego Molteni's avatar
Diego Molteni committed
978
979
980
981
982
983
      parameters:
        - description: "Request body"
          in: body
          name: request body
          required: true
          schema:
Diego Molteni's avatar
Diego Molteni committed
984
            $ref: "#/definitions/RefreshTokenRequest"
Diego Molteni's avatar
Diego Molteni committed
985
986
987
988
      responses:
        200:
          description: "Refreshed impersonation credential token successfully"
          schema:
Diego Molteni's avatar
Diego Molteni committed
989
            $ref: "#/definitions/ImpersonationToken"
Diego Molteni's avatar
Diego Molteni committed
990
991
992
993
994
995
996
997
998
999
1000
        400:
          description: "Bad request"
        401:
          description: "Unauthorized"
        403:
          description: "Forbidden"
        404:
          description: "Not found"

    patch:
      summary: "Patch an impersonation credential token's refresh url and generate a new impersonation token"
For faster browsing, not all history is shown. View entire blame