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
Body ()
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
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
Example:
{
    "learncenterId":"178409",
    "status":"approved",
    "validFromDate":"2019-03-04T11:00::00-04:00",
    "validUntilDate":"2019-03-09T11:00:00-05:00"
}
Security
Back to Top

Response

Supported Media Types

201 Response

New user created.
Body ()
Root Schema : UsersResponse
Type: object
Show Source
Example:
{
    "items":[
        {
            "id":947334,
            "username":"cwallace",
            "nickname":"cw",
            "firstName":"Christopher",
            "lastName":"Wallace",
            "street1":"500 Oracle Parkway",
            "street2":"n/a",
            "city":"Redwood Shores",
            "postalCode":"94065",
            "state":"CA",
            "country":"US",
            "phoneDaytime":"+1.650.506.7000",
            "phoneEvening":"n/a",
            "phoneMobile":"+1.800.392.2999",
            "fax":"n/a",
            "pager":"n/a",
            "pagerInteractive":"n/a",
            "email":"info@oracle.com",
            "email2":"n/a",
            "gender":"male",
            "ssn":"n/a",
            "employeeId":"n/a",
            "company":"Oracle",
            "officeName":"HQ",
            "department":"Product Development",
            "jobTitle":"Product Manager",
            "profession":"Product Management",
            "managerName":"n/a",
            "createdDate":{
            },
            "lastAccessedDate":{
            },
            "lastUpdatedDate":{
            },
            "lastUpdatedByUserId":947334,
            "lastUpdatedByUser":{
                "links":[
                    {
                        "rel":"canonical",
                        "href":"{url}/learn.rest/v1/users/{userId}"
                    }
                ]
            },
            "passwordValidUntilDate":{
            },
            "includeInSearchFlag":true,
            "memberships":{
                "links":[
                    {
                        "rel":"canonical",
                        "href":"{url}/learn.rest/v1/users/{userId}/memberships"
                    }
                ]
            },
            "links":[
                {
                    "rel":"canonical",
                    "href":"{url}/learn.rest/v1/users/{userId}"
                }
            ]
        },
        {
            "...":null
        }
    ],
    "totalResults":1200,
    "limit":100,
    "count":100,
    "hasMore":true,
    "links":[
        {
            "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"
        }
    ]
}
Nested Schema : items
Type: array
Show Source
Nested Schema : User
Type: object
Show Source
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"
}
Nested Schema : lastUpdatedByUser
Type: array
Show Source
Nested Schema : UserLinkItems
Type: object
Show Source
Example:
{
    "rel":"canonical",
    "href":"{url}/learn.rest/v1/users/456"
}

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.
Back to Top