Add User

Modified on Wed, 11 Jun at 12:50 PM

Description: 

This API is use to Create New Users


API Endpoint: 

/ws/userrolemanagement

 

Method: 

POST

 

Header: 

 

Field

Value

SOAPAction

/ws/datasetManagement.wsdl

 

Request:


XML Element

Type

Value

<wsse:Username>

String

Smarten username

<wsse:Password>

String

Smarten user password

 <username>

String

Username for new user

<password>

String

Password of new user 

<emailId>

String

Email Id of the new user

<roleId>

Integer

Id of the role to be assigned if any

<roleName>

String

Role Name to be assigned if any

<roleDesc>

String

Role description if any


Request Example: 


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://www.elegantjbi.com/ws/userrolemanagement">

   <soapenv:Header>

      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

         <wsse:UsernameToken wsu:Id="UsernameToken-F6E31F57B4C89D14B416914907173932">

            <wsse:Username>username</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soapenv:Header>

   <soapenv:Body>

      <user:addUserRequest>

         <!--1 or more repetitions:-->

         <userInfo>

            <userTypeBI>userType</userTypeBI>

            <userActive>Active</userActive>

            <password>password</password>

            <emailId>test@gmail.com</emailId>

            <!--Zero or more repetitions:-->

            <roleNames>

               <roleId>roleId</roleId>

               <roleName>roleName</roleName>

               <roleDesc>roleDesc</roleDesc>

               <!--1 or more repetitions:-->

               <roleFunctionalRights>

                  <moduleId>1</moduleId>

                  <permissons>All</permissons>

               </roleFunctionalRights>

            </roleNames>

            <username>username</username>

            <personName>personName</personName>

            <deptName>deptName</deptName>

            <ssdpUser>test</ssdpUser>

            <smartenInsightuser></smartenInsightuser>

            <isMobileUser></isMobileUser>

         </userInfo>

      </user:addUserRequest>

   </soapenv:Body>

</soapenv:Envelope>


Response:  

 

Return a response with SOAP XML as object. 

 

XML Element 

Type

Value

<ns2:statusCode>

String

Return the API status response

 

Response Example: 

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

    <SOAP-ENV:Header>

        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">

            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1747337693638-1069532304">

                <wsse:Username>user</wsse:Username>

                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Wqx/yqziNcQCiB7fVsCgJqCGVBc=</wsse:Password>

                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">nUgj7chuGG1xQWqT8EdwW9ae</wsse:Nonce>

                <wsu:Created>2025-06-03T07:22:36.716Z</wsu:Created>

            </wsse:UsernameToken>

        </wsse:Security>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

        <ns3:addUserResponse xmlns:ns3="http://www.elegantjbi.com/ws/userrolemanagement">

            <status>

                <statusCode>Success</statusCode>

            </status>

        </ns3:addUserResponse>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

Postman Example: 

 

You can import the example below into Postman. 

 

curl --location 'https://<SMARTENURL>/smarten/ws/RoleManagementService' \

--header 'Content-Type: text/xml' \

--header 'Cookie: JSESSIONID=EtzEQQbsvBwacW1IovMoH2HB0_8ZK8LgiCDHrYgL.ip-172-31-8-13' \

--data-raw '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://www.elegantjbi.com/ws/userrolemanagement">

   <soapenv:Header>

      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

         <wsse:UsernameToken wsu:Id="UsernameToken-F6E31F57B4C89D14B416914907173932">

            <wsse:Username>username</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soapenv:Header>

   <soapenv:Body>

      <user:addUserRequest>

         <!--1 or more repetitions:-->

         <userInfo>

            <userTypeBI>userType</userTypeBI>

            <userActive>Active</userActive>

            <password>password</password>

            <emailId>test@gmail.com</emailId>

            <!--Zero or more repetitions:-->

            <roleNames>

               <roleId>1</roleId>

               <roleName>roleName</roleName>

               <roleDesc>roleDesc</roleDesc>

               <!--1 or more repetitions:-->

               <roleFunctionalRights>

                  <moduleId>1</moduleId>

                  <permissons>All</permissons>

               </roleFunctionalRights>

            </roleNames>

            <username>FORAPI</username>

            <personName>TestUser</personName>

            <deptName>xyz</deptName>

            <ssdpUser>test</ssdpUser>

            <smartenInsightuser>?</smartenInsightuser>

            <isMobileUser>?</isMobileUser>

         </userInfo>

      </user:addUserRequest>

   </soapenv:Body>

</soapenv:Envelope>'

 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article