Interact with our REST API using our CLI tool
The Cord CLI tool allows you to interact with your data via our REST endpoints without having to manually authenticate each request.
Run the command below in your terminal:
npm install -g @cord-sdk/cli
Before you get started calling our API we need to configure the tool to authenticate each request with your application.
Run the command below in your terminal:
cord init
This will prompt you first for your application ID and secret. You can retrieve them from the console under the desired application entry.
The customer ID and secret are only needed if you want to run application management commands. i.e., create, update or delete an application. These values can be found in the console under View application management credentials
.
You can update these values any time by re-running the init
command.
You're ready to go!
# see what commands there are:
cord --help
# try one out:
cord user ls
To check out how to format the commands and what options are available you can run --help
at any level of a command. This will show you what commands and options are available, and what data is needed to make the request.
For more detailed documentation on the requests the command makes and the options it takes you can refer to the REST API docs where you'll also be able to see examples of how to call the commands.