This seed will create a fully functional, secure implementation with access to your EffortlessAPI endpoint for easy automation on the scripting platform of your choice.
eapi -cloneEAPISeed project-cli ProjectXYCli your-project-alias
Creating a CLI for your project involves the following steps:
- Clone this repository to a folder called
/your-cli(assuming your EffortlessAPI Project is calledbob-your-projectfor example.) - Update
/SSoTmeProject.jsonto replaceej-aca-yesandwithbob-your-project - Update
/DotNet/CLIClassLibrary/EAPICLIHandler.csto replaceej-aca-yesandwithbob-your-project. - Update
/package.jsonto replaceej-aca-yesandwithbob-your-project. - Build the ssot.me code:
ssotme -build - Install the NPM package locally to test
npm install . -g - Test the package:
your-cli help
See below for further help/instructions.
The following behaviors are common across all CLI's. The specifics beyond what is described here will depend on the specific EffortlessAPI project being managed.
Any CLI will include simple commands for authenticating with any of the methods supported
your-cli -authenticate you@domain.com -demoPassword Password123 your-cli -authenticate you@domain.com -sha256HashedPassword xyzq23k321zyx your-cli -authenticate -withGoogle your-cli -authenticate -withFacebook your-cli -authenticate -withTwitter
If your Guest role has Create permission on your User object, then your
CLI will include a -regisiter you@domain.com command line option.
By default, the first commands issued will be assumed to come from -as Guest, however, Any command can be updated to also include -as Employee, or -as AnyRole which will override the default.
It will also "remember" that request, and any subsequent requests which do not
specify the -as ExplicitRole will be invoked using the previous role.
Any any time you can request help as follows:
your-cli -help GetInv your-cli -help your-cli help your-cli help -as Employee your-cli help -as Guest
This will list any commands which the given user can access.
your-cli help GetCustomers -as Admin
Because this matches a specific method that Admin can reference, the help will provide a detailed description of the method/payload, response, etc.
Available Actions Matching: getcustomers
- GetCustomers
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* * Customer *
* * - A customer of company XYZ, mostly online sales. Created
* * from Quickbooks
* * * * * * * * * * * * * * * * * * * * * * * * * * *
CRUD - CustomerId
CRUD - Name
CRUD - Notes
CRUD - Attachments
CRUD - Status
CRUD - Invoices
CRUD - EmailAddress
CRUD - User
CRUD - UserEmailThere will also be a detailed Html description of how to interact with the
CLI as well at /cli.html.