Creates a new user
post
/learn.rest/v1/users
Providing createMembershipResource for a User object is optional. if we provide this, you can create a membership for a newly created user in this post request.
Request
Supported Media Types
- application/json
User object that needs to be created.
Root Schema : CreateUserRequest
Type:
object
Object comprising the user parameters and the membership parameters to create a new user and to add a membership.
Show Source
-
city(optional):
string
The city of the user.
-
company(optional):
string
The User's place of work.
-
country(optional):
string
The country of the user.
-
createMembershipResourceForUser(optional):
object MembershipForCreateUserRequest
Object comprising parameters to add users to a membership.
-
department(optional):
string
The User's department.
-
email(optional):
string
The User's email address.
-
email2(optional):
string
The secondary email address.
-
employeeId(optional):
string
Email address of the employee.
-
fax(optional):
string
The fax number of the user.
-
firstName(optional):
string
Description of the user.
-
gender(optional):
string
Allowed Values:
[ "male", "female" ]
User gender. Enum for gender are: male, female -
includeInSearchFlag(optional):
boolean
Default Value:
false
Whether the user created should be visible in searches. -
jobTitle(optional):
string
The User's job title.
-
lastName(optional):
string
Description of the user.
-
managerName(optional):
string
The User's manager's name.
-
officeName(optional):
string
The User's office.
-
pager(optional):
string
The pager number of the user.
-
pagerInteractive(optional):
string
The User's interactive pager number.
-
participatesInDaylight(optional):
boolean
Default Value:
true
Whether the user's timezone observes daylight savings -
passwordValidUntilDate(optional):
string
The date until which the password is valid.
-
phoneDaytime(optional):
string
The day time number of the user.
-
phoneEvening(optional):
string
The evening number of the user.
-
phoneMobile(optional):
string
The mobile number of the user.
-
postalCode(optional):
string
The postal code of the user.
-
profession(optional):
string
-
ssn(optional):
string
The user's social security number.
-
state(optional):
string
The state of the user.
-
street1(optional):
string
The street text address of the user.
-
street2(optional):
string
The street text address of the user.
-
timeZone(optional):
string
The User's timezone
-
username(optional):
string
Username of the user
Example:
{
"username":"cwallace",
"firstName":"Chris",
"lastName":"Wallace",
"street1":"500 Oracle Parkway",
"street2":"suite 500",
"city":"Redwood Shores",
"state":"CA",
"postalCode":"94065",
"country":"US",
"officeName":"HQ",
"gender":"male",
"includeInSearchFlag":true,
"jobTitle":"Product Manager",
"managerName":"n/a",
"pagerInteractive":"n/a",
"ssn":"n/a",
"email2":"n/a",
"pager":"n/a",
"company":"Oracle",
"fax":"n/a",
"department":"Product Development",
"phoneEvening":"n/a",
"email":"info@oracle.com",
"phoneDaytime":"+1.650.506.7000",
"profession":"Product Management",
"phoneMobile":"+1.800.392.2999",
"employeeId":"n/a",
"passwordValidUntilDate":"2016-10-12T11:00:00-04:00",
"timeZone":"Eastern Standard Time",
"participatesInDaylight":true,
"createMembershipResourceForUser":{
"learncenterId":"178409",
"status":"Approved",
"validFromDate":"2019-03-04T11:00:00-04:00",
"validUntilDate":"2019-03-09T11:00:00-05:00"
}
}
Nested Schema : MembershipForCreateUserRequest
Type:
object
Object comprising parameters to add users to a membership.
Show Source
-
learncenterId:
number(int32)
Unique identifier of the LearnCenter.Example:
178409
-
status:
string
Enum for membership status are: pending, approved, removed and denied.Example:
approved
-
validFromDate(optional):
string(date-time)
Date from which the membership is valid.
-
validUntilDate(optional):
string(date-time)
Date till which the membership is until.
Example:
{
"learncenterId":"178409",
"status":"approved",
"validFromDate":"2019-03-04T11:00::00-04:00",
"validUntilDate":"2019-03-09T11:00:00-05:00"
}
Security
-
auth: basic
Type:
basic
Description:Basic Authentication
Response
Supported Media Types
- application/xml
- application/json
201 Response
New user created.
Root Schema : UsersResponse
Type:
Show Source
object
-
count(optional):
number
Example:
100
-
hasMore(optional):
boolean
Example:
true
-
items(optional):
array items
-
limit(optional):
number
Example:
100
-
links(optional):
array links
Nested Schema : User
Type:
Show Source
object
-
city(optional):
string
Example:
Redwood Shores
-
company(optional):
string
Example:
oracle
-
country(optional):
string
Example:
USA
-
createdDate(optional):
string(datetime)
Example:
2013-10-12T11:00:00-04:00
-
department(optional):
string
Example:
sales
-
email(optional):
string
Example:
info@example.com
-
email2(optional):
string
Example:
-
employeeId(optional):
string
Example:
H123
-
fax(optional):
string
Example:
n/a
-
firstName(optional):
string
Example:
cwal
-
gender(optional):
string
Allowed Values:
[ "male", "female" ]
enum for gender are: male, femaleExample:male
-
id(optional):
number
Example:
123123
-
includeInSearchFlag(optional):
boolean
Example:
false
-
jobTitle(optional):
string
Example:
sales manager
-
lastAccesedDate(optional):
string(datetime)
Example:
2015-11-12T11:00:00-04:00
-
lastName(optional):
string
Example:
lace
-
lastUpdatedByUser(optional):
array lastUpdatedByUser
-
lastUpdatedByUserId(optional):
number
Example:
123123
-
lastUpdatedDate(optional):
string(datetime)
Example:
2017-10-12T11:00:00-04:00
-
managerName(optional):
string
Example:
n/a
-
officeName(optional):
string
Example:
n/a
-
pager(optional):
string
Example:
n/a
-
pagerInteractive(optional):
string
Example:
n/a
-
passwordValidUntilDate(optional):
string(datetime)
Example:
2016-10-12T11:00:00-04:00
-
phoneDaytime(optional):
string
Example:
+1.800.392.2999
-
phoneEvening(optional):
string
Example:
n/a
-
phoneMobile(optional):
string
Example:
+1.800.392.2999
-
postalCode(optional):
string
Example:
94065
-
profession(optional):
string
Example:
software engineer
-
ssn(optional):
string
Example:
n/a
-
state(optional):
string
Example:
CA
-
street1(optional):
string
Example:
500 Oracle Parkway
-
street2(optional):
string
Example:
suite 500
-
username(optional):
string
Username of the userExample:
cwallace
Nested Schema : UserLink
Type:
Show Source
object
-
href(optional):
string
Example:
{url}/learn.rest/v1/users/456
-
rel(optional):
string
Example:
canonical
Nested Schema : items
Type:
Show Source
object
Example:
[
{
"rel":"canonical",
"href":"{url}/learn.rest/v1/users"
},
{
"rel":"first",
"href":"{url}/v1/users?limit=100&offset=0"
},
{
"rel":"prev",
"href":"{url}/learn.rest/v1/users?limit=100&offset=0"
},
{
"rel":"next",
"href":"{url}/learn.rest/v1/users?limit=100&offset=10"
},
{
"rel":"last",
"href":"{url}/learn.rest/v1/users?limit=100&offset=1200"
}
]
400 Response
Request has incorrect syntax or does not contain a field that is required.
409 Response
Another resource with the same identifier already exists.
500 Response
Internal server error.