My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

apiadmin - command line interface administration

Dominic -

PROBLEM

How do I use the apiadmin command line interface to administer my installation?

ENVIRONMENT

  • atmail suite - API server

CAUSE

I want to use the command line to administer my installation.

RESOLUTION

The apiadmin tool allows administrators to manage their service via the command line interface. The apiadmin tool provides the below functionality that can be invoked by passing the corresponding argument. The following documentation can be found by passing the --help argument to apiadmin.

apiadmin --help

Ad Hoc examples:

Start the apiserver with verbose out to STDOUT

[root@a8 ~]# /usr/bin/apiserver -c /etc/atmail/api/api.conf -V -console

Account Management:

[root@a8 ~]# apiadmin account
NAME:
   API Admin account - These commands allow add/list/delete of user's accounts.

USAGE:
   API Admin account command [command options] [arguments...]

COMMANDS:
     add     USERID ACCOUNT_NAME
     list    USERID
     delete  USERID ACCOUNTID

OPTIONS:
   --help, -h  show help

Debug management

[root@a8 ~]# apiadmin debug
NAME:
   API Admin debug - This command allows control of debugging and provides utilities to allow easy reading of stack outputs.

USAGE:
   API Admin debug command [command options] [arguments...]

COMMANDS:
     enable   Enable debug output.
     disable  Disable all debug output
     status   Display debug output status
     parse    Take string from stdin and parse for nice display

OPTIONS:
   --help, -h  show help

Generate master cryptography keys

[root@a8 ~]# apiadmin genkey
FATA[2017-04-27T11:50:28+10:00] /etc/atmail/api/.keyring ALREADY EXISTS. I will _NOT_ overwrite it. Please manually remove to regenerate the key storage file.
   --help, -h  show help

Account Identity Management

[root@a8 ~]# apiadmin identity
NAME:
   API Admin identity - These commands allow add/list/delete of a user's account identities.

USAGE:
   API Admin identity command [command options] [arguments...]

COMMANDS:
     add     USERID ACCOUNTID NAME EMAIL
     list    ACCOUNTID
     delete  USERID ACCOUNTID IDENTID

OPTIONS:
   --help, -h  show help

Journal list

[root@a8 ~]# apiadmin journal
INFO[2017-04-27T11:53:11+10:00] Listing journal

Generate a password hash or encrypted string

[root@a8 ~]# apiadmin password
NAME:
   API Admin password - This command is a utility for generating hashed or encrypted passwords

USAGE:
   API Admin password command [command options] [arguments...]

COMMANDS:
     list      
     generate  SCHEMA

OPTIONS:
   --help, -h  show help

Service Account Management

[root@a8 ~]# apiadmin service
NAME:
   API Admin service - These commands allow add/list/delete of a user's account services.

USAGE:
   API Admin service command [command options] [arguments...]

COMMANDS:
     add     ACCOUNTID TYPE USERNAME PASSWORD
     list    ACCOUNTID
     delete  SERVICETYPE ACCOUNTID SERVICEID

OPTIONS:
   --help, -h  show help

API Global setting management

[root@a8 ~]# apiadmin setting
NAME:
   API Admin setting - These commands allow list and setting of global settings.
Use --hostname for any of these commands to list/set global settings per hostname.

USAGE:
   API Admin setting command [command options] [arguments...]

COMMANDS:
     list  
     set   SETTINGNAME VALUE

OPTIONS:
   --help, -h  show help

Display the effected configuration values then quit

[root@a8 ~]# apiadmin show-config
INFO[2017-04-27T11:56:52+10:00]
Configuration

   =/usr/bin/apiadmin
XDG_SESSION_ID=2
HOSTNAME=a8
SELINUX_ROLE_REQUESTED=
TERM=xterm-256color
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=192.168.10.168 35638 22
SELINUX_USE_CURRENT_RANGE=
SSH_TTY=/dev/pts/0
USER=root
.................[Truncated Output]................

Theme Management

[root@a8 ~]# apiadmin themes
NAME:
   API Admin themes - These commands allow list/delete/import and exporting of themes.
Use --hostname for any of these commands to operate on themes per hostname.

USAGE:
   API Admin themes command [command options] [arguments...]

COMMANDS:
     list    
     delete  THEMEID
     export  THEMEID
     import  THEME_TGZ

OPTIONS:
   --help, -h  show help

User Management

[root@a8 ~]# apiadmin user
NAME:
   API Admin user - These commands allow add/list/delete of users.

USAGE:
   API Admin user command [command options] [arguments...]

COMMANDS:
     add            USERNAME PASSWORD
     list           
     delete         USERID
     generatetoken  USERID SECONDS

OPTIONS:
   --help, -h  show help

Shows a list of commands or help for one command

[root@a8 ~]# apiadmin help
NAME:
   API Admin - Provides administration functions for API server

USAGE:
   apiadmin [global options] command [command options] [arguments...]
.................[Truncated Output]................

 

Have more questions? Submit a request

Comments