Bulk User Management API lets you use the contents of a json file to create or modify several users in one operation.
There is no limit to the number of records that can be uploaded, but it is recommended that requests are performed in smaller batches.
This process can also be performed in the CCAI Platform portal by following the instructions in the Bulk user management.
Roles and permissions
Use the Apps API by creating an api_user.
The api_user does not have roles and permissions, so all api_users can perform
bulk_user management
.You cannot set granular permissions when utilizing api_user, so the api_user will have access to all user fields.
Add an API credential
In the CCAI Platform portal, go to Settings > Developer Settings > API Credential management.
Click + Add API Credential. An Add API Credential message will open.
Enter a Name for the credential.
Click Create.
Use the bulk user management API
Using the bulk user Mmanagement API requires two API calls. One uploads the JSON file and creates the job, and the other processes it. You can also use optional API calls to help ensure that your job is processed correctly.
Optional: Retrieve the json template. This retrieves the latest template, which includes any additional roles or teams that were created since you retrieved the previous template. Google recommends this step.
Optional: Get user configuration data. This retrieves a list of all users (or a single user, if you specify an email address) to mirror.
Upload the json file. You can add or update one or multiple users in the file. Make sure to note the job ID.
Request processing of the json file. This starts the bulk job.
Optional: Get a status check. Provide the job ID to look at processing status.
Optional: Retrieve an updated job list. This retrieves the list of all bulk user management jobs.
Optional: Retrieve scheme error logs. Specify the job ID to get the scheme error logs.
Optional: Retrieve errors. Get errors.
Upload the json file
Usage |
Upload the json file |
URL |
apps/api/v1/bulk/users/upload |
Method |
POST / PUT |
Request |
content-type: multipart/form-data
|
Response |
Header:
Body
|
Retrieve json template
Usage |
Template |
---|---|
URL |
apps/api/v1/bulk/users/template |
Method |
GET |
Request |
(Empty) |
Response |
|
Deactivate a user
To deactivate a user, change the status
value to Inactive
—for example,
"status":"Inactive"
.
Request processing of the current json file
Usage |
Request processing of current json file |
URL |
/v1/bulk/users/proceed |
Method |
POST |
Request |
|
Response |
Header:
Body
|
Get a status check
Usage |
Get a status check |
URL |
apps/api/v1/bulk/users/jobs/#{job_id} |
Method |
GET |
Request |
Path variable - |
Response |
|
Retrieve updated job list
Usage |
Get update job list |
URL |
apps/api/v1/bulk/users/jobs |
Method |
GET |
Request |
|
Response |
Header
Body
|
Note |
The output is sorted in reverse order of job_id so that the most recent data comes first. |
Retrieve scheme error logs
Usage |
Get scheme error logs |
URL |
/v1/bulk/users/errors/scheme/#{job_id} |
Method |
GET |
Request |
Path variable - |
Response |
content-type: application/json
|
Retrieve errors
Usage |
Get update error logs |
URL |
/v1/bulk/users/errors/update/#{job_id} |
Method |
GET |
Request |
Path variable - job_id |
Response |
content-type: application/json
|