1.0.0 • Published 3 years ago

auth0-reporting-cli v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

auth0-reporting-cli

oclif Version Downloads/week License

Command line utility for retrieving reporting data from Auth0

Auth0 reporting CLI video demonstrating functionality

Getting Started

Install the command line:

npm install -g auth0-reporting-cli

To use the command line, you must authenticate with Auth0 by creating a credentials.json. There exists an example credentials file to start from:

cp credentials.json.example credentials.json

Generate a token by making the following request:

curl --request POST \  --url https://<YOUR_ACCOUNT>.auth0.com/oauth/token \  --header 'content-type: application/json' \  --data '{"client_id":"<CLIENT_ID>","client_secret":"<CLIENT_SECRET>","audience":"https://<YOUR_ACCOUNT>.auth0.com/api/v2/","grant_type":"client_credentials"}'

Copy and paste the returned token into the token object property in the credentials.json file and replace the placeholder account subdomain with

{
    "token": "<YOUR_API_V2_TOKEN>",
    "domain": "<YOUR_ACCOUNT>.auth0.com"
}

Usage

$ npm install -g auth0-reporting-cli
$ auth0-reporting-cli COMMAND
running command...
$ auth0-reporting-cli (-v|--version|version)
auth0-reporting-cli/1.0.0 darwin-x64 node-v14.15.3
$ auth0-reporting-cli --help [COMMAND]
USAGE
  $ auth0-reporting-cli COMMAND
...

Commands

auth0-reporting-cli by-app-type

retrieve successful login metrics aggregated by application type

USAGE
  $ auth0-reporting-cli by-app-type

OPTIONS
  -h, --help   show CLI help
  --desc       Sort results in descending order
  --from=from  Start date to filter reports from, YYYY-MM-DD
  --json       Render output as JSON
  --to=to      End date to filter reports to, YYYY-MM-DD

EXAMPLE
  $ auth0-reporting-cli by-app-type --from=2021-10-17 --to=2021-10-18 --desc
    
       App Type        Successful Logins 
       ─────────────── ───────────────── 
       non_interactive 4                 
       native          0                 
       regular_web     0                 
       spa             0                 
       unknown         0

See code: src/commands/by-app-type.ts

auth0-reporting-cli help [COMMAND]

display help for auth0-reporting-cli

USAGE
  $ auth0-reporting-cli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help