In this article:
This method for passing us your org structure allows you to send us your structure and to request status updates using the endpoint.
This section describes how to submit your users and teams CSV files for syncing your organization structure into Pluralsight. After submitting the files, you will receive a statusURL to check the status of the sync job.
API requests should be delivered to an endpoint appended to the production URL https://integrations-api.pluralsight.com
.
Section | Details |
---|---|
Endpoint | POST /sync-users |
Headers | Content-Type:
|
Body | Provide either the |
Users CSV file | File Name:
Each user must have a unique |
Teams CSV file | File Name:
Each team must have a unique |
Note: Remove special characters from the CSV files (e.g., quotation marks, commas) to avoid parsing errors.
Dry Run: By default, the sync process is a "dry run", meaning that the operations to sync your structure
will be generated and stored but not applied. To apply the operations, set the dryRun
parameter in the URL to false
.
Email Invitations: You can choose to run the sync process without inviting managers to Pluralsight via email. The sync will still apply all other operations, and you can view your team structure within Pluralsight. Managers not already in Pluralsight will not receive an email invitation or be added to the team.
What It Does:
Default Setting:
true
(meaning changes are not applied by default)How to Use:
?dryRun=false
to the end of your endpoint URL.Example URL:
https://integrations-api.pluralsight.com/sync-users?dryRun=false
What It Does:
Default Setting:
false
(errors are logged, and sync continues)How to Use:
?exitOnError=true
to the end of your endpoint URL.Example URL:
https://integrations-api.pluralsight.com/sync-users?exitOnError=true
What It Does:
Default Setting:
true
(invitations are sent by default)How to Use:
?sendManagerInvites=false
to the end of your endpoint URL.dryRun=false
to ensure no invitations are sent.Example URL:
https://integrations-api.pluralsight.com/sync-users?dryRun=false&sendManagerInvites=false
Additional Options:
What It Does:
How to Use:
?rootTeamIds=id1,id2
to the end of your endpoint URL, replacing id1, id2
with the IDs of the top-level teams you want to sync.Example URL:
https://integrations-api.pluralsight.com/sync-users?rootTeamIds=id1,id2
If you've provided only the users file:
“status”: “Awaiting teams file”
Status Code: 200 Content-type: application/json
Note: We do not begin data validation on either file until we have both files. Once both files have been provided you will either get a success or an error response with further information.
If you've provided both files:
“status”: “processing”,
“statusUrl”: “https://integrations-api.pluralsight.com/sync-users/:id/status”
Status Code: 200 Content-type: application/json
Note: You can then use the returned statusUrl to poll for status updates. See below.
If you have uploaded both files but provided invalid data or headers in one or both files:
“status”: “Invalid data”,
“errors”: [
"Missing header(s) for [either users or teams] file: [list of headers missing]",
...
]
What it does:
Example url:
GET /sync-users/:id/status
Note: :id
is the job ID from the URL returned after submitting the users.csv
and teams.csv
files.
In Progress
“status”: “processing”
“dryRun”: true|false
Status Code: 200
Completed
“status”: “completed”,
“dryRun”: true|false,
“listOfOperations”: [‘operation one’, operation two’],
“errors’: []
Status Code: 200
Completed with Errors
“status”: “completedWithErrors”,
“dryRun”: true|false,
“listOfOperations”: [‘operation one’, operation two’],
“errors’: [‘error one’, ‘error two’, ...]
Status Code: 200
curl
-T teams.csv
-X POST
-H “Authorization: Bearer [insert-your-api-key-here]“
-H 'Content-Disposition: attachment; filename="teams.csv"'
-H “Content-Type: text/csv“
https://integrations-api.pluralsight.com/sync-users
curl
-T users.csv
-X POST
-H “Authorization: Bearer [insert-your-api-key-here]“
-H 'Content-Disposition: attachment; filename="users.csv"'
-H “Content-Type: text/csv“
https://integrations-api.pluralsight.com/sync-users
statusUrl
from the response of the previous request for updatescurl
https://integrations-api.pluralsight.com/sync-users/:id/status
-H “Authorization: Bearer [insert-your-api-key-here]”
Note: In this example, we used Bearer Authentication, but you could have used Basic Authentication instead. See Authentication for details.