Outdated Version
You are viewing an older version of this section. View current production version.
enable-http-api
Enable the HTTP API.
Usage
Enable the HTTP API.
This command enables the HTTP API on selected nodes.
The command must only be run on aggregator nodes, and each node must be located on a different host.
Nodes may be selected via the '--node-id' option with a comma-separated list of node IDs,
or by using the '--all-aggregators' option, where Toolbox will enable the HTTP API on each
aggregator node in the cluster, including the Master Aggregator.
A port for the API endpoint may be specified via the '--port' option.
The same port value will be used for all selected nodes.
An HTTPS endpoint may be specified via the '--ssl' option. In order to use HTTPS,
all selected nodes must have valid 'ssl_cert' and 'ssl_key' values set.
Example usage:
sdb-admin enable-http-api --all-aggregators --port 1234
sdb-admin enable-http-api --node-id 56F4A753CA,746723EADF --port 1234 --ssl
Usage:
sdb-admin enable-http-api [flags]
Flags:
--all-aggregators Enable the HTTP API on all aggregator nodes in the cluster, including the Master Aggregator
-h, --help Help for enable-http-api
--node-id strings Node IDs for nodes on which to enable the HTTP API
-p, --password STRING The database user's password. If a password is specified on the command line, it must not contain an unescaped '$' character as it will be replaced by the shell.
If a password is not specified on the command line and the database user is not 'root', Toolbox will attempt to read the password from the ‘MEMSQL_PASSWORD’ environment variable.
If this variable is present but does not contain a value, or if the variable does not exist, Toolbox will prompt for a password
--pool-capacity POSITIVE_INTEGER Limits the impact of the HTTP server on the database by limiting the maximum number of connections per user
--pool-max-idle POSITIVE_INTEGER The maximum number of connections in each pool that can be open at a time
-P, --port PORT The port to use for the API endpoint
--ssl To use the HTTPS endpoint, nodes must be configured for SSL and have valid 'ssl_cert' and 'ssl_key' values set
--user string The database user
Global Flags:
--backup-cache FILE_PATH File path for the backup cache
--cache-file FILE_PATH File path for the Toolbox node cache
-c, --config FILE_PATH File path for the Toolbox configuration
--disable-colors Disable color output in console, which some terminal sessions/environments may have difficulty with
--disable-spinner Disable the progress spinner, which some terminal sessions/environments may have issues with
-j, --json Enable JSON output
--parallelism POSITIVE_INTEGER Maximum number of operations to run in parallel
--runtime-dir DIRECTORY_PATH Where to store Toolbox runtime data
--ssh-control-persist SECONDS Enable SSH ControlPersist and set it to the specified duration in seconds
--ssh-max-sessions POSITIVE_INTEGER Maximum number of SSH sessions to open per host, must be at least 3
--ssh-strict-host-key-checking Enable strict host key checking for SSH connections
--ssh-user-known-hosts-file FILE_PATH Path to the user known_hosts file for SSH connections. If not set, /dev/null will be used
--state-file FILE_PATH Toolbox state file path
-v, --verbosity count Increase logging verbosity: valid values are 1, 2, 3. Usage -v=count or --verbosity=count
-y, --yes Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default
Remarks
This command is interactive unless you use either the --yes
or --json
flags to override interactive behavior.