5 of 7 · Integration reliability
Files, artifacts, and errors
Retrieve protected outputs correctly and handle endpoint-specific errors without unsafe assumptions.
Retrieve an artifact#
- Read the parent resource
Obtain the artifact identifier or authenticated result path from the dataset, task result, model version, deployment usage, or report response.
- Preserve authentication
Fetch protected files from the trusted server. Do not place a raw API key in an image URL rendered by browser clients.
- Inspect the content type
JSON metadata, markdown, server-sent event streams, and binary media have different handling requirements.
- Store deliberately
Use a safe filename, validate expected media type, and apply the organization retention policy.
Handle failures by endpoint#
- Use the response status and body from the specific endpoint instead of assuming one global error envelope.
- Retry only transient failures and apply bounded backoff.
- Do not retry validation, permission, quota, or state-conflict errors until their cause changes.
- After a WebSocket reconnect, refetch durable REST state because missed events are not replayed.