Update Users (v1)
Modifies attributes such as email, first name, and last name of Oracle Fusion Cloud Enterprise Performance Management users in an identity domain using the new values identified in an ANSI or UTF-8 encoded comma-separated value (CSV) file that was uploaded to the environment. Before using this API, use the Upload REST API to upload the file. Use double quotation marks to enclose fields that contain space charaters in the CSV file. The file should be deleted after the API executes. The file format is as follows:
Firt Name, Last Name,Email, User Login
Jane,Doe,<emailAddress>,jdoe
John,Doe,<emailAddress>,<emailAddress>This API should be run only by Service Administrators who are also assigned to the Identity Domain Administrator role in the identity domain in which users are to be updated. The CSV file should not include the account of the user who executes this command. It updates all properties of the user identified by User Login. Because user accounts are common to all service environments that an Identity Domain Administrator supports, updating an account for one environment updates it for all environments that share the Identity Domain.
With this API, you can see which records failed and the reason why they failed in addition to how many records passed and failed.
The API is asynchronous and returns the Job ID. The presence of status -1 in the response indicates that the updating of users is in progress. Use the job status URI to determine whether the process is complete. Any non-zero status except -1 indicates failure.
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User, User, or Viewer)
REST Resource
PUT /interop/rest/security/v1/users
Table 13-41 Tasks for Updating Users
| Task | Request | REST Resource |
|---|---|---|
| Update users | PUT | /interop/rest/security/v1/users |
| Update users status | GET | /interop/rest/security/v1/jobs/<jobId> |
Request
Supported Media Types: application/x-www-form-urlencoded
Table 13-42 Parameters
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
jobtype |
UPDATE_USERS |
Form | Yes | None |
filename |
The name of the uploaded ANSI or UTF-8 encoded CSV file containing the users to update, such as |
Form | Yes | None |
Response
Supported Media Types: application/json
Table 13-43 Parameters
| Name | Description |
|---|---|
details |
In the case of errors, details are published with the error string |
status |
See Migration Status Codes |
links |
Detailed information about the link |
href |
Links to API call or status API |
action |
The HTTP call type |
rel |
Possible values: self or Job Status. If the value is set to Job Status, you can use the href to get the status
|
data |
Parameters as key value pairs passed in the request |
items |
Details about the resource |
links |
Details of the first URL to be requested to get the job details; rel is "Job Details" |
Examples of Response Body
Example 1: Job is in Progress
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users",
"data": {
"jobType": "UPDATE_USERS",
"filename": "<filename>"
},
"action": "UPDATE"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobID>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
Example 2: Job Completes with Errors
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/
<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Failed to update users. Input file <filename> not found. Specify a valid file name.",
"status": 1,
"items": null
}
Example 3: Job Completes without Errors
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/
<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName": "<username>",
"Error_Details": " User <USER_NAME> not found. Verify that the user exists. "
}
]}
Sample cURL Command Basic Auth
curl -X PUT -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/x-www-form-urlencoded' -d 'jobtype=UPDATE_USERS&filename=updateUsers.csv' 'https://<BASE-URL>/interop/rest/security/v1/users'
Sample cURL Command OAuth 2.0
curl -X PUT --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/x-www-form-urlencoded' -d 'jobtype=UPDATE_USERS&filename=updateUsers.csv' 'https://<BASE-URL>/interop/rest/security/v1/users'