Get Tasks by Space Token
Spaces
Get Tasks by Space Token
Retrieve all tasks within a specific space using its token
GET
Get Tasks by Space Token
Documentation Index
Fetch the complete documentation index at: https://docs.unpod.dev/llms.txt
Use this file to discover all available pages before exploring further.
Get Tasks by Space Token
Fetch all tasks for a specific space using the space token. Supports pagination withpage and page_size query parameters for efficient data retrieval.
Prerequisites: Make sure you have your API Token ready. See Authentication for details.
Get Tasks by Space Token
Retrieve all tasks associated with a specific space, with optional pagination.Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| space_token | string | Yes | Public token identifying the workspace |
You can get the
space_token by hitting the Get All Spaces API. The token field in the response is your Space Token.Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number for pagination (default = 1) |
| page_size | integer | No | Number of tasks per page (default = 20) |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Content-Type | string | Yes | application/json |
Response Fields
| Field | Type | Description |
|---|---|---|
| count | integer | Total number of tasks |
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of task objects |
Task Object Fields
| Field | Type | Description |
|---|---|---|
| _id | string | Internal task document ID |
| thread_id | string | Thread identifier |
| user_info | object | User details (email, full_name) |
| task_id | string | Unique task identifier |
| run_id | string | Parent run identifier |
| task | object | Task definition with objective |
| input | object | Input data for the task |
| output | object | Task output with call details |
| assignee | string | Agent handle assigned to the task |
| status | string | Task status: pending, completed, failed |
| execution_type | string | Type of execution: call, email, etc. |
| run_mode | string | Execution mode: dev, prod, etc. |
| created | string | Task creation timestamp |
| modified | string | Last modified timestamp |
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Data fetched successfully |
| 206 | Partial Content - Business logic error occurred |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 404 | Not Found - Space not found |
| 500 | Internal Server Error - Server-side error |
Code Examples
Best Practices
- Pagination: Use
pageandpage_sizeparameters for efficient data retrieval in large datasets - Space Token: Ensure you are using a valid space token from your organization
- Error Handling: Always handle potential errors and edge cases
- Status Filtering: Filter tasks by status in your application logic to focus on relevant tasks
- Security: Keep API tokens secure and rotate them regularly
Authorizations
Format: Token
Headers
Organization domain handle
Example:
"unpod.tv"
Path Parameters
Example:
"8KZAMRAHSXXXXXXMAYNASMJC"
Response
List of tasks in the space