TofuPilotTofuPilot
API Reference (v2)PartsRevisions

Get part revision

Retrieve a single part revision by its part number and revision number, including revision metadata, configuration details, and linked units.

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.

revision_numberstring

Revision number to retrieve.

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.parts.revisions.get(
    part_number="string",
    revision_number="string"
)

# Handle response
print(result)
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "number": "REV-A",
  "created_at": "2024-01-15T10:30:00Z",
  "created_by_user": {
    "id": "550e8400-e29b-41d4-a716-446655440003",
    "name": "John Doe"
  },
  "created_by_station": {
    "id": "550e8400-e29b-41d4-a716-446655440004",
    "name": "Assembly Station 1"
  },
  "part": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "number": "PCB-001",
    "name": "Main PCB Board"
  },
  "units": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "serial_number": "UNIT-001"
    }
  ]
}
{
  "message": "Unauthorized",
  "code": "UNAUTHORIZED",
  "issues": []
}
{
  "message": "Not found",
  "code": "NOT_FOUND",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?