Tools Space
Tools-Space API
The tools-space domain in the Aimable Platform API (v0.1.0) enables developers to interact with tools associated with a specific space—a logical container for organizing resources, users, and functionality. This API allows you to list available tools within a space and execute them dynamically by passing arguments. It's ideal for building automation workflows, integrations, or UIs that need to trigger space-specific actions like data exports, report generation, or system syncs.
Key Concepts
- Space: A scoped environment identified by a unique
space_id(UUID). Tools are bound to a space and inherit its context and permissions. - Tool: A predefined function or action (e.g.,
export_data,sync_users) that can be executed within a space. Each tool has atool_nameand accepts structured arguments. - Execution: Tools are invoked via POST requests with a JSON payload containing input parameters. The response depends on the tool’s implementation.
Authentication is required for all operations using a Bearer token in the Authorization header. Some endpoints may also accept an optional X-API-Key header for legacy or service-level access.
List Available Tools in a Space
Use this endpoint to discover which tools are available in a given space.
Request
curl -X GET 'https://api.aimable.com/api/v1/spaces/550e8400-e29b-41d4-a716-446655440000/tools' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'X-API-Key: optional-key-if-required'Response (200 OK)
[
{
"tool_name": "export_data",
"description": "Export space data in CSV or JSON format",
"arguments_schema": {
"format": { "type": "string", "enum": ["csv", "json"] },
"include_metadata": { "type": "boolean" }
}
},
{
"tool_name": "sync_users",
"description": "Sync user list with external identity provider",
"arguments_schema": {
"provider": { "type": "string" },
"force_update": { "type": "boolean" }
}
}
]Execute a Tool in a Space
Run a specific tool by name and pass required arguments in the request body.
Request
curl -X POST 'https://api.aimable.com/api/v1/spaces/550e8400-e29b-41d4-a716-446655440000/tools/export_data/execute' \
-H 'Authorization: Bearer <your-access-token>' \
-H 'Content-Type: application/json' \
-d '{
"arguments": {
"format": "csv",
"include_metadata": true
}
}'Response (200 OK)
{
"result": "success",
"output_url": "https://data.aimable.com/downloads/export-abc123.csv",
"message": "Data export completed successfully."
}If the request is malformed or validation fails, a 422 error is returned:
{
"detail": [
{
"loc": ["body", "arguments", "format"],
"msg": "Input should be 'csv' or 'json'",
"type": "value_error.enum",
"input": "xml"
}
]
}Common Workflow: Export and Sync Data
Here’s a typical sequence a developer might use:
- List tools to confirm
export_dataandsync_usersare available. - Execute
sync_usersbefore export to ensure data is up to date:
curl -X POST '/api/v1/spaces/550e8400-e29b-41d4-a716-446655440000/tools/sync_users/execute' \
-H 'Authorization: Bearer <token>' \
-d '{"arguments": {"provider": "okta", "force_update": false}}'- Once sync completes, trigger
export_data:
curl -X POST '/api/v1/spaces/550e8400-e29b-41d4-a716-446655440000/tools/export_data/execute' \
-H 'Authorization: Bearer <token>' \
-d '{"arguments": {"format": "json", "include_metadata": true}}'- Process the returned
output_urlto download or forward the exported data.
See Authentication & errors for request authentication and the standard error responses.
By combining discovery and execution, the tools-space API gives you dynamic control over space-level operations—making it easy to automate, integrate, and extend functionality across your Aimable Platform spaces.
Related Endpoints
- GET
/v1/spaces/{space_id}/tools— List Space Tools - POST
/v1/spaces/{space_id}/tools/{tool_name}/execute— Execute Space Tool