v2 Reference (Preview)/Procedures
List and filter procedures
Retrieve procedures with optional filtering and search. Returns all procedure data including creator, recent runs, and FPY (First Pass Yield) statistics.
API v2 Preview
The TofuPilot API v2.0 is currently in public preview and is subject to change as we stabilize until release (planned for Aug 2025).
Access
API Key | Access Level | Description |
---|---|---|
User | Full | Users can list procedures they have permission to access |
Station | Limited | Stations can list procedures they are linked to |
Endpoint
GET
/v2/procedures
AuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Query Parameters
limit?integer
Maximum number of procedures to return per page.
Default
50
Range
1 <= value <= 100
cursor?number
Offset position for pagination. Use the next_cursor from the previous response to get the next page.
search_query?string
Search text to filter procedures by ID (6+ characters) or name.
Length
length <= 100
created_after?string
Only return procedures created after this timestamp (ISO 8601).
Format
date-time
created_before?string
Only return procedures created before this timestamp (ISO 8601).
Format
date-time
Response Body
from tofupilot.v2 import TofuPilot
from datetime import datetime, timedelta, timezone
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.procedures.list(
limit=20,
cursor=50,
search_query="battery test",
created_after=datetime.fromisoformat("2024-01-01T00:00:00.000Z"),
created_before=datetime.fromisoformat("2024-12-31T23:59:59.999Z")
)
# Handle response
print(result)
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Battery Test Procedure",
"created_at": "2024-01-15T10:30:00.000Z",
"created_by_user": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "John Doe",
"email": "john.doe@company.com"
},
"runs": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"outcome": "PASS",
"started_at": "2024-01-15T14:30:00.000Z",
"unit": {
"id": "550e8400-e29b-41d4-a716-446655440003"
}
}
],
"fpy": 85.5
}
],
"meta": {
"has_more": true,
"next_cursor": 100
}
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}
How is this guide?