11. aptadmin

aptadmin is a command line tool for Aperture administrative tasks.

usage: aptadmin [-h] -c CONFIG [-v] {user,workspace,dump,restore,token} ...

11.1. Positional Arguments

subparser

Possible choices: user, workspace, dump, restore, token

Aperture administation

11.2. Named Arguments

-c, –config Aperture configuration file (.ini)
-v, –verbose

Enable verbose logging

Default: False

11.3. Sub-commands:

11.3.1. user

User administration

aptadmin user [-h] {create,update,role} ...

11.3.1.1. user

user Possible choices: create, update, role

11.3.1.2. Sub-commands:

11.3.1.2.1. create

Create new user

aptadmin user create [-h] -n FULLNAME -e EMAIL
                     [-G {administrator} [{administrator} ...]] -p [PASSWORD]
11.3.1.2.1.1. Named Arguments
-n, –fullname full name (use quotes when including spaces)
-e, –email e-mail address
-G, –global_roles
 

Possible choices: administrator

one or more global roles

-p, –password password
11.3.1.2.2. update

Update user details

aptadmin user update [-h] [-n FULLNAME] -e EMAIL
                     [-G {administrator} [{administrator} ...]]
                     [-p [PASSWORD]]
11.3.1.2.2.1. Named Arguments
-n, –fullname full name
-e, –email e-mail address
-G, –global_roles
 

Possible choices: administrator

one or more global roles

-p, –password password
11.3.1.2.3. role

Manage user roles

aptadmin user role [-h] -e EMAIL -p PROJECT_ID -r {observer,user}
                   [{observer,user} ...]
11.3.1.2.3.1. Named Arguments
-e, –email e-mail address
-p, –project_id
 project identifier
-r, –project_roles
 

Possible choices: observer, user

one or more project roles

11.3.2. workspace

Workspace administration

aptadmin workspace [-h] {sync,discover} ...

11.3.2.1. workspace

workspace Possible choices: sync, discover

11.3.2.2. Sub-commands:

11.3.2.2.1. sync

Synchronize Aperture database with workspaces. For each workspace, creates the schema and workspace tables (if needed). Then, for each feature and dimension in the Aperture database, its identifier is looked up in the workspace (or created if it does not yet exist), and updated accordingly (i.e. the identifiers in the workspace are leading). This process includes all references to features and dimensions in the Aperture database. It does not include features and dimensions which are in the workspace, but not yet in the Aperture database; use the discover command for this.

aptadmin workspace sync [-h]
11.3.2.2.2. discover

Add features and dimensions not yet in Aperture database. For a specific workspace, iterates its features and dimensions and adds them to the Aperture database (if needed). If the Aperture and workspace database are not synchronized this can lead to identifier conflicts, and it is required to run the sync command first. The discover command requires a step identifier, because in the Aperture database features must have a reference to the step which created the feature.

aptadmin workspace discover [-h] -p PROJECT_ID -s STEP_ID
11.3.2.2.2.1. Named Arguments
-p, –project_id
 project identifier
-s, –step_id step identifier

11.3.3. dump

Dump the Aperture database to a file. The output format of the database dump is the default PostgreSQL script file format.

aptadmin dump [-h] -f FILE

11.3.3.1. Named Arguments

-f, –file output file path

11.3.4. restore

Restore the Aperture database from a file. Imports the database dump file format and upgrades the database to the installed revision (i.e. the database revision of the installed Aperture version). After upgrading the Aperture database is synchronized with the workspaces (see the workspace sync command for more details on this process). If the workspace DSNs are different from those in the dump file the –dsn parameter allows to change it to the target DSN.

aptadmin restore [-h] -f FILE [-d DSN]

11.3.4.1. Named Arguments

-f, –file input file
-d, –dsn workspace DSN (overrides DSN of workspaces in backup file)

11.3.5. token

Token administration

aptadmin token [-h] {create} ...

11.3.5.1. token

token Possible choices: create

11.3.5.2. Sub-commands:

11.3.5.2.1. create

Create new jwt token

aptadmin token create [-h] [--issuer ISSUER] --subject SUBJECT
11.3.5.2.1.1. Named Arguments
–issuer

token issuer

Default: aperture

–subject token subject (the application this token will be used in)