API Reference (v2)Stations
Create station
Create a new test station in TofuPilot to register production equipment and link it to test procedures.
Access
| API Key | Access Level | Description |
|---|---|---|
| User | Full | Users can create stations |
| Station | Unauthorized | Stations cannot create stations |
Endpoint
POST
/v2/stationsAuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
namestring
Name of the station
Length
1 <= length <= 60procedure_id?string
Optional procedure ID to link the station to
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidResponse Body
from tofupilot.v2 import TofuPilot
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.stations.create(
name="Assembly Station 1"
)
# Handle response
print(result){
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "Unauthorized",
"code": "UNAUTHORIZED",
"issues": []
}{
"message": "Forbidden",
"code": "FORBIDDEN",
"issues": []
}{
"message": "Conflict",
"code": "CONFLICT",
"issues": []
}{
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"issues": []
}How is this guide?