Last updated

Utilities

A set of utilities to enable extra operations in seismic store.

Generate a cloud storage access token

  • Required Role: subproject.admin, subproject.viewer
  • Description: generate a cloud storage access token that can be used to upload/download physical objects that compose a dataset to/from a storage location
  • Param.query.sdpath: the seismic store subproject path.
  • Param.query.readonly (optional): require a readonly(true, default) or readwrite(false) access token
# seistore app API call

curl -s -X GET \"https://HOST/seistore-svc/api/v3/utility/gcs-access-token?sdpath=sd://TENANT_NAME/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Content-Type: application/json\" \\
    -H \"Authorization: Bearer STOKEN\"

# this api returns an empty response

{
  \"access_token\": \"ya29.fgdgsdngevrjbinb0ednberoibnerbnerber...........fdsfwefwe_cece\",
  \"token_type\": \"Bearer\",
  \"expires_in\": 3600
}

Copy a dataset in seismic store

  • Required Role: subproject.admin
  • Description: copy a dataset in seismic store.
  • Notes: The copy destination can be set in a different subproject (within the same tenant)
  • Param.query.sdpath_from: the seismic store source dataset path.
  • Param.query.sdpath_to: the seismic store destination dataset path.
  • Param.query.lock(optional): lock source and destination while copying.
# seistore app API call

curl -s -X POST \"https://HOST/seistore-svc/api/v3/utility/cp?sdpath_from=sd://TENANT_NAME/SUBPROJECT_NAME/DATASET_PATH/DATASET_NAME&sdpath_to=sd://TENANT_NAME/SUBPROJECT_NAME/DATASET_PATH/DATASET_NAME_copy\" \\
    -H \"accept: application/json\" \\
    -H \"Authorization: Bearer STOKEN\"

# API response 

{
  \"subproject\": \"tutorial\",
  \"gcsurl\": \"ss-p4d-eoldihs4vk7oo1yo/kmD6lvCCxBTDc3Ht\",
  \"path\": \"/data/\",
  \"last_modified_date\": \"Mon Jun 22 2020 13:15:21 GMT+0000 (Coordinated Universal Time)\",
  \"created_date\": \"Mon Jun 22 2020 13:15:21 GMT+0000 (Coordinated Universal Time)\",
  \"tenant\": \"company\",
  \"name\": \"testdata.txt_copy\",
  \"ltag\": \"company-public-usa-seistore-1\",
  \"created_by\": \"testUserSeistoreViewer@company.com\",
  \"ctag\": \"0000000000000000p4d-ddl-eu-company\"
}

Generate the upload connection credentials string

  • Required Role: subproject.admin, subproject.viewer
  • Description: Generate the upload connection credential string for a subproject collection or a dataset, depending of the applied access policy (uniform/dataset).
  • Notes: These credentials can be used via CSP SDK, on client side, to perform bulk upload. The endpoint response is CSP (Cloud Solution Provider) dependent.
  • Param.query.sdpath: the seismic store source dataset path.
# seistore app API call

curl -s -X GET \"https://HOST/seistore-svc/api/v3/utility/upload-connection-string?sdpath=sd://TENANT_NAME/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Content-Type: application/json\" \\
    -H \"Authorization: Bearer STOKEN\"

# API response

{
  \"access_token\": \"TOKEN\"
  \"expires_in\": \"TIME_IN_MINUTES\"
  \"token_type\": \"TOKEN_TYPE\"
}

Generate the download connection credentials string

  • Required Role: subproject.admin, subproject.viewer
  • Description: Generate the download connection credential string for a subproject collection or a dataset, depending of the applied access policy (uniform/dataset)
  • Notes: These credentials can be used via CSP SDK, on client side, to perform bulk download. The endpoint response is CSP (Cloud Solution Provider) dependent.
  • Param.query.sdpath: the seismic store source dataset path.
# seistore app API call

curl -s -X GET \"https://HOST/seistore-svc/api/v3/utility/download-connection-string?sdpath=sd://TENANT_NAME/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Content-Type: application/json\" \\
    -H \"Authorization: Bearer STOKEN\" \\
    -H \"appkey: APP_KEY\"

# API response

{
  \"access_token\": \"TOKEN\"
  \"expires_in\": \"TIME_IN_MINUTES\"
  \"token_type\": \"TOKEN_TYPE\"
}

List contents in a seismic store

  • Required Role: subproject.admin, subproject.viewer
  • Description: list tenants, subprojects, and datasets registered in seismic store
  • Param.query.wmode(optional): the endpoint working mode, dirs return directories only, datasets return datasets only and not-specified(default) return both
  • Param.query.limit(optional): maximum number of items to return
  • Param.query.cursor: the execution cursor returned from the previous call (for the list next items)
# seistore app API call

curl -s -X GET \"https://HOST/seistore-svc/api/v3/utility/ls?sdpath=sd://TENANT_NAME/SUBPROJECT_NAME&wmode=dirs\" \\
    -H \"accept: application/json\" \\
    -H \"Content-Type: application/json\" \\
    -H \"Authorization: Bearer STOKEN\"

# API response 

{
  \"dirs\": [
    \"data/\"
  ]
}