Headcount Data API
This API allows you to fetch detailed headcount data for analysis and reporting, making it easier to monitor hiring, approvals, and overall headcount management.
Frequently Asked Questions
1. What does the Headcount Data API do?
The Headcount Data API enables users to retrieve comprehensive headcount information, including historical, current, and future data. It supports a range of use cases, from tracking approved headcounts to understanding the time taken for approval processes. This can be particularly useful for HR, finance, and operations teams looking to perform data analysis and make informed decisions.
Users can opt for either:
- Headcounts data
- Use the Plans Discovery endpoint to get the ID for the Hiring Plan you're interested in.
- Use the Hiring Plan ID from #1 to get the Hiring Plan data from the Headcount endpoint. An example request using cURL would look like:
where
curl -X GET \ https://api.teamohana.us/<your-domain-name>/v1/headcount?plan-id='YOUR_PLAN_ID' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer YOUR_API_KEY'YOUR_PLAN_IDis the Hiring Plan ID from #1.
- Full Forecast data
- Using the Headcount endpoint without the Plan ID from above will give you the full Forecast data.
NOTE: The retrieved data can be further filtered by:
- Headcount Status
- Hiring Status
- Department
- Division
You can refer to the usage of these filters here.
2. What are the typical use cases that this API solves?
| Use-cases | How the API Solves It | |
|---|---|---|
| 1 | Viewing Hiring plan | Use hiring-plan-active = 'True' to pull all headcounts in the active hiring plan, allowing finance teams to analyze current and future budget commitments. |
| 2 | Tracking forecast | Use headcount-status ("approved", "closed", null) and termination-date = null to get the headcount and employees in the current forecast. |
| 3 | Monitor hiring progress and approval status | Use headcount-status (approved, in-approval, closed), hiring-status, and approval-requested-date to get a list of all headcounts that are either approved or pending approval. This helps HR track the progress of hiring and the approval process. |
| 4 | Track progress of hiring | Use headcount-status (approved, in-approval, closed), hiring-status (non-started, in-progress, offer-stage, hired). |
| 5 | Identify the average time taken to approve a headcount | Use approval-requested-date and headcount-approved-date to calculate the time taken for each headcount to be approved, which helps in process optimization. |
| 6 | Backfill tracking and reporting | Use backfill-employee, headcount-type (Backfill) to track headcount openings that are tied to specific backfill needs, ensuring these are prioritized for recruitment. |
| 7 | Tracking denied and archived headcounts | Use denied-date, archived-date, archived-justification, and denied-justification to report on denied or archived headcounts, helping to audit and understand why certain requests were rejected. |
| 8 | Monitor headcount changes over time | Use last-updated to pull all headcounts that were updated in a period, allowing teams to keep track of recent changes. |
| 9 | Plan for future fiscal year budgets based on headcount needs | Use budget-annualized-salary, target-annualized-salary, and future budget-start-date, target-start-date to forecast headcount salary costs in upcoming fiscal years. This ensures better planning for recruitment and salary expenses in alignment with organizational growth. |
| 10 | Viewing Open Headcount requests | Retrieve the data and filter by: 1. headcount-id not equals null; 2. hiring-status not equals null and not equals Hired. Note: To get Open Headcount requests for the current Hiring Plan, further filter by hiring-plan-active = 'True'. |
3. How do I authenticate with the API?
The API requires an API key for authentication. Ensure you include the API key in the headers of your request as follows:
Authorization: Bearer YOUR_API_KEY
4. How do I make a request to the API?
To request headcount data, send a GET request to the API endpoint: https://api.teamohana.us/{domain_name}/v1/headcount
Here's an example request with recommended configuration.
Note: Please replace YOUR_DOMAIN_NAME and YOUR_API_KEY with your specific values.
curl -X GET \
https://api.teamohana.us/YOUR_DOMAIN_NAME/v1/headcount \
-H 'Accept: application/json' \
-H 'Accept-Encoding: gzip' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--compressed5. How do I use filters to get to the specific data of my interest?
The Headcount endpoint has support for a wide variety of filters to support your use cases. Please see the updated API spec for the types of filters supported.
There is an additional Discovery endpoint. This allows you to find the id you want to use as a filter. Please refer to API Docs.
- Supported objects: Plan, Division, Department
Some examples of filter usage:
- Filter by Plan
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'status=approved' - Filter by Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' - Filter by multiple Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'hc-hiring-status=offer-sent' - Filter by Plan and Department
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Plan, Department and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' - Filter by Division, Plan and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' \ --data-urlencode 'division-id=YOUR_DIVISION_ID' - Filter by Division, Department, Plan and Hiring Status
curl -G https://api.teamohana.us/<your-domain-name>/v1/headcount \ -H 'Authorization: Bearer YOUR_API_KEY' \ --data-urlencode 'hc-hiring-status=in-progress' \ --data-urlencode 'department-id=YOUR_DEPARTMENT_ID' \ --data-urlencode 'plan-id=YOUR_PLAN_ID' \ --data-urlencode 'division-id=YOUR_DIVISION_ID'
6. What is the response format?
The API responds with a JSON object. Below is an example of the response structure:
Standard fields:
[
{
"hiring-status": "Hired",
"employee-type": "Full Time",
"department": "Sales",
"headcount-approved-date": "2024-07-15T00:00:00Z",
"target-variable": 1234,
"priority": "Normal",
"target-equity": 4321,
"opening-id": "1234-123",
"budget-equity": 44000,
"headcount-id": "ORG-123",
"budget-salary": 205000,
"reporting-manager": "John Nash",
"annualized-budget-salary": 2460000,
"actual-equity": 4321,
"actual-variable": 1324,
"budget-job-level": "L1",
"headcount-type": "New hire",
"archived-justification": "Not required",
"archived-date": "2024-07-15T00:00:00Z",
"backfill-employee-email": "back.fill@email.com",
"headcount-denied-date": "2024-07-15T00:00:00Z",
"target-start-date": "2024-06-27T21:07:14Z",
"budget-start-date": "2024-08-26T00:00:00Z",
"division": "Engineering",
"budget-pay-rate": "YEAR",
"job-level": "L2",
"job-name": "GH-1234 - Sales Director, Generative AI",
"denied-justification": "Not Suitable",
"actual-salary": 2345,
"location": "San francisco, USA",
"reporting-manager-email": "john.nash@email.com",
"last-updated": "2024-07-15T00:00:00Z",
"headcount-status": "Approved",
"actual-start-date": "2024-06-27T21:07:14Z",
"pay-rate": "YEAR",
"budget-currency": "USD",
"job-title": "Software Engineer",
"backfill-employee": "John Wick",
"annualized-actual-salary": 28140,
"backfill-employee-id": 1234,
"target-salary": 84840,
"target-currency": "USD",
"annualized-target-salary": 1018080,
"employee-name": "John Doe",
"actual-currency": "USD",
"budget-variable": 105000,
"headcount-url": "https://app.teamohana.us/headcount-details/ORG-123",
"team": "Sales",
"approval-requested-date": "2024-07-15T00:00:00Z",
"initiative": "Initiative Name",
"target-pay-rate": "YEAR",
"hiring-plan-active": "True",
"hiring-plan": "DEFAULT"
}
]Custom fields:
[
{
"custom-fields": {
"HEADCOUNT": {
"Field 1": value,
"Field 2": value,
"Field 3": value
},
"EMPLOYEE": {
"Field 1": value,
"Field 2": value,
"Field 3": value
},
"OFFER": {
"Field 1": value,
"Field 2": value,
"Field 3": value
}
}
}
]7. What should I do if I encounter errors?
In case of errors, the API will return an appropriate HTTP status code along with a message describing the issue. Common error codes include:
- 401 Unauthorized: Request does not contain valid credentials.
- 500 Internal Server Error: Something went wrong at TeamOhana. Please contact support.
8. What is the limit of the number of API requests?
The API rate limit is currently set to 5 requests per second. If you require any adjustments to this limit, please reach out to our support team for assistance.
For more information or assistance with the API, please contact us.
Pigment Connector API
This API allows you to fetch the full Forecast data from TeamOhana for analysis and reporting, making it easier to monitor hiring, approvals, and overall headcount management.
Onboarding
Setup
Pigment allows you to connect to an external API via API Request as an Integration option. Using this, you will be setting up a connection to the TeamOhana Pigment Connector API.
Pre-requisites:
- An existing Pigment account, and
- A working import configuration ID.
Set up a new API request connection in Pigment with the following information:
- POST endpoint URL
https://api.teamohana.us/<your name in TeamOhana>/v1/headcount/upload/pigment
- Headers
Authorization: Bearer <your TeamOhana API key>x-pigment-api-key: <your Pigment API key>
- JSON Body
{"import-configuration-id": <your Pigment Import Configuration ID>}
Verification
Once the API request connection has been set up, please set up a way to test the import in a Board where you would like to use it. The Forecast data should now be available for viewing in a Dimension List.
If you want to try the TeamOhana Pigment connector API without the above setup, please execute the following command with any HTTP client of your choice (curl is being used in the example, but any HTTP client would work).
curl -X POST \
https://api.teamohana.us/<your name in TeamOhana>/v1/headcount/upload/pigment \
-H 'accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer <Your TeamOhana API key>' \
-H 'x-pigment-api-key: <Your Pigment API key>' \
-d '{"import-configuration-id": <Your Pigment Import Configuration ID>}'Troubleshooting
- Triggering an import from Pigment may bring up an error. Usually, this is displayed as a Webhook error.
- The data might still end up getting imported successfully.
- The data might not get imported. In that case, please open a support request with TeamOhana.
- If you do not see some columns you expect in your Pigment Dimension List, please verify that they appear with the same name in the source CSV used to create the Import Configuration.
Process diagram
API use-cases
Once the API connection has been successfully set up and verified, you are ready to use the Forecast data. Some typical use cases are:
| Use-cases | How the API Solves It | |
|---|---|---|
| 1 | Viewing Hiring Plan | Use hiring-plan-active = 'True' to pull all headcounts in the active hiring plan, allowing finance teams to analyze current and future budget commitments. |
| 2 | Tracking forecast | Use headcount-status ("approved", "closed", null) and termination-date = null to get the headcount and employees in the current forecast. |
| 3 | Monitor hiring progress and approval status | Use headcount-status (approved, in-approval, closed), hiring-status, and approval-requested-date to get a list of all headcounts that are either approved or pending approval. This helps HR track the progress of hiring and the approval process. |
| 4 | Track the progress of hiring | Use headcount-status (approved, in-approval, closed), hiring-status (non-started, in-progress, offer-stage, hired). |
| 5 | Identify the average time taken to approve a headcount | Use approval-requested-date and headcount-approved-date to calculate the time taken for each headcount to be approved, which helps in process optimization. |
| 6 | Backfill tracking and reporting | Use backfill-employee, headcount-type (Backfill) to track headcount openings that are tied to specific backfill needs, ensuring these are prioritized for recruitment. |
| 7 | Tracking denied and archived headcounts | Use denied-date, archived-date, archived-justification, and denied-justification to report on denied or archived headcounts, helping to audit and understand why certain requests were rejected. |
| 8 | Monitor headcount changes over time | Use last-updated to pull all headcounts that were updated in a period, allowing teams to keep track of recent changes. |
| 9 | Plan for future fiscal year budgets based on headcount needs | Use budget-annualized-salary, target-annualized-salary, and future budget-start-date, target-start-date to forecast headcount salary costs in upcoming fiscal years. This ensures better planning for recruitment and salary expenses in alignment with organizational growth. |
Scenarios API
The Scenario API has following two parts.
Discovery endpoint
This allows you to discover which scenarios can be pulled into your planning process. It returns un-merged Scenarios that the authenticated user has access to. Information returned includes:
- The Scenario Name
- A human-readable Scenario ID
Export endpoint
This returns data for a specific Scenario. Data format is either JSON or CSV, depending on your choice when invoking the endpoint.
SCIM Provisioning with Okta
TeamOhana supports automated user provisioning over SCIM. Once your Identity Provider (IdP) is connected, assigning the TeamOhana app to a user provisions them in TeamOhana, and un-assigning de-provisions them.
By default, every provisioned user is given the Employee role. This guide shows how to configure a TeamOhana Role attribute in Okta so that the role you choose in Okta is carried over the SCIM connection and reflected on the user in TeamOhana.
Configure the TeamOhana Role attribute
- In Okta, go to
Directory -> Profile Editor. - Choose the TeamOhana User app profile from the list.
- Click
Add Attribute.
- Fill in the popup form with the following values:
- Data type:
string - Display name:
TeamOhana Role(any label that clearly identifies this as the TeamOhana role works) - Variable name:
teamohanaRole - External name:
roles.^[type=='teamohana'].value(copy-paste this exactly as-is) - External namespace:
urn:ietf:params:scim:schemas:core:2.0:User(copy-paste this exactly as-is)
Leave the remaining fields at their defaults. We recommend leaving Enum unchecked — if you enable it, you will need to update the enumerated list every time a new role becomes assignable in TeamOhana.
Click Save. The TeamOhana Role attribute is now configured.
From now on, whenever you assign the TeamOhana app to an Okta user, the assignment form includes a TeamOhana Role field. Enter a valid TeamOhana role name there, and the user will be provisioned in TeamOhana with that role.
About the role value
The value must match the name of a role that exists in your TeamOhana organization (for example,
Hiring Manager). If the field is left blank, the user is provisioned with the defaultEmployeerole. If the value does not match a known role, provisioning for that user is rejected.Provisioning roles other than
Employeeis enabled per organization. If your users are still being provisioned asEmployeedespite setting this field, please reach out to support@teamohana.com.
Map an existing Okta attribute to TeamOhana Role
If you would rather populate the TeamOhana Role from an attribute you already maintain on your Okta users, you can do so with the Profile Editor's Mappings feature instead of typing the role on every assignment.
After configuring the TeamOhana Role attribute (steps above):
- Go to
Directory -> Profile Editor. - Click
Mappingsfor the TeamOhana app profile.
- Select the
Okta User to TeamOhanatab.
- Scroll to the TeamOhana Role (
teamohanaRole) attribute on the right — it starts out without a mapping. In the field on the left, enter the Okta user attribute you want to map to it (for example,user.title).
- Click
Save Mappings.
Okta will ask whether to Apply Updates. You can choose not to apply updates.
That's it. From now on, whenever you assign the TeamOhana app to an Okta user, the TeamOhana Role field is pre-filled from the Okta attribute you mapped.
Configuring TeamOhana Roles with Okta Groups
If you manage access with Okta Groups, you can configure the TeamOhana Role at the group level instead of per user. Every member of the group is then provisioned in TeamOhana with the role you set on the group.
⚠️ Configure the group attribute before assigning the app to the group
Always add the TeamOhana Role group attribute (the steps below) before you assign the TeamOhana app to the Okta Group. If you assign the app first and add the attribute afterwards, the group's members are provisioned without a role value and all of them default to the
Employeerole.
Configure the TeamOhana Role attribute as a group attribute
Follow the same steps as in Configure the TeamOhana Role attribute:
- In Okta, go to
Directory -> Profile Editor. - Choose the TeamOhana User app profile from the list.
- Click
Add Attribute. - Fill in the popup form with the same values as before:
- Data type:
string - Display name:
TeamOhana Role - Variable name:
teamohanaRole - External name:
roles.^[type=='teamohana'].value(copy-paste this exactly as-is) - External namespace:
urn:ietf:params:scim:schemas:core:2.0:User(copy-paste this exactly as-is)
In addition, set Attribute type to Group (instead of the default Personal). This is what lets you set the role's value at the group level.
Click Save.
Assign the TeamOhana app to the Okta Group
Now assign the TeamOhana app to the Okta Group whose members should receive the role.
- In Okta, go to
Directory -> Groupsand select the group you want to configure. - Open the Applications tab and click
Assign Applications. - In the popup, find TeamOhana and click
Assign.
- A popup appears with the group's app attributes. In the TeamOhana Role field, enter a valid TeamOhana role name (for example,
Hiring Manager), then clickSave and Go Back.
- Back in the list, TeamOhana now shows as
Assigned. ClickDone.
Every member of this Okta Group will now be provisioned in TeamOhana with the role you set on the group. The same rules apply to the role value as in the per-user flow: it must match the name of a role that exists in your TeamOhana organization, a blank value falls back to the default Employee role, and an unknown value is rejected.
Swagger API Documentation
Detailed swagger API documentation and schema is available on our API Documentation page.
Contact Us
If you need an API Key or if you need assistance with the API, please reach out to our support team at support@teamohana.com.