Make your first API request
In this lesson you will create an API token and use it to read data from your Drum account: first the list of projects, then one project with its deliverables and tasks.
You need a Drum account with at least one project, and a terminal with curl. It takes about 10 minutes.
Create a token
- In Drum, open your user menu and select Profile.
- Select API, then Create an API Token.
- Name the token “First API request” and select your account.
- Select Generate New API Token.
- Select the copy button next to the token.
If you cannot see API, ask an account admin to give your role the api_read permission.
Save the token in your terminal
Paste the token into this command in place of YOUR_API_TOKEN, and run it:
export DRUM_API_TOKEN="YOUR_API_TOKEN"
The commands below read the token from DRUM_API_TOKEN, so it stays out of each command you type.
List your projects
Run:
curl -s -H "Authorization: Bearer $DRUM_API_TOKEN" \
"https://app.getdrum.com/api/v1/projects?items=5"
You should see a JSON array of up to five projects:
[
{
"id": 20488,
"name": "Riverside fit-out",
"project_number": "2026-088",
"project_type": "project",
"project_status": {"id": 410, "name": "In Progress", "complete_status": false},
"planned": false
}
]
Your projects will have different names, numbers and fields. Pick one and note its id.
If you see nothing at all, the token was not accepted. Run the export command again with the token copied fresh from Drum.
Read one project
Replace 20488 with the id you noted, and run:
curl -s -H "Authorization: Bearer $DRUM_API_TOKEN" \
https://app.getdrum.com/api/v1/projects/20488
This time you get one project, with more detail. Look for the deliverables array. Each deliverable has a tasks array:
"deliverables": [
{
"id": 7301,
"name": "Design",
"tasks": [
{"id": 88121, "name": "Site inspection", "status": "in_progress"}
]
}
]
Each task id is what you send as task_id when you log time or record a cost through the API.
Read the time on the project
Run, with your project’s id:
curl -s -H "Authorization: Bearer $DRUM_API_TOKEN" \
"https://app.getdrum.com/api/v1/projects/20488/tracked_times?items=5"
You should see the latest time entries on the project, newest first. duration is in minutes, and duration_hours is the same value in hours. An empty array [] means nobody has logged time on the project yet.
Clean up
You have read projects, tasks and time from Drum with an API token.
This token was for practice, so revoke it: in Drum, open Profile, then API, select “First API request”, and select Revoke Token.
Next
- Create an API token for a real integration, with its own user.
- How the Drum API works explains accounts, permissions and the shape of the data.
- The API reference lists every endpoint.