Elements runtime reference / Request artifacts

listFiles

List request-scoped Element artifact files.

Signatuur

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

Doel

List request-scoped Element artifact files.

Aliases and imports

  • list_files
  • files.list
  • files.list_files

Payloadformaat

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

{
  "prefix": "exports",
  "maxResults": 50,
  "withMetadata": true
}
FieldDescription
prefixOptional relative artifact prefix.
bucketOptional worker-controlled artifact bucket override.
maxResultsOptional list cap bounded by the worker.
withMetadataWhen true, return the full envelope with prefix and file list.

Return payload

{
  "bucket": "dashview-cache",
  "prefix": "data-worker-agent/files/tenant/request/exports/",
  "files": [
    {
      "path": "exports/preview.json",
      "contentType": "application/json",
      "size": 31
    }
  ]
}

Voorbeeld

def run():
    artifacts = files.list("exports")
    return {"count": len(artifacts), "files": artifacts}

Scope-notities