Last updated

Subprojects

A subproject is the main working unit in seismic store. A subproject has an isolated access scope inside a tenant resource. Authorizations and user data access are regulated at this level.

Create a new subproject

  • Required Role: users.datalake.admin
  • Description: register a new subproject resource in seismic store
  • Notes: when a new subproject is created a new storage resource in the cloud is reserved ( for example a GCS bucket for google cloud provider )
  • Param.body.admin: the email of the user to set as admin in the subproject (user must be registered in the data partition). The role of subproject.admin will be assigned to the user.
  • Param.body.storage_class: the associated bucket storage class (google)
  • Param.body.storage_location: the associated bucket storage class (google)
  • Param.header.ltag: the default subproject legal tag (applied by default subproject datasets). Refer to the compliance service tutorial to learn how to create a manage legal Tags.
# seistore subproject API call
curl -s -X POST \"https://HOST/seistore-svc/api/v3/subproject/tenant/TENANT_NAME/subproject/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Content-Type: application/json\" \\
    -H \"Authorization: Bearer STOKEN\" \\
    -H \"ltag: LEGAL_TAG\" \\
    -d \" { \\\"admin\\\": \\\"SUBPROJECT_USER_ADMIN\\\", \\\"storage_class\\\": \\\"STORAGE_CLASS\\\", \\\"storage_location\\\": \\\"STORAGE_LOCATION\\\" } \"

# API response 
{
  \"name\": \"tutorial\",
  \"tenant\": \"company\",
  \"admin\": \"testUserSeistoreAdmin@company.com\",
  \"storage_class\": \"MULTI_REGIONAL\",
  \"storage_location\": \"US\",
  \"ltag\": \"company-public-usa-seistore-1\",
  \"gcs_bucket\": \"ss-p4d-0bgo83wqmh3ggoev\"
}

Retrieve stat information for a subproject

  • Required Role: subproject.admin
  • Description: retrieve meta-information for a tenant project
# seistore subproject API call
curl -s -X GET \"https://HOST/seistore-svc/api/v3/subproject/tenant/TENANT_NAME/subproject/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Authorization: Bearer STOKEN\" 

# API response 
{
  \"name\": \"tutorial\",
  \"tenant\": \"company\",
  \"admin\": \"testUserSeistoreAdmin@company.com\",
  \"storage_class\": \"MULTI_REGIONAL\",
  \"storage_location\": \"US\",
  \"ltag\": \"company-public-usa-seistore-1\",
  \"gcs_bucket\": \"ss-p4d-0bgo83wqmh3ggoev\"
}

List subprojects in a tenant

  • Required Role: users.datalake.admin
  • Description: retrieve the list of subprojects hosted in a tenant.
  • Notes: this endpoint is provided for diagnostic purposes only, refer to the most generic /utility/ls.
# seistore subproject API call
curl -s -X GET \"https://HOST/seistore-svc/api/v3/subproject/tenant/TENANT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Authorization: Bearer STOKEN\"


# API response 
[
  {
    \"name\": \"tutorial\",
    \"tenant\": \"company\",
    \"admin\": \"testUserSeistoreAdmin@company.com\",
    \"storage_class\": \"MULTI_REGIONAL\",
    \"storage_location\": \"US\",
    \"ltag\": \"company-public-usa-seistore-1\",
    \"gcs_bucket\": \"ss-p4d-0bgo83wqmh3ggoev\"
  }
]

Update subproject meta-information (legalTag)

  • Required Role: subproject.admin
  • Description: replace the default subproject legal tag (for example you are required to replace an expired legal tag)
  • Param.query.recursive: if true, the update will be propagated to all datasets with the same initial legal tag information (initial = before being patched)
# seistore subproject API call
curl -s -X PATCH \"https://HOST/seistore-svc/api/v3/subproject/tenant/TENANT_NAME/subproject/SUBPROJECT_NAME\" \\
    -H  \"accept: application/json\" \\
    -H \"Authorization: Bearer STOKEN\" \\
    -H \"ltag: LEGAL_TAG\"

# API response 
]
  \"name\": \"tutorial\",
  \"tenant\": \"company\",
  \"admin\": \"testUserSeistoreAdmin@company.com\",
  \"storage_class\": \"MULTI_REGIONAL\",
  \"storage_location\": \"US\",
  \"ltag\": \"company-public-usa-seistore-1\",
  \"gcs_bucket\": \"ss-p4d-0bgo83wqmh3ggoev\"
}

Delete a subproject

  • Required Role: subproject.admin
  • Description: delete a subproject and all contained datasets.
  • Notes: This is a "hard-delete" operation and cannot be reversed. It will ignore locked datasets (these will be deleted also if locked)
# seistore subproject API call
curl -X DELETE \"https://HOST/seistore-svc/api/v3/subproject/tenant/TENANT_NAME/subproject/SUBPROJECT_NAME\" \\
    -H \"accept: application/json\" \\
    -H \"Authorization: Bearer STOKEN\" 

# this api returns an empty response