Create multiple user profiles
Creates multiple user profiles with a single API call.
API client permissions
The following table indicates the API clients that can and can't be used to call this operation:
owner | access_issuer | direct_access | direct_access_read | login_client |
---|---|---|---|---|
✓ | ✗ | ✓ | ✗ | ✗ |
Authentication
This operation supports both Basic authentication (recommended) and janrain-signed authentication. See Get started for more information.
Base URL
The base URL for this operation is your Identity Cloud Capture domain; for example:
https://educationcenter.us-dev.janraincapture.com
Your Capture domain (also known as a Registration domain) can be found in Console on the Manage Application page.
Examples
Example request: Create three user accounts
This command creates three new user accounts, specifying the following attribute values for each account:
- familyName
- givenName
- statuses
Note that the statuses attribute is a plural attribute, and contains two child attributes: status and statusCreated.
curl -X POST \
-H "Authorization: c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=" \
--data-urlencode type_name=user\
--data-urlencode all_attributes='[{"familyName":"Jones","givenName":"Abe","email":"jonesa@example.com","statuses":[{"status":"active",statusCreated":"2015-12-15T07:36:25Z"}]},{"givenName":"Jackson","familyName":"Gordon","email":"gjack@test.com","statuses":[{"status":"inactive","statusCreated":"2015-10-12T04:00:00Z"}]},{"givenName":"Sally","familyName": "Smith","email":"ssmith@myorg.org"}]' \
https://my-app.janraincapture.com/entity.bulkCreate
#Example results
If you API call succeeds you'll get back the uuid* and the id (the results** field) for each of the new accounts:
{
"uuid_results": [
"efd7fe4e-c0a2-4b80-876e-1d06df393579",
"3314d744-09a9-4264-a17f-402d3e4824e7",
"639dbbbc-6cac-4054-83be-92e08ced155f"
],
"results": [
11393,
11395,
11397
],
"stat": "ok"
}
Note that, if you're adding a large number of accounts, you might encounter errors with the way the are formatted within the body parameter. If you do run into problems with the bulkCreate endpoint, try formatting the attributes and attribute values as x-www-form-urlencoded parameters instead. For example:
curl -X POST \
https://my-app.janraincapture.com/entity.bulkCreate \
-H 'Content-Type: application/x-www-form-urlencoded'
-H 'Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY=' \
-d 'all_attributes=[{"givenName":"Jane","familyName":"Fielding","email":"jane.ortiz@fielding.com"},{"givenName":"Anderson","familyName":"Franks","email":"anderson.franks@example.com"},{"givenName":"Chiang","familyName":"Sun","email":"chiang.sun@example.com"}]&type_name=user'
Parameters
See the preceding section for information on configuring the all_attributes parameter..
Parameter | Type | Required | Description |
---|---|---|---|
type_name | string | ✓ | Entity where the new accounts are to be stored. |
all_attributes | string | ✓ | Attribute names and values each new account. Note that this argument is parsed as one entity: if any part of the argument fails to parse, the entire request will be rejected. Verify that your JSON is correct before calling the operation. |
Updated almost 2 years ago