Building Commands and Help Feature
Building Commands and Help Feature
A full list of CLI commands and usage information can be found in the GitHub repository.
If you do not see a command for an endpoint you need, you can build a custom request.
First: Reset browser storage
Now that you've imported the Box API credentials into the CLI you should take a moment to remove these credentials from your browser's storage.
Creating a folder with help
Every CLI command begins with box
. Add the option --help
to any
command for help building it. For example, executing box --help
will bring you
to a list of all possible object commands. Options are discussed more in
step 4.
Then, for example, use the folder object and execute the command
box folders --help
. This provides a list of all eligible actions for this
object.
Discover the required arguments for creating a folder: box folders:create --help
Execute the command box folders:create 0 "My CLI Folder"
and note the folder
ID returned in the response.
Log into your Box account. Can you see this folder in your folder tree?
Summary
- You used the help feature to create a folder