User operations
This section describes the adapter requests and responses for the User operations.
Tip
Use the <items>
element when you call an adapter from an out-of-the-box process in TrueSight Orchestration Development Studio. Use the adapter request XML when you create a custom process by using the Call Adapter activity in TrueSight Orchestration Development Studio.
Get Users
The Get Users operation retrieves the list of users in the TrueSight Network Automation database.
The following table describes the input elements for the Get Users operation.
Input elements for the adapter request for the Get Users operation
Input parameter name | Description | Type | Required |
---|---|---|---|
<operation-name> | Specifies the name of the operation that retrieves all users. Process path: Valid value: | - | - |
adapter name | Specifies the name of the adapter to use to run the request. Default value: BCANActor | String | No |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation. Sample:
Contains the following child elements:
| XML | No |
The following figure shows a sample adapter request for the Get Users operation.
Sample adapter request for the Get Users operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>get-users</operation-name>
<parameters />
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample Get Users operation.
Adapter response for the sample Get Users operation
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>
<element>
<account-created-on>1536044407501</account-created-on>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Guest</element>
</values>
</element>
</dynamic-fields>
<email-address>none</email-address>
<enabled>false</enabled>
<encrypted-password>****MASKED****</encrypted-password>
<force-password-change>****MASKED****</force-password-change>
<key>986992347-2</key>
<last-password-change>****MASKED****</last-password-change>
<password-never-expires>****MASKED****</password-never-expires>
<realm-role-name>com.bmc.bcan.engine.user.security.User.DEFAULT_REALM_ROLE_NAME</realm-role-name>
<roles>
<element>Viewer</element>
</roles>
<root-account>false</root-account>
<user-name>guest</user-name>
</element>
<element>
<account-created-on>1556173562398</account-created-on>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Dev1User</element>
</values>
</element>
</dynamic-fields>
<email-address>Dev1User@bmc.com</email-address>
<enabled>true</enabled>
<encrypted-password>****MASKED****</encrypted-password>
<force-password-change>****MASKED****</force-password-change>
<key>98699527-11</key>
<last-password-change>****MASKED****</last-password-change>
<password-never-expires>****MASKED****</password-never-expires>
<realm-role-name>com.bmc.bcan.engine.user.security.User.DEFAULT_REALM_ROLE_NAME</realm-role-name>
<roles>
<element>Administrator</element>
</roles>
<root-account>false</root-account>
<user-name>Dev1User</user-name>
</element>
<element>
<account-created-on>1536044407465</account-created-on>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>System Administrator</element>
</values>
</element>
</dynamic-fields>
<email-address>none</email-address>
<enabled>true</enabled>
<encrypted-password>****MASKED****</encrypted-password>
<force-password-change>****MASKED****</force-password-change>
<key>98699527-1</key>
<last-password-change>****MASKED****</last-password-change>
<last-successful-login>1556522273431</last-successful-login>
<password-history>
<element>d577adc54e95f42f15de2e7c134669888b7d6fb74df97bd62cb4f5b73c281db4</element>
</password-history>
<password-never-expires>****MASKED****</password-never-expires>
<realm-role-name>com.bmc.bcan.engine.user.security.User.DEFAULT_REALM_ROLE_NAME</realm-role-name>
<roles>
<element>Administrator</element>
</roles>
<root-account>true</root-account>
<user-name>sysadmin</user-name>
</element>
</output>
</parameters>
</bmc-configuration-automation-networks-response>
Get User by Key
The Get User by Key operation retrieves the user details from the TrueSight Network Automation database by using a specific user key.
The following table describes the elements for the <items>
XML element and adapter request for the Get Users by Key operation.
Elements for the <items>
XML element and adapter request for the Get Users by Key operation
Element | Definition | Required |
---|---|---|
<user-key> | Specifies the user key required to retrieve the user details. | Yes |
The following figure shows a sample <items>
XML element for the Get Users by Key operation.
<items>
XML element for the Get Users by Key operation
<items>
<item>
<parameters>
<user-key>9861234527-11</user-key>
</parameters>
</item>
</items>
The following table describes the input elements for the Get Users by Key operation.
Input elements for the Get Users by Key operation
Input name | Description | Type | Required |
---|---|---|---|
adapter name | Specifies the name of the adapter to use to run the request. Default value: BCANActor | String | No |
items | Specifies the | XML | Yes |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation.
Example
| XML | No |
The following figure shows a sample adapter request for the Get Users by Key operation.
Sample adapter request for the Get Users by Key operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>get-user-by-key</operation-name>
<parameters>
<user-key>9861234527-11</user-key>
</parameters>
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample Get Users by Key operation.
Adapter response for the sample Get Users by Key operation
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>
<account-created-on>1556173562398</account-created-on>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>User Admin</element>
</values>
</element>
</dynamic-fields>
<email-address>UserAdmin@gmail.com</email-address>
<enabled>true</enabled>
<encrypted-password>****MASKED****</encrypted-password>
<force-password-change>****MASKED****</force-password-change>
<key>9861234527-11</key>
<last-password-change>****MASKED****</last-password-change>
<password-never-expires>****MASKED****</password-never-expires>
<realm-role-name>com.bmc.bcan.engine.user.security.User.DEFAULT_REALM_ROLE_NAME</realm-role-name>
<roles>
<element>Administrator</element>
</roles>
<root-account>false</root-account>
<user-name>aoadmin</user-name>
</output>
</parameters>
</bmc-configuration-automation-networks-response>
Get User by Name
The Get Users by Name operation retrieves the details for a user TrueSight Network Automation database by using the specified user name.
The following table describes the elements for the <items>
XML element and adapter request for the Get Users by Name operation.
Elements for the <items>
XML element and adapter request for the Get Users by Name operation
Element | Definition | Required |
---|---|---|
<name> | Specifies the name of the user | Yes |
The following figure shows a sample <items>
XML element for the Get Users by Name operation.
<items>
XML element for the Get Users by Name operation
<items>
<item>
<parameters>
<name>Allen</name>
</parameters>
</item>
</items>
The following table describes the input elements for the Get Users by Name operation.
Input elements for the Get Users by Name operation
Input name | Description | Type | Required |
---|---|---|---|
adapter name | Specifies the name of the adapter to use to run the request. Default value: BCANActor | String | No |
items | Specifies the | XML | Yes |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation.
Example
| XML | No |
The following figure shows a sample adapter request for the Get Users by Name operation.
Sample adapter request for the Get Users by Name operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>get-user-by-name</operation-name>
<parameters>
<name>Allen</name>
</parameters>
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample Get Users by Name operation.
Adapter response for the sample Get Users by Name operation
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>
<account-created-on>1556628155569</account-created-on>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Allen Albrook</element>
</values>
</element>
</dynamic-fields>
<email-address>ab@bmc.com</email-address>
<enabled>true</enabled>
<encrypted-password>****MASKED****</encrypted-password>
<force-password-change>****MASKED****</force-password-change>
<key>98699527-29</key>
<last-password-change>****MASKED****</last-password-change>
<last-successful-login>1556628275403</last-successful-login>
<password-never-expires>****MASKED****</password-never-expires>
<realm-role-name>com.bmc.bcan.engine.user.security.User.DEFAULT_REALM_ROLE_NAME</realm-role-name>
<roles>
<element>Administrator</element>
</roles>
<root-account>false</root-account>
<user-name>Allen</user-name>
</output>
</parameters>
</bmc-configuration-automation-networks-response>
Add User
The Add User operation add a new user in TrueSight Network Automation.
The following table describes the elements for the <items>
XML element and adapter request for the Add User operation.
Elements for the <items>
XML element and adapter request for the Add User operation
Element | Definition | Type | Required |
---|---|---|---|
<user-dto> | Contains the following child elements for providing additional information
| XML | Yes |
<dynamic-fields> | Specifies the XML to provide the full name of a new user in a key-value pair.
Example
| XML | Yes |
<email-address> | Specifies the email address of the new user | String | Yes |
<enabled> | Specifies whether to enable the user after creation. Valid values: true (default), false. | Boolean | No |
<force-password-change> | Specifies whether to make the user change the password after creation. Valid values: true (default), false. | Boolean | No |
<password-never-expires> | Specifies whether to create a user with a password that never expires. Valid values: true, false (default). | Boolean | No |
<realm-role-name> | Specifies the name of the realm to be used. | String | No |
<roles> | Specifies the role name, in XML. You can assign more than one role to a user.
Example
| XML | Yes |
<root-account> | Specifies whether the user should have a root account. Valid values: true, false (default). | Boolean | No |
<user-name> | Specifies the username for the new user. | String | Yes |
<cleartext-password> | Specifies the password for the new user. | String | Yes |
The following figure shows a sample <items>
XML element for the Add User operation.
<items>
XML element for the Add User operation
<items>
<item>
<parameters>
<user-dto>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Abhi Kumar</element>
</values>
</element>
</dynamic-fields>
<email-address>ag@bmc.com</email-address>
<enabled>true</enabled>
<force-password-change>false</force-password-change>
<password-never-expires>true</password-never-expires>
<realm-role-name>a</realm-role-name>
<roles>
<!--zero or more array elements follow-->
<element>Administrator</element>
</roles>
<root-account>false</root-account>
<user-name>aguser</user-name>
</user-dto>
<cleartext-password>adminpassword</cleartext-password>
</parameters>
</item>
</items>
The following table describes the input elements for the Add User operation.
Input elements for the Add User operation
Input name | Description | Type | Required |
---|---|---|---|
adapter name | Specifies the name of the adapter to use to run the request. Default value: BCANActor | String | No |
items | Specifies the | XML | Yes |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation.
Example
| XML | No |
The following figure shows a sample adapter request for the Add User operation.
Sample adapter request for the Add User operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>add-user</operation-name>
<parameters>
<user-dto>
<dynamic-fields>
<!--zero or more array elements follow-->
<element>
<name>Full Name</name>
<values>
<!--zero or more array elements follow-->
<element>Abhi</element>
</values>
</element>
</dynamic-fields>
<email-address>ag@bmc.com</email-address>
<enabled>true</enabled>
<force-password-change>false</force-password-change>
<password-never-expires>true</password-never-expires>
<roles>
<!--zero or more array elements follow-->
<element>Administrator</element>
</roles>
<root-account>false</root-account>
<user-name>aggupta</user-name>
</user-dto>
<cleartext-password>admin123</cleartext-password>
</parameters>
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample Add User operation.
Adapter response for the sample Add User operation
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>98699527-22</output>
</parameters>
</bmc-configuration-automation-networks-response>
Modify User
The Modify User edits a user details and permissions in TrueSight Network Automation.
The following table describes the elements for the <items>
XML element and adapter request for the Modify User operation.
Elements for the <items>
XML element and adapter request for the Modify User operation
Element | Definition | Type | Required |
---|---|---|---|
<user-dto> | Contains the following child elements for modifying additional information
| XML | Yes |
<dynamic-fields> | Specifies the XML to provide the full name of a new user in a key-value pair.
Example
| XML | No |
<email-address> | Specifies the email address of the new user | String | Yes |
<enabled> | Specifies whether to enable the user after creation. Valid values: true, false. | Boolean | No |
<force-password-change> | Specifies whether to make the user change the password after creation. Valid values: true, false. | Boolean | No |
<password-never-expires> | Specifies whether to create a user with a password that never expires. Valid values: true, false. | Boolean | No |
<key> | Specifies the user key for the user that you want to modify the details for. | String | Yes |
<roles> | Specifies the role name, in XML. You can assign more than one role to a user.
Example
| XML | Yes |
<root-account> | Specifies whether the user should have a root account. Valid values: true, false. | Boolean | No |
<user-name> | Specifies the username for the new user. | String | Yes |
<cleartext-password> | Specifies the password for the new user. | String | No |
The following figure shows a sample <items>
XML element for the Modify User operation.
Sample <items> XML element for the Modify User operation
<items>
<item>
<parameters>
<user-dto>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Allen B.</element>
</values>
</element>
</dynamic-fields>
<email-address>allb@bmc.com</email-address>
<enabled>true</enabled>
<key>98699523-11</key>
<password-never-expires>false</password-never-expires>
<roles>
<element>Administrator</element>
<element>Manager</element>
</roles>
<root-account>false</root-account>
<user-name>allb</user-name>
</user-dto>
<cleartext-password>password</cleartext-password>
</parameters>
</item>
</items>
The following table describes the input elements for the Modify User operation.
Input elements for the Modify User operation
Input name | Description | Type | Required |
---|---|---|---|
adapter name | Specifies the name of the adapter to use to run the request. Default value: BCANActor | String | No |
items | Specifies the | XML | Yes |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation.
Example
| XML | No |
The following figure shows a sample adapter request for the Modify User operation.
Sample adapter request for the Modify User operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>modify-user</operation-name>
<parameters>
<user-dto>
<dynamic-fields>
<element>
<name>Full Name</name>
<values>
<element>Allen B.</element>
</values>
</element>
</dynamic-fields>
<email-address>allb@bmc.com</email-address>
<enabled>true</enabled>
<key>98699523-11</key>
<password-never-expires>false</password-never-expires>
<roles>
<element>Administrator</element>
<element>Manager</element>
</roles>
<root-account>false</root-account>
<user-name>allb</user-name>
</user-dto>
<cleartext-password>password</cleartext-password>
</parameters>
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample adapter request.
Adapter response for the sample adapter request
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>true</output>
</parameters>
</bmc-configuration-automation-networks-response>
The following figure illustrates the response in case of an error.
Adapter error response for a sample request
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>
<metadata>
<status>error</status>
<error>Error occurred processing request data Summary: Failed to call a web service.
Caused by:
Summary: Cannot change the username.
</error>
</metadata>
</output>
</parameters>
Delete User
The Delete User removes a user (that matches a specified user key) in TrueSight Network Automation.
The following table describes the elements for the <items>
XML element and adapter request for the Delete User operation.
Elements for the <items>
XML element and adapter request for the Delete User operation
Element | Definition | Type | Required |
---|---|---|---|
<user-key> | Specifies the user key required to remove the user. | String | Yes |
The following figure shows a sample <items>
XML element for the Delete User operation.
<items>
XML element for the Delete User operation
<items>
<item>
<parameters>
<user-key>9861234527-11</user-key>
</parameters>
</item>
</items>
The following table describes the input elements for the Delete User operation.
Input elements for the Delete User operation
Input | Description | Type | Required |
---|---|---|---|
items | Specifies the | XML | Yes |
connection parameters | Contains the additional connection parameters required for the adapter to connect to TrueSight Network Automation.
Example
Contains the following child elements:
| XML | No |
The following figure shows a sample adapter request for the Delete User operation.
Sample adapter request for the Delete User operation
<bmc-configuration-automation-networks-request>
<entity>user</entity>
<request>
<operation-name>delete-user</operation-name>
<parameters>
<user-key>9861234527-11</user-key>
</parameters>
</request>
</bmc-configuration-automation-networks-request>
The following figure illustrates the response for the sample adapter request.
Adapter response for the sample adapter request
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters />
</bmc-configuration-automation-networks-response>
The following figure shows the response when an invalid key is specified.
Adapter error response in case of invalid key
<bmc-configuration-automation-networks-response>
<metadata>
<status>success</status>
</metadata>
<parameters>
<output>
<metadata>
<status>error</status>
<error>Error occurred processing request data Summary: Failed to call a web service.
Caused by:
Summary: Errors occurred while deleting user.
</error>
</metadata>
</output>
</parameters>
</bmc-configuration-automation-networks-response>
Comments
Log in or register to comment.