-
Notifications
You must be signed in to change notification settings - Fork 17
5. Manage Users
Import users
Learn how you can import users from a configuration file into the API-Manager. This approach is following the Desired vs. Actual state approach.
Export and report users
You can export one or more users from a running API-Manager or just get a list/report of users. You can filter the users based on different criteria.
The Axway API-Management CLI tool allows you to import or basically replicate the desired Users into the API-Manager to become the actual state.
To get started use the CLI with the following command: apim user import -h
which provides you with a complete usage.
The mandatory required parameters are the stage (alternatively host/username/password) and the API-Configuration file. The following examples should help you to get started:
Command | Comment/Description |
---|---|
apim user import -s qa -c SampleUser.json |
Replicates a user into the QA-Stage |
{
"name" : "Dave Dalton",
"loginName" : "dave",
"email" : "[email protected]",
"role" : "user",
"organization" : "Partners",
"type" : "external",
"state" : "approved",
"createdOn" : 1599555999322,
"enabled" : true,
"description" : "Dave is the Developer"
}
The Axway API-Management CLI tool allows you to export Users from the API-Manager for instance in order to promote them into the next stage, put them under version-control or just to update the configuration.
To get started use the CLI with the following command: apim user get -h
which provides you with a complete usage.
You can filter the list of Users. Multiple filters are combined with AND. The following provides you with a few examples. Please check the usage for all filter options:
Command | Comment/Description |
---|---|
apim user get -s prod |
Lists ALL users with standard information on the console |
apim user get -s qa -name "*John*" -ultra |
Gets users named John and prints them with all available information |
By default the get
operation is using the console view and generates a table representation of the exported data. However, you can provide a --format
or -f
parameter to the get
operation to control the export format you want.
This format gives you the JSON format as it's required to import the organization with apim user import
. For each exported user an export folder is created.
Command | Comment/Description |
---|---|
apim user get -s prod -id 8f7bd987-0736-43b.... -o json |
Export the user with the provided ID into the current folder. |
apim user get -s qa -t C:/axway/users -o json |
Gets All applications from the QA-Stage exported into the given target folder. For each exported user a folder is created automatically within the target folder. |
You can provide the option: -deleteTarget
if you would like to replace existing folders.