Skip to main content
Integrations & API

REST API

Written By Lauri Eurén

Last updated About 4 hours ago

Operating has an open REST API you can find here:

https://operating.readme.io/reference/overview

Generate an API key

Requests to the API need your organization's API key. To generate the key:

  1. Go to Settings → API keys.

  2. Click Generate a new API key.

  3. Copy the key and keep it somewhere safe. Operating shows the key only once, and it is not visible after you leave the page.

To generate a key, you need the Manage integrations permission. See Permission sets in Operating.

The key uses a dedicated service user account, not your own user. Your organization has one active key at a time. When you generate a new key, the current key stops working, so update every system that uses it. While a key is active, the page shows API key active with who created it and when.

Pagination on the report endpoints

The four report endpoints can return a lot of data in one response:

  • /v1/reports/people-actual

  • /v1/reports/people-planned

  • /v1/reports/projects-actual

  • /v1/reports/projects-planned

You can ask for the data one page at a time. Add the limit query parameter to set how many people or projects you get per page. The value must be a whole number from 1 to 200.

When you set limit, the response shape changes. Instead of a bare array of time blocks, you get an object with two keys:

  • data — the usual array of time blocks, with only that page of people or projects in each block.

  • meta.nextCursor — the cursor for the next page. Pass this value in the after query parameter to get the next page. The value is null when there are no more pages.

Pagination is optional. If you leave limit out, the endpoint returns the bare array as before.

The after parameter needs limit. If you send after on its own, the request fails with a validation error.

Site and role history, position groups, assignments and project notes

The full request and response formats for these resources are in the API reference.

  • /person-site-assignments — a person's site over time. Each assignment has a site and a from date. Together the assignments cover every date with exactly one site.

    • Create: the assignment starts on its from date (today if you leave from out). The period before it ends the day before.

    • Change from: the period before it moves with it.

    • Delete: the period next to it grows to fill the gap. A person's only assignment can't be deleted.

  • The person siteId field is deprecated. Writing it replaces the person's whole site history with one site for all dates. To change a person's site from a given date, create a person site assignment.

  • /person-company-assignments — a person's company over time. You can list assignments, filtered by personId, companyId and a date range. You can also read, create, update and delete an assignment.

  • /competence-role-assignments — a person's roles over time. Each assignment has a from and a through date. A null date means the period has no start or no end.

    • Primary role: a person has one primary role on each date. When you create a primary assignment, the current primary role ends the day before its from date. Operating sets the through date of a primary assignment from the next one.

    • Additional roles: they can have any date range.

  • /position-group-assignments — the Groups a position belongs to, separate from the Groups of its project. You can list them (filtered by positionId or groupId), create one with a positionId and a groupId, read one, and delete one.

  • POST /positions/bulk creates several positions in one request. Send { "data": [...] } with at most 1000 records. The response is { "data": [...] } with one id for each record, in the same order as the request. When a time off record merges into an existing time off position, the id of that position appears in the slot of the record that merged into it.

  • /assignments supports list, read and create. To move a person to another position, set assignedPersonId on the position.

  • POST /allocations/bulk creates several allocations in one request. Send { "data": [...] } with at most 1000 items. The response is { "data": [...] } with the ids of the new allocations in the same order as the request. Operating recalculates the financials of the affected positions before it responds. Each item has the same fields as a single allocation create:

    • Required: positionId and statusId.

    • Optional: percentage, from, through, probability, taskId, noteText and externalAllocations.

  • /project-notes — dated notes on a project. Each note has a projectId, a noteText and a noteDate (YYYY-MM-DD). You can list notes. The list can be filtered by projectId, createdSince, createdBefore, updatedSince and updatedBefore, and paged with limit and after. You can also create, read, update and delete a note. A new note needs all three fields, and noteText can't be empty.

  • /budget-progress — the progress entries of a budget. Each entry records how much of the budget is complete by a date, as an amount counted from the budget's start. On a fixed-price budget, every write recalculates the recognized revenue of the budget's project or phase.

    • Endpoints: list with GET /budget-progress, filtered by budgetId or projectId. Read, update and delete one with GET, PATCH and DELETE /budget-progress/{id}, and create one with POST /budget-progress.

    • Permissions: reading needs the Revenue visibility permission. Creating, updating and deleting need the Manage rates, budgets, planned expenses and baselines permission for the project.

    • Rules: the API applies the same rules as the app. An entry's date must fall inside the budget's dates. A reduction needs a note, and only the latest entry can be one. An entry that a milestone created changes only through its milestone. A budget whose revenue is recognized by milestones takes no entries set by hand.

  • Each budget in the budgets API also returns its progressEntries, oldest first. This list is read-only, so change an entry through /budget-progress.

Timers

A person has at most one running timer. Three endpoints read, start and stop it. When you stop the timer, Operating saves the elapsed time as a time entry, as when a person stops the timer in Hours. See How to use the timer.

The timer must be turned on for your organization. The same task, position, site and project rules apply as when a person starts a timer in Hours.

  • Without Manage timers for everyone: you can use only your own person's timer. A request for another person fails with a 403 error.

  • With Manage timers for everyone: you can name any person. See Permission sets in Operating.

In both cases you must be allowed to see the person's time entries. To start or stop a timer, you must also be allowed to create the time entry it writes, for that person on that project.

  • GET /persons/{personId}/timer returns the person's running timer, or null in data when no timer runs. It fails with 404 when the person is not found, and with 403 when you may not see the person's time entries or the timer's project.

  • POST /persons/{personId}/start-timer starts a timer. Send projectId and date (YYYY-MM-DD). taskId, positionId, siteId and description are optional. The response has personId, projectId, taskId, positionId, siteId, description, date and startedAt. If the person already has a running timer, the request fails with A timer is already running for this person and the running timer stays.

  • POST /persons/{personId}/stop-timer stops the timer and returns the time entry it wrote. Without timeEntryId, Operating creates a new time entry. With timeEntryId, Operating adds the elapsed seconds to that entry, and seconds in the response is the entry's new total. When less than one second has passed, Operating deletes the timer, writes nothing and returns null in data.

The entry you name in timeEntryId must not be submitted, approved or invoiced, and it must match the timer's person, date, project, task and position. Otherwise the stop fails with Cannot add this timer to that Time entry and the timer keeps running. Send another timeEntryId, or leave it out to create a new entry.

Submit and unsubmit a timesheet

Two endpoints submit a person's timesheet and open it again. Each takes a date in YYYY-MM-DD format and returns the person.

  • POST /persons/{personId}/submit-timesheet submits every unsubmitted time entry of the person on or before the date. The date becomes the person's submitted-through date when it is later than the current one. An earlier date submits the entries and leaves the submitted-through date as it is. If a required note is missing, the whole request fails and submits nothing.

  • POST /persons/{personId}/unsubmit-timesheet opens the person's timesheet from the date onward. The date is the first day to open, and the submitted-through date becomes the day before it.

When you unsubmit a timesheet:

  • Uninvoiced time entries on or after the date return to not submitted.

  • Invoiced time entries stay submitted.

  • An entry approved as imported keeps that status.

The unsubmit request records no reason. For the same action in the app, see How to unlock a submitted timesheet.

Time entries on projects the person is not a member of

Some permission sets allow time entries only for projects that people are members of. With such a permission set, the API accepts a time entry only on a project where the entry's person holds a position. Projects open to everyone are always allowed.

Otherwise the request fails with a 403 error and this message: Cannot track time to project [id]: the entry's person holds no position on it. To fix it, add a position for the person on the project, or send the entry for another project.