Command-Line API (CLI)
Node.js is fully extensible and has several CLI options to execute scripts and other runtime options. It currently supports RabbitMQ, MongoDB, Aerobase, history and notifications providers, and related commands.
To manually run the commands listed in the table below:
-
Open a Command Prompt.
-
Go to the admin-cli folder:
C:\Nintex\PDServer\Support\kryon-admin-cli
. -
Run these commands:
set CONFIG_DIR=C:\nintex\config
set NODE_ENV=prod
set KRYON_ENC_CFG=C:\nintex\config\prod\general\kryon-decrypt.json
set NODE_PATH=C:\nintex\PDServer\MicroServices\node_modules
-
Run the relevant execution path from the table below:
Command Name | Provider | Command Description | Parameters | Execution |
---|---|---|---|---|
addClient | Aerobase | Adds a client. If the public client is set to false, the system will generate a client secret credential that will be output in a file client-data.txt. |
|
Copy Command
|
addRoleClientAndUser | Aerobase | Adds a new role, clientId, and user. |
|
Copy
Command
|
addUser | RabbitMQ | Adds a user to RabbitMQ. |
|
Copy
Command
|
addUser | Aerobase |
Adds a user on Aerobase with a given existing role:
|
|
Copy
Command
Copy
Command
|
changeUserPassword | Aerobase |
Changes an existing user password.
|
|
Copy
Command
|
createAdminUser | MongoDB | Creates MongoDB admin user. |
|
Copy
Command
|
createDatabase | MongoDB | Creates MongoDB database. |
|
|
createIndex | MongoDB | Creates MongoDB index. |
|
Copy
Command
|
createQueue | RabbitMQ | Creates RabbitMQ queue. |
|
Copy
Command
|
createSecretsClientsAndRoles | Aerobase | Creates kryon-secrets, kryon-secrets-admin, and kryon-secrets-reader clients with secrets-admin and secrets-reader roles. |
|
Copy
Command
|
createTTLCollection | MongoDB | Creates a MongoDB collection with a TTL (Time To Live) index (based on the time it was created. For example, if you set it with TTL 60 seconds, it will be automatically deleted 60 seconds after it was created - mostly createdAt). |
|
Copy
Command
|
createUser | MongoDB | Creates MongoDB user. |
|
Copy
Command
|
dbCreate | pdSetup | Creates Nintex Process Discovery database. |
|
Copy
Command
|
decryptPhrase | vault | Decrypts a phrase using PD vault encryption. |
|
Copy
Command
|
deleteDuplicates | MongoDB | Removes duplicates from a collection. |
|
Copy
Command
|
deleteQueue | RabbitMQ | Deletes RabbitMQ queue. |
|
Copy
Command
|
encryptPhrase | vault | Encrypts a phrase using PD vault encryption. |
|
|
ensureAerobaseClientTenantId | userMigration | Adds tenantId protocol-mapper to clients specified in the aerobase_auth.json config file. |
|
Copy
Command
|
ensureAerobaseTenantGroups | userMigration | Creates/updates tenant groups according to data from LeoCompanies table. |
|
Copy
Command
|
ensureFederationAttributeMapper | userMigration | Adds hardcoded-attribute-mapper according to data in LeoFederationGroups table. |
|
Copy
Command
|
ensureFederationGroupMapper | userMigration | Adds hardcoded-ldap-group-mapper according to data in LeoFederationGroups table. |
|
Copy
Command
|
fixCache | rawData | If the cache has had a mismatch for some reason, or double reporting, this fixes it. Currently only supported in MongoDB. |
|
|
fixDashboardData | rawData | Fixes PD dashboard data. |
|
|
generateClientSecret | Aerobase | Generates a client secret in a file client-data.txt
format: {"clientId":"kryon-server","data":{"type":"secret","value":"d7884f9c-5023-45a9-9ddf-5d244e2d0bfe"}} |
|
Copy
Command
|
generateProxyFile | proxyClient | Generates a client proxy file. | ||
getClientGuid | Aerobase | Gets client guid in a file client-data.txt
format: {"clientId":"kryon-server","clientGuid":"53c85377-697c-400d-86d9-440bf4f53ff3"} |
|
Copy
Command
|
getClientSecret | Aerobase | Gets client secret in a file client-data.txt
format: {"clientId":"kryon-server","data":{"type":"secret","value":"d7884f9c-5023-45a9-9ddf-5d244e2d0bfe"}} |
|
Copy
Command
|
getIndexes | MongoDB | Gets a list of table indexes. |
|
|
getOcrStats | algoData |
Exports words recognized in tenant recording. Creates one file containing the number of appearances per word and another containing the number of images each word appears in. |
|
Copy
Command
|
getTables | MongoDB | Gets a list of tables. |
|
|
getTranscripts | algoData | Exports OCR transcripts to SQLite files. |
|
Copy
Command
|
joinDockerCluster | RabbitMQ | Executes all commands for joining a cluster, based on Docker. |
|
Copy
Command
|
leaveDockerCluster | RabbitMQ | Executes all commands for leaving a cluster, based on Docker. |
|
Copy
Command
|
makeIconsFile | pdApps | Creates a map of icons in Base64 JSON file from png/jpg’s folder. |
|
Copy
Command
|
migrate | algoData | Migrates algo data from MySQL to MongoDB. | ||
migrateAerobaseToTenant | userMigration | Creates a tenantId attribute for local users in Aerobase from pre-tenant versions with Aerobase. |
|
Copy
Command
|
migrateApps | pdApps | Migrates the tenant’s apps from MariaDB to MongoDB. | ||
migrateClientsToRobots | clientsToRobotsMigration | Migrates LeoAutomationClients table data to robots schema and attaches the Application Credentials Vault to the “new” robot. |
||
migrateEventLog | algoData | Migrates the old formatter event log to the new CV event log. |
|
|
notify | notificationsClient | Sends notifications to RabbitMQ from a file. |
|
Copy
Command
|
notifyFolder | notificationsClient | Sends bulk notifications to RabbitMQ from a folder. |
|
Copy
Command
|
partialAerobaseImport | userMigration | Loads data from partialRealmJson , replaces all placeholders named $CLIENT_SECRET$ with corresponding data from realmJson , and imports the result data to Aerobase. |
|
Copy
Command
|
publishHistory | historyClient |
Publishes a history message (mainly for testing). JSON files are supported with the following format : Copy
robotHistory
Copy
taskSummary
Copy
queueHistory
Copy
taskHistory
|
Copy
Command
|
|
publishHistoryFolder | historyClient | Sends bulk history messages to RabbitMQ from a folder. |
|
Copy
Command
|
queuesSetup | RabbitMQ | Creates all queues according to the setup file. |
|
Copy
Command
|
sendMessage | RabbitMQ |
Sends messages to RabbitMQ. Copy
Example
|
|
Copy
Command
|
setCryptoKey | secrets | Creates a new secret key. |
|
Copy
Command
|
setHAPolicy | RabbitMQ | Sets HA Policy for RabbitMQ cluster. |
|
|
syncUserRolesToAerobase | userMigration |
Synchronizes user(s) roles in the Aerobase according to the data in
|
|
Copy
To synchronize roles for all users
Copy
To synchronize roles for the user with ID 123
|
uploadAppsToDb | pdApps | Uploads predefined JSON apps to MongoDB. |
|
Copy
Command
|
uploadCodex | MongoDB | Uploads the masking codex. |
|
Copy
Command
|
uploadIconsToDb | pdApps | Uploads JSON file icons to MongoDB. |
|
Copy
Command
|
uploadRawData | rawData |
Uploads PD raw data SQLite files to the MongoDB path parameter. It should be a folder with SQLite files to upload. |
|
Copy
Command
|
uploadRawDataToGW | rawData | Uploads raw data to the gateway. |
|
Copy
Command
|
validateTablesIndexes | MongoDB |
Validates tables and indexes on MongoDB. If indexes do not exist, it will create them. |
|
Copy
Command
|