Create a user account
post
/hcmRestApi/resources/11.13.18.05/userAccounts
Request
Supported Media Types
- application/vnd.oracle.adf.resourceitem+json
- application/json
The following table describes the body parameters in the request for this task.
Root Schema : userAccounts-item
Type:
Show Source
object
-
CreatedBy(optional):
string
Title:
Created By
Maximum Length:64
User who created the user account. -
CreationDate(optional):
string(date-time)
Title:
Creation Date
Date and time when the user account was created. -
CredentialsEmailSentFlag(optional):
boolean
Title:
Credentials Email Sent
Indicates whether the user name and password credentials were sent to the user after the account was created. Valid values are Yes and No. -
GUID(optional):
string
Title:
GUID
Maximum Length:64
Globally unique identifier for the user account. -
LastUpdateDate(optional):
string(date-time)
Title:
Last Update Date
Date and time when the user account was last updated. -
LastUpdatedBy(optional):
string
Title:
Last Updated By
Maximum Length:64
User who last updated the user account. -
links(optional):
array Items
Title:
Items
Link Relations -
PersonId(optional):
integer(int64)
Title:
Person ID
Unique identifier of the person record linked to the user account. -
PersonNumber(optional):
string
Title:
Person Number
Maximum Length:30
Person number of the person record linked to the user account. -
SuspendedFlag(optional):
boolean
Title:
Suspended
Indicates whether the user, as part of termination, is suspended. If suspended, the user can be reactivated. Valid values are Yes and No. -
userAccountRoles(optional):
array User Account Roles
Title:
User Account Roles
The userAccounts resource includes all the user accounts as of the specified date. By default, the current date is retained. -
UserId(optional):
integer(int64)
Title:
User ID
Unique identifier for the user. -
Username(optional):
string
Title:
User Name
Maximum Length:100
User name, a unique identifier for a user's account.
Nested Schema : User Account Roles
Type:
array
Title:
User Account Roles
The userAccounts resource includes all the user accounts as of the specified date. By default, the current date is retained.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href(optional):
string
Title:
hyperlink reference
The URI to the related resource. -
rel(optional):
string
Title:
relation
The name of the relation to the resource instance. Example: self.
Nested Schema : userAccounts-userAccountRoles-item
Type:
Show Source
object
-
CreatedBy(optional):
string
Title:
Created By
Maximum Length:64
User who created the user account role assignment. -
CreationDate(optional):
string(date-time)
Title:
Creation Date
Date and time when the user account role assignment was created. -
LastUpdateDate(optional):
string(date-time)
Title:
Last Update Date
Date and time when the user account role assignment was last updated. -
LastUpdatedBy(optional):
string
Title:
Last Updated By
Maximum Length:64
User who last updated the user account role assignment. -
links(optional):
array Items
Title:
Items
Link Relations -
RoleCode(optional):
string
Title:
Role Code
Maximum Length:240
Technical name used to search for a specific role. -
RoleId(optional):
integer(int64)
Title:
Role ID
Unique identifier of a role. -
UserRoleId(optional):
integer(int64)
Title:
User Role ID
Unique identifier of the user role.
Response
Supported Media Types
- application/vnd.oracle.adf.resourceitem+json
- application/json
Default Response
The following table describes the default response for this task.
Root Schema : userAccounts-item
Type:
Show Source
object
-
CreatedBy(optional):
string
Title:
Created By
Maximum Length:64
User who created the user account. -
CreationDate(optional):
string(date-time)
Title:
Creation Date
Date and time when the user account was created. -
CredentialsEmailSentFlag(optional):
boolean
Title:
Credentials Email Sent
Indicates whether the user name and password credentials were sent to the user after the account was created. Valid values are Yes and No. -
GUID(optional):
string
Title:
GUID
Maximum Length:64
Globally unique identifier for the user account. -
LastUpdateDate(optional):
string(date-time)
Title:
Last Update Date
Date and time when the user account was last updated. -
LastUpdatedBy(optional):
string
Title:
Last Updated By
Maximum Length:64
User who last updated the user account. -
links(optional):
array Items
Title:
Items
Link Relations -
PersonId(optional):
integer(int64)
Title:
Person ID
Unique identifier of the person record linked to the user account. -
PersonNumber(optional):
string
Title:
Person Number
Maximum Length:30
Person number of the person record linked to the user account. -
SuspendedFlag(optional):
boolean
Title:
Suspended
Indicates whether the user, as part of termination, is suspended. If suspended, the user can be reactivated. Valid values are Yes and No. -
userAccountRoles(optional):
array User Account Roles
Title:
User Account Roles
The userAccounts resource includes all the user accounts as of the specified date. By default, the current date is retained. -
UserId(optional):
integer(int64)
Title:
User ID
Unique identifier for the user. -
Username(optional):
string
Title:
User Name
Maximum Length:100
User name, a unique identifier for a user's account.
Nested Schema : User Account Roles
Type:
array
Title:
User Account Roles
The userAccounts resource includes all the user accounts as of the specified date. By default, the current date is retained.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href(optional):
string
Title:
hyperlink reference
The URI to the related resource. -
rel(optional):
string
Title:
relation
The name of the relation to the resource instance. Example: self.
Nested Schema : userAccounts-userAccountRoles-item
Type:
Show Source
object
-
CreatedBy(optional):
string
Title:
Created By
Maximum Length:64
User who created the user account role assignment. -
CreationDate(optional):
string(date-time)
Title:
Creation Date
Date and time when the user account role assignment was created. -
LastUpdateDate(optional):
string(date-time)
Title:
Last Update Date
Date and time when the user account role assignment was last updated. -
LastUpdatedBy(optional):
string
Title:
Last Updated By
Maximum Length:64
User who last updated the user account role assignment. -
links(optional):
array Items
Title:
Items
Link Relations -
RoleCode(optional):
string
Title:
Role Code
Maximum Length:240
Technical name used to search for a specific role. -
RoleId(optional):
integer(int64)
Title:
Role ID
Unique identifier of a role. -
UserRoleId(optional):
integer(int64)
Title:
User Role ID
Unique identifier of the user role.
Examples
The following example shows how to create a user account by submitting a POST request on the REST resource using cURL.
curl -i -u "<username>:<password>" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -X POST -d <payload> "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/userAccounts"
Example of Payload
The following is an example of the payload.
{ "PersonId": 300100182158891 }
Example of Response Header
The following is an example of the response header.
Status: HTTP/1.1 201 Created Content-Type: application/vnd.oracle.adf.resourceitem+json
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "UserId" : 300100185541354, "Username" : "no-reply@example.com", "SuspendedFlag" : false, "PersonId" : 300100182158891, "PersonNumber" : "955160008191624", "CredentialsEmailSentFlag" : false, "GUID" : "8A8D68E5E062BAFCE050F50A9C4E9A63", "CreatedBy" : "HR_SPEC_ALL", "CreationDate" : "2019-06-10T19:31:32+00:00", "LastUpdatedBy" : "HR_SPEC_ALL", "LastUpdateDate" : "2019-06-10T19:31:33.452+00:00", "links": [ { ...} ] }