Import Descriptions
Import a RSA G&L description file using either a file on the server or in the request body.
POST https://instance.securid.com/aveksa/command.submit?cmd=importDescriptions
Request
Parameters
importDescriptions | |
filename | The filename in the import directory on the G&L server. The import directory is specified on the web services configuration page. Alternatively, the data can be sent as part of the request body. This option is not recommended and file should be passed using the POST body |
format | The input file format. Valid values :
xml - Extensible Markup Language |
behavior | The behavior when import file contains existing descriptions. Valid values : - skip - overwrite - fail |
appscope | true, false Indicates if the application scope column is supported or not in CSV file format. (Default) false |
Headers
Bearer token | |
Accept | application/json |
Content-Type | application/json |
Body
Descriptions XML data
Response
Parameters
type | Executed command name |
Examples
Request
- Curl
- Python
- Node.js
curl -L -X POST "https://instance.securid.com/aveksa/command.submit?cmd=importDescriptions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d "<BusinessDescriptions>
<BusinessDescription type=\"Application\" exactmatch=\"true\" filter=\"Aha!\">
<AltName>Aha!</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type=\"Application\" exactmatch=\"true\" filter=\"Asana\">
<AltName>Asana</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type=\"Application\" exactmatch=\"true\" application=\"Assigned SecurID Tokens\" filter=\"Assigned SecurID Tokens\">
<AltName>Assigned SecurID Tokens</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type=\"Entitlement\" exactmatch=\"true\" filter=\"Active Directory : Synchronize\">
<AltName>Active Directory : Synchronize</AltName>
<Tooltip/>
<LongDesc>Triggers attribute synchronization for Active Directory when assigned</LongDesc>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type=\"GlobalRole\" exactmatch=\"true\" application=\"AveksaRoles\" filter=\"Privileged Base User\">
<AltName>Privileged Base User</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
</BusinessDescriptions>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
xml_payload = """
<BusinessDescriptions>
<BusinessDescription type="Application" exactmatch="true" filter="Aha!">
<AltName>Aha!</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type="Application" exactmatch="true" filter="Asana">
<AltName>Asana</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
</BusinessDescriptions>
"""
params = {
"cmd": "importDescriptions",
"format": "xml",
"behavior": "overwrite"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/xml'
}
response = requests.post(url, data=xml_payload, params=params, headers=headers)
if response.status_code == 200:
print(response.text)
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit?cmd=importDescriptions";
const params = {
"cmd": "importDescriptions",
"format": "xml",
"behavior": "overwrite"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
const data = `<BusinessDescriptions>
<BusinessDescription type="Application" exactmatch="true" filter="Aha!">
<AltName>Aha!</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type="Application" exactmatch="true" filter="Asana">
<AltName>Asana</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type="Application" exactmatch="true" application="Assigned SecurID Tokens" filter="Assigned SecurID Tokens">
<AltName>Assigned SecurID Tokens</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type="Entitlement" exactmatch="true" filter="Active Directory : Synchronize">
<AltName>Active Directory : Synchronize</AltName>
<Tooltip/>
<LongDesc>Triggers attribute synchronization for Active Directory when assigned</LongDesc>
<HelpURL/>
</BusinessDescription>
<BusinessDescription type="GlobalRole" exactmatch="true" application="AveksaRoles" filter="Privileged Base User">
<AltName>Privileged Base User</AltName>
<Tooltip/>
<LongDesc/>
<HelpURL/>
</BusinessDescription>
</BusinessDescriptions>`;
axios.post(url, data, { params, headers })
.then(response => {
if (response.status === 200) {
console.log("Import successful");
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 412 Incorrect Config
- 500 Missing Parameters
- 500 Format Mismatch
<html>
<head>
<title>Error</title>
</head>
<body>The filename parameter cannot be used until the import directory is configured
in the Web Services configuration screen.
Query String=cmd=importDescriptions&format=xml&filename=myfile.xml</body>
</html>
<!-- Neither the filename parameter nor the POST body contains the descriptions mapping data -->
<html>
<head>
<title>Error</title>
</head>
<body>java.lang.NullPointerException</body>
</html>
<!-- When data is XML format and format header is csv -->
<html>
<head>
<title>Error</title>
</head>
<body>com.aveksa.server.core.description.BusinessDescriptionException: Line 1:
The "TYPE" column is an invalid value.
TYPE can be one of the following values:
Application/Directory, ApplicationRole, Entitlement, GlobalRole, UserGroup</body>
</html>