Add Users

You can use a POST request to add domain level users such as Operators, Deployers, and Monitors. The following steps show how to build this POST request using cURL to create a user and add the user to a member group:
  1. Identify the host name and port of your domain's Administration Server and construct the POST request using the /management/weblogic/{version}/serverConfig endpoint. This WebLogic Server request uses the following URL structure:
    http://localhost:port/management/weblogic/{version}/serverConfig/securityConfiguration/realms/myrealm/authenticationProviders/DefaultAuthenticator/createUser
  2. Specify the headers on the cURL command line:
    • -H X-Requested-By:MyClient

    • -H Accept:application/json

    • -H Content-Type:application/json

  3. Specify the userName, password, and description of the new user in the JSON format in the request body using the -d option as shown in the following example.

    -d "{
      userName:    'deployer',
      password:    'deployer123',
      description: 'A domain level deployer'
    }" \

The following sample shows the complete POST request for creating a user, deployer.

curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
  userName:    'deployer',
  password:    'deployer123',
  description: 'A domain level deployer'
}" \
-X POST http://localhost:port/management/weblogic/{version}/serverConfig/securityConfiguration/realms/myrealm/authenticationProviders/DefaultAuthenticator/createUser

The POST request returns the following response:

HTTP/1.1 200 OK
Response Body:
{}

Adding the User to the Group

  1. Construct the POST request using the /management/weblogic/{version}/serverConfig endpoint. This WebLogic Server request uses the following URL structure:
    http://localhost:port/management/weblogic/{version}/serverConfig/securityConfiguration/realms/myrealm/authenticationProviders/DefaultAuthenticator/addMemberToGroup
  2. Specify the headers on the cURL command line:
    • -H X-Requested-By:MyClient

    • -H Accept:application/json

    • -H Content-Type:application/json

  3. Specify the groupName and memberUserOrGroupName in the JSON format in the request body using the -d option as shown in the following example:
    -d "{
      groupName: 'Deployers',
      memberUserOrGroupName: 'deployer'
    }" \

The following sample shows the complete POST request for adding the user to the group, Deployers.

curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
  groupName: 'Deployers',
  memberUserOrGroupName: 'deployer'
}" \
-X POST http://localhost:port/management/weblogic/{version}/serverConfig/securityConfiguration/realms/myrealm/authenticationProviders/DefaultAuthenticator/addMemberToGroup

The POST request returns the following response:

HTTP/1.1 200 OK
Response Body:
{}