Update MaxCtrl documentation
Updated MaxCtrl documentation.
This commit is contained in:
		@ -32,6 +32,7 @@ For more information about the MaxScale REST API, refer to the
 | 
				
			|||||||
* [rotate](#rotate)
 | 
					* [rotate](#rotate)
 | 
				
			||||||
* [call](#call)
 | 
					* [call](#call)
 | 
				
			||||||
* [cluster](#cluster)
 | 
					* [cluster](#cluster)
 | 
				
			||||||
 | 
					* [api](#api)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Options
 | 
					## Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -39,7 +40,9 @@ All command accept the following global options.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
  -u, --user      Username to use                    [string] [default: "admin"]
 | 
					  -u, --user      Username to use                    [string] [default: "admin"]
 | 
				
			||||||
  -p, --password  Password for the user            [string] [default: "mariadb"]
 | 
					  -p, --password  Password for the user. To input the password manually, give -p
 | 
				
			||||||
 | 
					                  as the last argument or use --password=''
 | 
				
			||||||
 | 
					                                                   [string] [default: "mariadb"]
 | 
				
			||||||
  -h, --hosts     List of MaxScale hosts. The hosts must be in HOST:PORT format
 | 
					  -h, --hosts     List of MaxScale hosts. The hosts must be in HOST:PORT format
 | 
				
			||||||
                  and each value must be separated by a comma.
 | 
					                  and each value must be separated by a comma.
 | 
				
			||||||
                                            [string] [default: "localhost:8989"]
 | 
					                                            [string] [default: "localhost:8989"]
 | 
				
			||||||
@ -664,3 +667,21 @@ due to a network failure or some other ephemeral error. Any other errors require
 | 
				
			|||||||
manual synchronization of the MaxScale configuration files and a restart of the
 | 
					manual synchronization of the MaxScale configuration files and a restart of the
 | 
				
			||||||
failed Maxscale.
 | 
					failed Maxscale.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## api
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					Usage: api <command>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Commands:
 | 
				
			||||||
 | 
					  get <resource> [path]  Get raw JSON
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### api get
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`Usage: get <resource> [path]`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Perform a raw REST API call. The path definition uses JavaScript syntax to
 | 
				
			||||||
 | 
					extract values. For example, the following command extracts all server states as
 | 
				
			||||||
 | 
					an array of JSON values: maxctrl api get servers data[].attributes.state
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,9 @@ exports.builder = function(yargs) {
 | 
				
			|||||||
    yargs
 | 
					    yargs
 | 
				
			||||||
        .command('get <resource> [path]', 'Get raw JSON', function(yargs) {
 | 
					        .command('get <resource> [path]', 'Get raw JSON', function(yargs) {
 | 
				
			||||||
            return yargs.epilog('Perform a raw REST API call. ' +
 | 
					            return yargs.epilog('Perform a raw REST API call. ' +
 | 
				
			||||||
                                'The path definition uses JavaScript syntax to extract values.')
 | 
					                                'The path definition uses JavaScript syntax to extract values. ' +
 | 
				
			||||||
 | 
					                                'For example, the following command extracts all server states ' +
 | 
				
			||||||
 | 
					                                'as an array of JSON values: maxctrl api get servers data[].attributes.state')
 | 
				
			||||||
                .usage('Usage: get <resource> [path]')
 | 
					                .usage('Usage: get <resource> [path]')
 | 
				
			||||||
        }, function(argv) {
 | 
					        }, function(argv) {
 | 
				
			||||||
            maxctrl(argv, function(host) {
 | 
					            maxctrl(argv, function(host) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user