Manage APIKey service accounts

API keys identify the application or project that's calling an API. They are generated on the project making the call, and you can restrict their use. An API key is a unique identifier that you generate. An API key is used when the data you want is public and does not need a user authentication. A service account authenticates your application without accessing user information.

AMPLIFY Choreography webhook integration requires that you create APIKeys and manage your APIKey accounts using Axway Amplify CLI.

Before you start

Provision your Axway AMPLIFY Platform and Install Axway CLI. See Prepare the AMPLIFY Choreography runtime environment.

Objectives

Use CLI commands to manage APIKey service accounts.

 

Once the business service is created, follow the instructions in README.md to deploy the business service.

Add service account

The serviceaccount add command creates the service.

amplify ace serviceaccount add <name>
  • If the serviceaccount is attempted to be added without a name, a missing arg error is thrown.
  • If the serviceaccount was added successfully, the following confirmation log is returned: Service account id <id> was successfully added.

You can also enter amplify ace serviceaccount --help.

List

The serviceaccount list command lists the services' accounts.

List all

Use the following commands to list all services:

  • amplify ace serviceaccount
  • amplify ace serviceaccount list
  • amplify ace serviceaccount --list

You can also enter amplify ace serviceaccount --help.

List by ID

Use the following commands to list by ID:

  • amplify ace servcieaccount list --id=<id>
  • amplify ace servcieaccount --id=<id>
  • If the ID is found, the specific json body of the service account by ID is displayed.
  • If the ID is not found, the following error is displayed: Unable to list service account. [Error Code 9103] - Failed to get ServiceAccount[id: NNNNNNN]: Object not found.

You can also enter amplify ace serviceaccount --help.

Delete by ID

The serviceaccount delete command deletes the service account by ID.

amplify ace serviceaccount delete --id=<id>
  • If ID is not provided, a missing arg param error is thrown.
  • If ID is not found, the following error is displayed: Unable to delete service account. [Error Code 9103] - Failed to get ServiceAccount[id: NNNNNNN]: Object not found.
  • If the service account is in use by an event client, the following error is displayed: Unable to delete service account. service account in use.

You can also enter amplify ace serviceaccount --help.

Related Links