TofuPilotTofuPilot
API Reference (v2)Procedures

List and filter procedures

Retrieve procedures with optional filtering and search. Returns procedure data including creator and linked repository.

Access

API KeyAccess LevelDescription
UserFullUsers can read procedures
StationLimitedStations cannot read procedures

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.

Default50
Range1 <= 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.

Lengthlength <= 100
created_after?string

Only return procedures created after this timestamp (ISO 8601).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-time
created_before?string

Only return procedures created before this timestamp (ISO 8601).

Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Formatdate-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"
      },
      "linkedRepository": {
        "id": "550e8400-e29b-41d4-a716-446655440004",
        "name": "my-repo",
        "fullName": "org/my-repo",
        "provider": "github"
      }
    }
  ],
  "meta": {
    "has_more": true,
    "next_cursor": 100
  }
}
{
  "message": "Bad request",
  "code": "BAD_REQUEST",
  "issues": []
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?