This is a sdk tool that helps users use Ankr's APIs more conveniently.
npm install
npm install ankr-sdk-nodejs
- our default domain is 'https://gateway-stage.dccn.ankr.com'
- If you want to use the 'dev' context,call
setDomain(domain)
function with the parameterdomain = '-dev'
-
If you don't have an account, please go to Ankr's website https://app-stage.ankr.com/ (or in dev context, https://app-dev.ankr.com/ ) to register your own account.
-
If you already have Ankr account, please call
setAccount(email,password)
function to login before you use other Ankr's APIs. For example:setAccount('[email protected]', 'Example@1234')
-
changeemail(email_u)
Change email address. -
forgotpassword(email)
Send a reset password email to your email address. -
changepassword(old_p, new_p)
Change the password of your account.
-
chartlist(repo)
List charts, choose the chart repo (default = 'stable') you want to list. -
chartdetail(repo, name, ver)
Show details of a specific chart. -
chartdownload(repo, name, ver)
Download a specific chart. -
chartdelete(name, ver)
Delete a chart.(Only a chart with repo = ‘user’ can be deleted, users cannot delete a chart with repo = 'stable' ) -
chartupload(repo, name, ver, file)
Upload a chart.
-
namespacelist( )
List all namespaces in your account. -
namespacecreate(ns_name, ns_cpu_limit, ns_mem_limit, ns_storage_limit)
Create a namespace. -
namespacedelete(ns_id)
delete a namespace by ns_id. -
namespaceupdate(ns_id, cpu_u, mem_u, storage_u)
update a namespace by ns_id.
-
dclist( )
List all data centers. -
dcnetworkinfo( )
Get the networkinfo of the data center. -
mydc( )
Get your data center infomation. -
dcreset( )
Reset the data center.
-
applist( )
List all apps in your account. -
appcreate(app_name, chart_repo, chart_name, chart_ver, ns_id [, custom_values])
Create an application on a running namespace. -
appcancel(app_id)
Cancel an application by app_id. -
apppurge(app_id)
Purge an application by app_id. -
appupdate(app_id, app_name_u, chart_name_u, chart_repo_u, chart_ver_u)
Update an application by app_id. -
appdetail(app_id)
Show details of an application by app_id.