License Deprovisioning Setup via REST HTTP/SSL Endpoint
This integration allows you to remove users licenses from Pluralsight.
Production endpoint
https://integrations-api.pluralsight.com/deprovision
Authentication options
Basic Authentication
Username: pluralsight
Password: [insert-your-api-key-here]
Bearer Authentication
Set Authentication header to Bearer [insert-your-api-key-here]
HTTP Method: POST
You will provide a CSV file containing all users that you want to deprovision. By default, the deprovision process is run as a "dry run", meaning the operations to remove user licenses in Pluralsight would be generated and stored but not applied. This allows for a review of the data to ensure everything would appear the way you expected. To apply the operations, a dryRun parameter in the URL will need to be set to false. See the "Turning off Dry Run" section below.
Headers
Content-Type: text/csv
Content-Disposition: attachment; filename="deprovision.csv"
Body
You must provide the deprovision CSV file. Details follow.
Deprovision CSV File
File Name: deprovision.csv
File Data:
- Required headers:
'id', 'email', 'first_name', 'last_name'
- All users must have a unique id and a unique email
Turning off Dry Run
Dry Run is the ability to run the process of generating and storing the operations to remove user licenses in Pluralsigh without applying those operations within Pluralsight. This allows for a review of the data to ensure everything would appear as expected before making permanently removing user licenses.
Note: The default behavior for this dryRun
is true. This means that if you don't set dryRun
to false
it will default to not applying the changes in Pluralsight. It will return
the generated operations that would be necessary for removing user licenses
To apply the generated operations and officially deprovision licenses in Pluralsight, add ?dryRun=false
to the end of your endpoint url.
Turning On Strict Mode (ExitOnError)
Strict mode is the ability to force the deprovision process to stop upon encountering any errors. This is likely most helpful when initially setting up and testing the deprovision process. Without strict mode, the file validation process will document and then remove any records that would cause errors and move forward with the rest of the data to run the deprovision. Strict Mode will stop the process from moving forward upon receiving any errors and not attempt to run the deprovision of the specified users.
Regardless of whether you are using strict mode or not, the results of the validation and sync process can be viewed within the License Deprovision Results.
Note: The default behavior for this exitOnError
is false. This means that if you don't set exitOnError
to true
it will default to removing the users that are causing the errors from the files and continuing with the rest of the validation and deprovision process.
To turn on strict mode and stop the process whenever errors occur, add ?exitOnError=true
to the end of your endpoint url.
Turning on Retain Privileges
By default, the License Deprovision endpoint will strip privileges from a user when it removes their license. For example, if a user has managerial privileges, during this process it
will strip their manager status and then deprovision them. If you wish for your users to retain their privileges, you must set the reatinPrivileges
flag to true.
Note: The default behavior for this reatinPrivileges
is false. This means that if you don't set reatinPrivileges
to true
it will default to removing the users managerial privileges
To turn on retain privileges, add ?reatinPrivileges=true
to the end of your endpoint url.
Possible Responses
No files were submitted
{
“status”: "No files",
}
Status Code: 400
In Progress
{
“status”: “Processing”,
}
Status Code: 200
Validation Errors
{
“status”: "Validation Completed With Errors",
}
Status Code: 400
Deprovision Errors
{
“status”: "Completed With Errors",
}
Status Code: 400
Success
{
“status”: "Completed Successfully",
}
Status Code: 200
Full Example
curl
-T deprovision.csv
-X POST
-H “Authorization: Bearer [insert-your-api-key-here]“
-H 'Content-Disposition: attachment; filename="deprovision.csv"'
-H “Content-Type: text/csv“
https://integrations-api.pluralsight.com/deprovision