api-keys-add-key

This CLI command creates a WebAPI key for integrating with Zend Server.

Command Specific Arguments

This table specifies the various arguments used in the command:

Abbreviated Full Description Required/Optional

-n

--name

The new WebAPI key name.

Required

-u

--userName

The WebAPI key's username (admin, developer).

Optional

Common Arguments

This table lists arguments common to all zs-manage commands:

Note:

These arguments are not required for the bootstrap-single-server and api-keys-add-key methods.

Abbreviated Full Description Required/Optional

-N

--key-name

WebAPI key name.

Required

-K

--secret-key

WebAPI secret key.

Required

-U

--server-url

Zend Server URL. Default: http://localhost:10081/ZendServer.

Required - when action is performed on a remote server.

-h

--help

Show usage information and exit.

Optional

 

 

Instructions on how to complete a procedure

To use api-keys-add-key:

  1. Open your CLI.
  1. Enter a help command for the api-keys-add-key action to learn which arguments your command should include:

/usr/local/zend/bin/zs-manage api-keys-add-key --help

  1. Enter the command with the required arguments (replace brackets with your value):

/usr/local/zend/bin/zs-manage api-keys-add-key -n <new key name> -u <new key username> -N <existing key name> -K <existing key secret>

A new WebAPI key is created. Your CLI will return the details of the WebAPI key which is required for using other CLI Tools commands. Save these details for future use:

KEY_NAME = newkey

KEY_USER_NAME = admin

KEY_HASH = ed4ff21bb839b55d870c1c485deddd8c1164634c70c3dbe17da9fb3f410178a3