v2 Reference (Preview)/Parts/Revisions
Get part revision
Retrieve a single part revision by its number for a specific part.
GET
/v2/parts/{part_number}/revisions/{revision_number}
AuthorizationBearer <token>
API key for authentication. Use format: Bearer YOUR_API_KEY
In: header
Path Parameters
part_numberstring
Part number that the revision belongs to.
Length
1 <= length <= 60
revision_numberstring
Revision number to retrieve.
Length
1 <= length <= 60
Response Body
from tofupilot.v2 import TofuPilot
# Initialize the TofuPilot client
client = TofuPilot()
# Execute the operation
result = client.parts.revisions.get(
part_number="PCB-V2.0",
revision_number="REV-A"
)
# Handle response
print(result)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"number": "REV-A",
"created_at": "2024-01-15T10:30:00Z",
"created_by_user": {
"name": "John Doe",
"image": "https://example.com/avatar.jpg"
},
"created_by_station": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"name": "Assembly Station 1",
"image": "https://example.com/station.jpg"
},
"part": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"number": "PCB-001",
"name": "Main PCB Board"
},
"image": "https://example.com/revision-image.jpg",
"units": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"serial_number": "UNIT-001"
}
]
}
{
"code": "NOT_FOUND",
"message": "Procedure not found: {id}",
"issues": []
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}
How is this guide?
Create part revision POST
Create a new part revision for an existing part. Revision numbers are matched case-insensitively (e.g., "REV-A" and "rev-a" are considered the same).
Update part revision PATCH
Update part revision number and/or image. The part number and current revision number are specified in the URL path. Revision numbers are matched case-insensitively (e.g., "REV-A" and "rev-a" are considered the same).