Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Latest commit

 

History

History
73 lines (56 loc) · 1.66 KB

README.md

File metadata and controls

73 lines (56 loc) · 1.66 KB

PaNOSC Portal API CLI Client

A CLI client to test the PaNOSC Portal API.

The CLI performs an initial login to an IDP to obtain an access token for the Portal API. The config for the IDP goes in config.json with the following structure:

{
  "idp": {
    "url": "https://idp.com/auth/url/to/obtain/token",
    "clientId": "a_client_id"
  }
}

The user is requested for a username and password which are passed to the IDP. Having successfully received a token, this is saved locally at .token.json. Following commands verify the validity of the token and refresh it if required. The access token is then forwarded to all portal API requests.

Usage

Note: The api-service command is equialent to ./bin/run

$ npm install
$ api-service COMMAND
running command...
$ api-service (-v|--version|version)
api-service-cli-client/1.0.0 darwin-x64 node-v10.15.3
$ api-service --help [COMMAND]
USAGE
  $ api-service COMMAND
...

Commands

api-service user-instance:COMMAND

perform user-instance related operations

USAGE
  $ api-service user-instance:COMMAND

COMMANDS
  user-instance:add     Creates a user instance
  user-instance:delete  Deletes a user instance
  user-instance:list    List all user instances

api-service help [COMMAND]

display help for api-service

USAGE
  $ api-service help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI