- Home
- Developers
- Rooms and rundowns
API guide
Build a two-cue rehearsal
An event is the container, a rundown is the plan and a room is where that plan plays. Create them in that order so each request can use the ID returned by the previous one.
ON THIS PAGE
Before you create anything
Use a rehearsal team with capacity for a new room and a team-wide manage key. Set API and RUNOFSHO_KEY as in the quickstart, using the manage key instead of the read key. These requests create persistent resources; running the script again creates another rehearsal.
Create the plan and load it into a room
Run the following as a Bash script with cURL and jq. It stops on the first failed request. Keep the printed IDs if you need to resume partway through.
set -euo pipefail
: "${API:?Set API to https://api.runofsho.com/v1}" "${RUNOFSHO_KEY:?Set a manage key}"
post() {
curl -sS --fail-with-body "$API/$1" \
-H "Authorization: Bearer $RUNOFSHO_KEY" \
-H 'Content-Type: application/json' --data "$2"
}
EVENT=$(post events '{"name":"Technical rehearsal"}' | jq -er '.data.id')
echo "Event: $EVENT"
RD=$(post "events/$EVENT/rundowns" '{"name":"Main stage"}' | jq -er '.data.id')
echo "Rundown: $RD"
post "rundowns/$RD/items" '{"name":"Welcome","duration":"90s"}' | jq -e '.data.id'
post "rundowns/$RD/items" '{"name":"Keynote","duration":"20m"}' | jq -e '.data.id'
ROOM=$(post rooms "$(jq -n --arg rd "$RD" \
'{name:"Rehearsal stage",active_rundown_id:$rd}')" | jq -er '.data.id')
echo "Room: $ROOM"
Verify the handoff
Read GET /v1/rundowns/{rundownId}/items to check that Welcome precedes Keynote. Then use GET /v1/rooms/{roomId}/state and compare data.room.active_rundown_id with the printed rundown ID. The script does not send a playback start command.
Use the room ID, not the event or rundown ID, for the playback example. If you are importing from a scheduling system, assign an external_id to each item so your integration can identify a cue even after someone changes its position.
Endpoint reference
- Create an event:
POST /v1/events(createEvent). - Create a rundown:
POST /v1/events/{eventId}/rundowns(createRundown). - Add an item:
POST /v1/rundowns/{rundownId}/items(createItem). - List a rundown's items in order:
GET /v1/rundowns/{rundownId}/items(listItems). - Create a room:
POST /v1/rooms(createRoom). - Get everything a display needs:
GET /v1/rooms/{roomId}/state(getRoomState).