Stage Metadata#
Listing Stages#
- POST https://api.materialized.dev/list-stages#
List all stages.
- Request Headers:
Authorization – Your Materialized API key.
- Returns:
A JSON object containing a list of stages.
Example
import requests
import json
url = "https://api.materialized.dev/list-stages"
headers = {
"Authorization": "Key YOUR_API_KEY"
}
response = requests.post(url, headers=headers)
print(response.json())
Listing Files in a Stage#
- POST https://api.materialized.dev/list-stage-files#
List all files in a stage.
- Request Headers:
Authorization – Your Materialized API key.
- Request JSON Object:
stage_id (str) – The ID of the stage to list the files in.
- Returns:
A JSON object containing a list of files in the stage, in the order they were uploaded.
Example
import requests
import json
url = "https://api.materialized.dev/list-stage-files"
headers = {
"Authorization": "Key YOUR_API_KEY"
}
payload = {
"stage_id": "YOUR_STAGE_ID"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
files = response.json()['files']
for file in files:
print(file)