Equipment

Model

class pytm4srv.models.Equipment

Represents a piece of non-machine equipment or a subsystem present on a machine.

description: Mapped[str]

User-specified, persistent description/notes about the equipment.

id: MappedColumn object at 0x7e2fe7159d80>]]

Unique, numeric ID for the equipment in OnTakt.

machine_id: Mapped[int | None]

The ID of the machine this equipment (subsystem) belongs to, or NULL if it is standalone.

name: Mapped[str]

User-specified name for the equipment.

Endpoints

GET /api/equipment/

Get all currently registered pieces of equipment.

Query Parameters:
  • machine (int) – specify to get equipment (subsystems) belonging to a single machine. Set to 0 to get only standalone equipment (does not belong to a machine).

Returns:

an object mapping equipment ID to Equipment object

GET /api/equipment/(int: equipment_id)

Get details about a single piece of equipment.

Parameters:
  • equipment_id – the ID of the equipment

Status Codes:
Returns:

an Equipment object

PUT /api/equipment/

Create a new piece of equipment. Any Equipment object fields can be provided, but the name field is required.

Request JSON Object:
  • name (str) – the name for the new equipment

Status Codes:
Returns:

the new Equipment object

PATCH /api/equipment/(int: equipment_id)

Edit a piece of equipment.

Parameters:
  • equipment_id – the ID of the Equipment object to modify

Status Codes:
Returns:

the modified Equipment object

DELETE /api/equipment/(int: equipment_id)

Delete a piece of equipment.

Parameters:
  • equipment_id – the ID of the Equipment object to delete

Status Codes: