When a device moves between athletes or rooms, you don’t want last month’s data to mix with this month’s. The 1st API ties each block of usage to an assignment, and you can ask for just the readings from one block viaDocumentation Index
Fetch the complete documentation index at: https://dev.1st.app/llms.txt
Use this file to discover all available pages before exploring further.
?assignment_id=.
The shape of an assignment
An assignment is one continuous block of “this device was tracking this athlete (or this room) from this date to that date.” It has:assignment_id— the ID you’ll pass on the readings endpointtype—athleteorplacelabel— the player’s name or the room’s namehome_or_travel— where the device was set up during the blockstarted_at— when the block beganended_at— when the block closed, ornullif it’s still open
active_assignment field of GET /v1/devices/{id}. Past
assignments are listed on GET /v1/devices/{id}/assignments,
newest-first.
The hero query
You want last month’s CO2 readings for L. Marchetti’s pre-season recovery block, even though the device has since moved to a room.Step 1: get the assignment_id
Step 2: pull the readings, scoped
Pass theassignment_id to the readings endpoint. The time window
defaults to the assignment’s [started_at, ended_at), so you don’t
have to compute timestamps yourself:
When you’d combine it with a date range
Sometimes you only want a slice of a block, say the last 7 days the athlete had the device. Pass both:When you’d skip the assignment_id
For “show me the latest from every device on the team,” you don’t need assignments at all.GET /v1/devices/current and the plain
?last=24h queries cover that. Reach for ?assignment_id= when
the question is about a specific block of usage in the past.
AI prompt template
Paste this into Claude or ChatGPT and fill in the brackets:assignment_id, then pull the readings.
Errors you might hit
assignment_not_found— the ID isn’t on the device you asked about (or isn’t visible to your team). List the device’s assignments to get a valid one. More.validation_failedwithparam: assignment_id— the value isn’t a UUID. The shape is00000000-0000-0000-0000-000000000000.cursor_device_mismatch— your?cursor=...was issued for a different device. Drop the cursor when you switch devices. More.