getTimeRecords for a date window, narrow the results with a typed filter, select the fields you need, and read the returned durations — which Beebole expresses in milliseconds.
This is a read-only workflow.
getTimeRecords never modifies data. To create or edit entries, see Log time entries programmatically.What this example does
It fetches every worked time record for one person across a calendar month, returning each record’s duration, day, billable flag, and the related person and projects. The result is the raw data you would feed into a report, an invoice, or a data warehouse. The query uses three pieces of the API:- The
startTimeandendTimetop-level arguments to bound the period (Unix timestamps in milliseconds). - The
time: trueargument to return only worked time, excluding absence entries. - The
filterargument — a list of typed input objects — to restrict results to one person.
Step 1 — Send the request with your API key
Every request is aPOST to https://app.beebole.com/graphql with your key in the apikey HTTP header. Here is the full call with curl:
1717200000000 is June 1 at 00:00 UTC and 1719791999999 is the last millisecond of June 30.
Step 2 — The query
The same operation written as a standalone GraphQL document:filter array sets a single matching field. To combine conditions — for example, one person on a specific project — chain them with a following value of AND or OR:
The Beebole query API has no pagination — there are no
limit, offset, or cursor arguments. getTimeRecords returns every record matching its arguments. Size the result first with countTimeRecords, which takes the same arguments and returns an integer.Step 3 — Read the response
A successful response returns the matching records underdata.getTimeRecords:
Reading the milliseconds duration
duration is an integer count of milliseconds. To present it as hours, divide by 3600000 (1000 × 60 × 60):
7200000ms ÷3600000= 2 hours27000000ms ÷3600000= 7.5 hours
startTime is an object with two fields: ts (a Unix timestamp in milliseconds, marking the day the time was logged) and iso (the same instant as an ISO 8601 string). Use ts with your language’s date utilities (for example, new Date(record.startTime.ts) in JavaScript), or read iso directly. The nonBillable flag tells you whether the entry counts as billable when you build invoicing reports.
Related content
API Introduction
Authenticate with your API key and send your first request.
Queries
Every read operation, with the typed filter input and date arguments.
Mutations
The write operations that create and update records.