Modify a user profile
Updates a user profile. Unlike the /entity.replace operation, this operation only modifies the attributes specified in the API call: attributes not included in the API call are ignored and aren't changed in any way. Plural values are appended,to an existing plural unless an ID is provided. In that case, the existing plural data is replaced with the new data.
Refer to the Registration error codes page for details on error codes.
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 Basic authentication (recommended) as well as janrain-oauth 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 1: Update specific attributes for a user record
This command uses the uuid parameter to locate the user with the uuid 6bbe7e58-bede-41b8-940b-5614c7607a4e, then updates the givenName and familyName attributes for that user.
curl -X POST \
-H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=="\
--data-urlencode type_name=user \
--data-urlencode uuid=6bbe7e58-bede-41b8-940b-5614c7607a4e \
--data-urlencode attributes='{"givenName":"Matt","familyName":"Parker"}' \
https://my-app.janraincapture.com/entity.update
Example response
If your API call succeeds the response consists of the status ok:
{
"stat":"ok"
}
Example 2: Update a plural entry for a user record
This command updates the statuses plural (plural ID 5253) for the user with the ID 5252. In this example, the status attribute is set to active.
curl -X POST \
-H "Authorization: Basic aW1fYV...NfbXk=" \
--data-urlencode type_name=user \
--data-urlencode id=5252 \
--data-urlencode attribute_name='/statuses#5253' \
--data-urlencode value='{"status":"active"}' \
https://my-app.janraincapture.com/entity.update
Example response
If your API call succeeds the response consists of the word ok:
{
"stat": "ok"
}
3 Example: Update a user record by key_attribute and key_value
The following command uses the key_attribute and key_value parameters to locate the user profile for the user with the email address of gjack@example.com, then changes the displayName in that user profile to Gary Jackson.
curl -X POST \
-H "Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY="\
--data-urlencode type_name=user \
--data-urlencode key_attribute=email \
--data-urlencode key_value='"gjack@example.com"'\
--data-urlencode attribute_name='displayName' \
--data-urlencode value='{"Gary Jackson"}'\
https://my-app.janraincapture.com/entity.update
Example response
If your API call succeeds the response consists of the word ok:
{
"stat": "ok"
}
Parameters
All parameters need to be configured as x-www-form-urlencoded body parameters.
Parameter | Type | Required | Description |
---|---|---|---|
uuid | string | ✗ | Unique identifier of the user record. Required if you aren't using the id or key_attribute parameter. |
id | string | ✗ | Unique identifier of the user record. Required if you aren't using the uuid or key_attribute parameter. |
key_attribute | string | ✗ | Name of a unique attribute in the schema that can identify the user account you're modifying. Required if you aren't using the id or uuid parameter. |
key_value | string | ✗ | Value for the key_attribute parameter. For example, if key_attribute is set to email then key_value needs to be set to the user's email address. Note that string values need to be enclosed in double quotes. |
type_name | string | ✗ | Name of the entity type storing the user account. |
value | JSON string | ✗ | Value tassigned to the attribute_name parameter. This parameter can either be a single value that accompanies the attribute_name parameter (for example "Fred"), or can contain JSON pairs of attributes and names to update (for example: {"Name":"Bob","Description":"Smith"}). |
attribute_name | string | ✗ | Defines a subset of the user record to be updated. If an attribute path is supplied, entity_update changes only attributes from that point forward in the schema. The default is root, meaning the entire entity is updated. For backward compatibility this can also be referred to as the attributes parameter. |
created | dateTime | ✗ | Timestamp generated when the entity was created. This value must match the value of the user's created attribute. If it doesn't, the call fails. |
lastUpdated | dateTime | ✗ | Timestamp generated when the entity was last updated. This value must match the value of the user's lastUpdated attribute. If it doesn't, the call fails. |
include_record | boolean | ✗ | When true, the newly-updated user record is returned as part of the API response. If attribute_name is pointed to root, the entire record is returned. If it points to a subset of the record, only that data is returned. |
Updated almost 2 years ago