Events Plugin for Adobe I/O CLI
This guide includes step by step instructions for setting up and using the Events Plugin for the Adobe I/O CLI.
In addition to the information provided in this guide, you can also visit the Events Plugin GitHub repository or the Adobe I/O CLI GitHub repository to learn more.
Setup and credentials
To begin setting up the Events Plugin, visit Adobe Developer Console and create a new project in your organization. For detailed instructions, follow the steps outlined in this tutorial for creating a new project.
Once the project has been created, add the I/O Management API service to the project. This will add the required scope to the authentication token required by the Events SDK. For a step-by-step guide to adding an API to a project, follow this tutorial for adding an API to a project using OAuth Server-to-Server credential (the type of authentication used by the I/O Management API).
Setting up credentials using aio console
After completing the setup within the Adobe Developer Console, you must then set up the credentials locally in order to run the various CLI commands. This set up will populate the ~/.config/aio
file with the access token, organization ID, workspace, and project details, as well as other credentials, required by the CLI.
On entering any command, you will be taken to the Adobe I/O CLI Login page. After signing in using your ID, you will be redirected to a page stating that you have successfully logged in to the Adobe I/O CLI.
You can now proceed to select the organization, project, and workspace using the following steps:
Select the same organization in which you created the project in the Adobe Developer Console. You can list the organizations and select one using aio console org list.
To select an organization, use aio console org select <ims_org_id>.
Select the project you created in the Adobe Developer Console. You can list the projects using aio console project list.
To select a project, use aio console project select <project_id>.
Select the workspace from the project you created in the Adobe Developer Console. By default a Production workspace is created when you create a new project. You can list the workspaces using aio console workspace list.
To select a workspace, use aio console workspace select <workspace_id>.
Installing and using the plugin
Use the following outlines how to install the Events Plugin for the Adobe I/O CLI and issue commands. These installation instructions are specific to using the Events Plugin alone. You could also choose to install the Adobe I/O CLI that supports the events plugin. See the section on installing the Adobe I/O CLI for installation instructions.
Copied to your clipboard$ npm install -g @adobe/aio-cli-plugin-events$ aio COMMANDrunning command...$ aio (-v|--version|version)@adobe/aio-cli-plugin-events/1.0.0 darwin-x64 node-v10.18.1$ aio [COMMAND] --helpUSAGE$ aio COMMAND...
Installing Adobe I/O CLI
Use the following instructions to install the Adobe I/O CLI. For more information, including a complete list of available commands for the Adobe I/O CLI, please visit the Adobe I/O CLI public GitHub repository.
Copied to your clipboard$ npm install -g @adobe/aio-cli$ aio COMMANDrunning command...$ aio (-v|--version|version)@adobe/aio-cli/3.6.0 darwin-x64 node-v10.16.1$ aio --help [COMMAND]USAGE$ aio COMMAND...
Commands
There are a number of commands available when using the Events Plugin, the following sections outline these commands in more detail.
Throughout the guide, example commands are shown using a colon (:
) to separate values. These commands can also be written without a colon, using a space to separate values.
Accepted command syntax:
Copied to your clipboard$ aio event:registration:get REGISTRATIONID$ aio event registration get REGISTRATIONID
Please select an area from the following list to see available commands:
Common command
Copied to your clipboardaio event
Registration commands
- Manage your Adobe I/O Events Registrations
- Get an Event Registration in your workspace
- List Event Registrations in your workspace
- Create an Event Registration
- Delete an Event Registration
Manage your Adobe I/O Events Registrations
Copied to your clipboardUSAGE$ aio event:registrationOPTIONS-v, --verbose Verbose output--help Show help--version Show version
Get an Event Registration in your workspace
Copied to your clipboardUSAGE$ aio event:registration:get REGISTRATIONIDARGUMENTSREGISTRATIONID Id of the registration to getOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show versionALIASES$ aio event:reg:get
List Event Registrations in your workspace
Copied to your clipboardUSAGE$ aio event:registration:listOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show versionALIASES$ aio event:registration:ls$ aio event:reg:list$ aio event:reg:ls
Create an Event Registration
Copied to your clipboardUSAGE$ aio event:registration:create BODYJSONFILEARGUMENTSBODYJSONFILEPath to a file in JSON format with the information to create a new Event Registration.The JSON should follow the following format:{"name": "<event registration name>","description": "<event registration description>","delivery_type": "WEBHOOK|WEBHOOK_BATCH|JOURNAL","webhook_url": "<webhook URL responding to challenge>""events_of_interest": [{"provider_id": "<event provider id>""event_code": "<event provider event_code metadata>"}, { <...more events> }]}OPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show versionALIASES$ aio event:reg:create
Delete an Event Registration
Copied to your clipboardUSAGE$ aio event:registration:delete REGISTRATIONIDARGUMENTSREGISTRATIONID The requested registration IDOPTIONS-v, --verbose Verbose output--help Show help--version Show versionALIASES$ aio event:reg:delete
Provider Commands
- Manage your Adobe I/O Events Providers
- Get details for a Provider by its ID
- List all Providers for the Organization
- Create a new Provider
- Update an existing Provider
- Delete an existing Provider
Manage your Adobe I/O Events Providers
Copied to your clipboardUSAGE$ aio event:providerOPTIONS-v, --verbose Verbose output--help Show help--version Show version
Get details for a Provider by its ID
Copied to your clipboardUSAGE$ aio event:provider:get PROVIDERIDARGUMENTSPROVIDERID The requested provider IDOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--fetchEventMetadata Fetch event metadata with provider--help Show help--version Show version
List all Providers for the Organization
Copied to your clipboardUSAGE$ aio event:provider:listOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show versionALIASES$ aio event:provider:ls
Create a new Provider
Copied to your clipboardUSAGE$ aio event:provider:createOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show version
Update an existing Provider
Copied to your clipboardUSAGE$ aio event:provider:update PROVIDERIDARGUMENTSPROVIDERID The requested provider IDOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show version
Delete an existing Provider
Copied to your clipboardUSAGE$ aio event:provider:delete PROVIDERIDARGUMENTSPROVIDERID The requested provider IDOPTIONS-v, --verbose Verbose output--help Show help--version Show version
Event Metadata Commands
- Manage Event Metadata for your Adobe I/O Events Providers
- Get details of an Event Code of a Provider
- List all Event Metadata for a Provider
- Create Event Metadata for a Provider
- Update Event Metadata for a Provider
- Delete Event Metadata for a Provider
Manage Event Metadata for your Adobe I/O Events Providers
Copied to your clipboardUSAGE$ aio event:eventmetadataOPTIONS-v, --verbose Verbose output--help Show help--version Show version
Get details of an Event Code of a Provider
Copied to your clipboardUSAGE$ aio event:eventmetadata:get PROVIDERID EVENTCODEARGUMENTSPROVIDERID The requested provider IDEVENTCODE The requested eventmetadata event codeOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show version
List all Event Metadata for a Provider
Copied to your clipboardUSAGE$ aio event:eventmetadata:list PROVIDERIDARGUMENTSPROVIDERID The requested provider IDOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show versionALIASES$ aio event:eventmetadata:ls
Create Event Metadata for a Provider
Copied to your clipboardUSAGE$ aio event:eventmetadata:create PROVIDERIDARGUMENTSPROVIDERID The requested eventmetadata event codeOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show version
Update Event Metadata for a Provider
Copied to your clipboardUSAGE$ aio event:eventmetadata:update PROVIDERID EVENTCODEARGUMENTSPROVIDERID The requested provider IDEVENTCODE The requested eventmetadata event codeOPTIONS-j, --json Output json-v, --verbose Verbose output-y, --yml Output yml--help Show help--version Show version
Delete Event Metadata for a Provider
When deleting event metadata, the EVENTCODE
value is optional. However, if an Event Code is not provided, all event metadata will be deleted.
Copied to your clipboardUSAGE$ aio event:eventmetadata:delete PROVIDERID [EVENTCODE]ARGUMENTSPROVIDERID The requested provider IDEVENTCODE The requested eventmetadata event codeOPTIONS-v, --verbose Verbose output--help Show help--version Show version