API Playground
The API Playground is a workspace-scoped test harness for Slab5 API calls. It is meant for verification before wiring a real client or agent into Slab5.
Purpose
Use the playground to test the API surface exposed to workspace API keys:
- Select a category and endpoint.
- Inspect the required scopes for the selected operation.
- Fill path variables such as
:asset_id. - Send requests through the active environment's API route.
- Reuse IDs returned from create calls in follow-up requests.
- Test asset storage upload, completion, and download flows.
The playground uses the active workspace context from the control plane. It still requires a workspace API key so the request exercises the same authentication, scope, module, audit, usage, and billing checks as an external API client.
Authentication
Create a workspace API key from API Keys, choose the smallest scope set needed for the test, and paste the key into the playground's workspace API key field.
The key is used only for playground requests in the current browser session. Do not paste production keys into screenshots, issue comments, docs examples, or support tickets.
Endpoint testing
Pick a category, then select an endpoint. The playground loads the method, path, request body template, required scopes, and any path-variable fields.
For create operations, a successful response can populate the returned data.id into the matching follow-up field. For example, creating an asset can populate asset_id for the complete, get, or archive calls.
If a request fails, use the response request_id and structured error code to inspect audit, usage, logs, and troubleshooting docs.
Asset storage upload
For Assets, the playground includes a Storage upload panel:
- Select Assets.
- Create an asset upload intent with
POST /v1/assets. - Confirm the response includes
upload_url,upload_method,upload_headers, andupload_expires_at. - Select a local file in Storage upload, or use the text body for a tiny test object.
- Click PUT to upload bytes directly to the returned signed URL.
- Call
POST /v1/assets/:asset_id/completeto mark the assetavailable. - Call
GET /v1/assets/:asset_idand open the returneddownload_url.
When a file is selected, the playground uses the file bytes for the upload, fills the content type from the file when available, and uses the file size and MIME type when preparing the complete call.
