Elements runtime reference / Tenant GCS files

listGcsFiles

List tenant-scoped GCS files under the current tenant folder.

Signatuur

listGcsFiles(prefix=None, bucket=None, maxResults=None, withMetadata=False)

Doel

List tenant-scoped GCS files under the current tenant folder.

Aliases and imports

  • list_gcs_files
  • gcs.list
  • gcs.list_files

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "prefix": "exports",
  "maxResults": 100,
  "withMetadata": true
}
FieldDescription
prefixOptional relative prefix under filestore/{tenantId}/, or a filestore-prefixed/gs:// prefix.
bucketOptional bucket override; must match the configured file artifact/output bucket.
maxResultsOptional list cap bounded by the worker.
withMetadataWhen true, return the full envelope with bucket/prefix/files.

Return payload

{
  "bucket": "dashview-cache",
  "prefix": "filestore/tenant/exports/",
  "tenantPrefix": "filestore/tenant/",
  "files": [
    {
      "relativePath": "exports/report.json",
      "contentType": "application/json",
      "size": 18
    }
  ]
}

Voorbeeld

def run():
    files = gcs.list("exports")
    return {"files": files}

Scope-notities