jarvis-client-sdk v0.0.5
IndyKite Client Libraries for JavaScript
Go packages for IndyKite Platform Client SDK.
This library contains multiple Client libraries for each service of the platform. In order to access to the platform you must obtain an API key first.
Trial
For a trial please contact IndyKite to setup and configure the platform.
Config Service API
Configuration service API ...
For normal usage INDYKITE_APPLICATION_CREDENTIALS_FILE
environment variable should contain the path to the json configuration file. You can find an example .json
in the example_config.json file.
export INDYKITE_APPLICATION_CREDENTIALS_FILE=<path_to_config_file>/config.json
Setup
Clone repo
git clone https://github.com/indykite/jarvis-sdk-nodejs-proto.git
cd jarvis_proto_sdk
Install dependencies
npm i
Running the sdk with the api.js script
With the api.js script you can simply run the sdk against the system you set up in the config file
To see all available options, run
node api --help
To introspect a user token, execute
node api introspect USER_TOKEN
usage: api introspect [-h] userToken positional arguments: userToken JWT bearer token optional arguments: -h, --help show this help message and exit
To verify a digital twin email, execute
node api verify VERIFICATION_TOKEN
usage: api verify [-h] verificationToken positional arguments: verificationToken verification token optional arguments: -h, --help show this help message and exit
To change a digital twin password with token, execute
node api changePassword VERIFICATION_TOKEN PASSWORD
usage: api changePassword [-h] token password positional arguments: token JWT bearer token password New password for the user optional arguments: -h, --help show this help message and exit
To change a digital twin password, execute
node api changePasswordOfUser TENANT_ID UID PASSWORD
usage: api changePasswordOfUser [-h] tenantId uid password positional arguments: tenantId UUID4 ID of the tenant id uid UUID4 ID of the digital twin for password change password New password for the user optional arguments:
To get digital twin, execute
node api getDT DIGITAL_TWIN_ID TENANT_ID
usage: api getDT [-h] [--propertyList PROPERTYLIST [PROPERTYLIST ...]] digitalTwinId tenantId positional arguments: digitalTwinId UUID4 ID of the digital twin tenantId UUID4 ID of the tenant optional arguments: -h, --help show this help message and exit --propertyList PROPERTYLIST [PROPERTYLIST ...] Array list of the required properties
To get digital twin by token, execute
node api getDTByToken DIGITAL_TWIN_TOKEN
usage: api getDTByToken [-h] [--propertyList PROPERTYLIST [PROPERTYLIST ...]] digitalTwinToken positional arguments: digitalTwinToken JWT bearer token optional arguments: -h, --help show this help message and exit --propertyList PROPERTYLIST [PROPERTYLIST ...] Array list of the required properties
To start forgotten password flow, execute
node api startForgottenPasswordFlow DIGITAL_TWIN_ID TENANT_ID
usage: api startForgottenPasswordFlow [-h] digitalTwinId tenantId positional arguments: digitalTwinId UUID4 of the digital twin tenantId UUID4 of the tenant optional arguments: -h, --help show this help message and exit
Add/replace/remove properties by digital twin ID and tenant ID
usage: api patchProperties [-h] [--add ADD [ADD ...]] [--replace REPLACE [REPLACE ...]] [--remove REMOVE [REMOVE ...]] digitalTwinId tenantId
positional arguments:
digitalTwinId UUID4 ID of the digital twin
tenantId UUID4 ID of the tenant
optional arguments:
-h, --help show this help message and exit
--add ADD [ADD ...] Name and value of the property to add (--add email x@x.x)
--replace REPLACE [REPLACE ...]
Property ID and new value (--replace 111 a@a.a)
--remove REMOVE [REMOVE ...]
Remove the properties with the given ID
- Add/replace/remove properties by token
usage: api patchPropertiesByToken [-h] [--add ADD [ADD ...]] [--replace REPLACE [REPLACE ...]] [--remove REMOVE [REMOVE ...]] token
positional arguments:
token JWT bearer token
optional arguments:
-h, --help show this help message and exit
--add ADD [ADD ...] Name and value of the property to add (--add email x@x.x)
--replace REPLACE [REPLACE ...]
Property ID and new value (--replace 111 a@a.a)
--remove REMOVE [REMOVE ...]
Remove the properties with the given ID
- Delete digital twin by tenantID and digitalTwinID
usage: api deleteDigitalTwin [-h] digitalTwinId tenantId
positional arguments:
digitalTwinId UUID4 ID of the digital twin for password change
tenantId UUID4 ID of the tenant id
optional arguments:
-h, --help show this help message and exit
- Delete digital twin by token
usage: api deleteDigitalTwinByToken [-h] token
positional arguments:
token JWT bearer token
optional arguments:
-h, --help show this help message and exit