Justworks to JSM Assets
Justworks to JSM Assets Integration Guide
This guide explains how to configure OnLink to retrieve Justworks data and import it into JSM Assets. It covers OAuth authentication, API requests, pagination, sample-data validation, field mapping, and optional filtering.
Overview
OnLink imports Justworks API responses into JSM Assets object types by using mapping statements such as key:, map:, and config:. The procedure below uses Justworks Workers as an example. Apply the same pattern to other resources, such as time off, by selecting the appropriate endpoint and mapping its response fields to the target Assets attributes.
The high-level process is:
Create or confirm the target JSM Assets schema and object type.
Prepare a Justworks OAuth application and credentials.
Configure an OnLink Assets Data Source and authenticate with Justworks.
Configure the API method, endpoint, response path, and pagination.
Fetch sample data and map Justworks fields to Assets attributes.
Preview the result, correct any issues, and run the import.
Prerequisites
A JSM Assets schema and object type for the data you want to import.
OnLink installed and available from Manage your apps.
A Justworks OAuth application with a Client ID, Client Secret, Refresh Token, and access to the required API endpoints.
Permission in JSM Assets to configure data sources, mappings, and imports.
The Justworks API endpoint URL for the object type you plan to import.
Supported Justworks object types
This guide uses Justworks Workers as the example resource. To import another resource, such as time off, select its API endpoint and map the returned JSON fields to the corresponding Assets attributes.
1. Prepare Justworks credentials
Before configuring OnLink, create or obtain a Justworks OAuth application with permission to access the endpoint and data you plan to import. Review the Justworks OAuth API documentation for authentication requirements.
Work with your Justworks administrator to create the OAuth application and collect the Client ID, Client Secret, and Refresh Token. Follow the Justworks OAuth application setup instructions.
2. Configure the OnLink data source
In OnLink, add an Assets Data Source.
For the source documentation, enter the Justworks Members API documentation.
Select Add, then select Parse to load the API definition.
Open the authentication settings and configure the OAuth values described below.
On the authentication page, select the OAuth configuration and enter the credentials from your Justworks OAuth application:
Enter the Client ID.
Enter the Client Secret.
Enter the Refresh Token.
Set the scope to
member.basic:read, or use the scope required by the endpoint.Save the authentication settings.
3. Configure the API method
Configure a GET request to retrieve records from the selected Justworks endpoint. The Workers example below uses the Members API. For another resource, replace the endpoint and update the response path if the JSON structure differs.
Set Method to
GET.Set URL to the Justworks API endpoint. In the sample below, use your Justworks hostname and replace the example hostname with your own.
Set Response data path to
items.Leave other settings at their defaults unless the endpoint requires query parameters.
GET https://public-api.justworks.com/v1/members4. Fetch sample data
Save the connection and run it to retrieve sample records from Justworks. Use the sample JSON to verify the endpoint and identify the exact field paths required for mapping.
Sample response
{
"items": [
{
"id": "member_01j6ffn569w683aptpakmzjya1",
"name": {
"full_preferred_name": "John Michael Smith"
},
"active": true,
"job_title": "Senior Software Engineer",
"employment_location_type": "office",
"department": {
"name": "Engineering"
},
"manager": {
"full_preferred_name": "Jane Smith"
}
}
],
"next_cursor": "member_01kptz5ykqgcvhphs40k3x1vdj"
}Pagination notes
Justworks API responses use cursor-based pagination. Configure the data source to read the cursor from next_cursor and request the next page until the API no longer returns a cursor. Verify the pagination settings against the endpoint documentation before starting the full import.
5. Configure the Assets import and mapping
After the connection is established, create the Assets import by following the JSM Assets Data Synchronization guide.
Use the fetched API sample to identify the exact Justworks JSON field paths and map them to the corresponding JSM Assets attributes. Use a stable, unique value for the key: mapping so OnLink can match and update existing Assets objects instead of creating duplicates.
Mapping | Purpose |
|---|---|
| Uses the Justworks member |
| Maps the Justworks member |
| Maps the Justworks member |
| Maps the Justworks member |
| Maps the Justworks member |
| Maps the Justworks member |
| Maps the Justworks member |
Mapping guidance
Start with one unique
key:mapping so OnLink can identify whether to create or update an Assets object.Add
map:entries for each Justworks field you want to store in Assets.Compare the Justworks sample JSON with the Assets object type attributes before running an import.
If a value is nested in the JSON response, inspect the sample output carefully and use the field path supported by the OnLink mapping configuration.
6. Validate and run the import
Use Get Data to preview the records returned by Justworks.
Confirm that the response contains the expected records and fields.
Verify that each mapping points to the correct JSON field and Assets attribute.
Check that the key value is present and unique for every record.
Run the import only after the preview and mappings are correct.
Optional filtering
Use query parameters to limit the records returned by the selected Justworks endpoint. Confirm supported parameters in the documentation for that endpoint before adding them to the OnLink request.
For example, to retrieve only active workers, add the query parameter status=active to the request. Run Get Data after adding the parameter and confirm that the returned records match the intended filter.
Review the request configuration, including the endpoint, authentication, response data path, pagination, and any query parameters. Save the data source when the preview returns the expected records.