-
Notifications
You must be signed in to change notification settings - Fork 47
Shell
tjfontaine edited this page Sep 14, 2010
·
1 revision
You can interact with the API using the shell.py script which will either prompt you for your API key or use the environment variable LINODE_API_KEY
Example:
./shell.py --domain_list
[
{
"STATUS": 1,
"RETRY_SEC": 0,
"DOMAIN": "example.com",
"DOMAINID": 12,
"DESCRIPTION": "",
"MASTER_IPS": "",
"SOA_EMAIL": "[email protected]",
"REFRESH_SEC": 0,
"TYPE": "master",
"EXPIRE_SEC": 0,
"TTL_SEC": 0
}
]
The help is dynamically generated through the available methods and docstrings in api.py.
./shell.py --help
shell.py --<api action> [--parameter1=value [--parameter2=value [...]]]
Valid Actions
--avail_datacenters
--avail_distributions
--avail_kernels
--avail_linodeplans
--avail_stackscripts
--domain_create
--domain_delete
--domain_list
--domain_resource_create
--domain_resource_delete
--domain_resource_list
--domain_resource_update
--domain_update
--linode_boot
--linode_config_create
--linode_config_delete
--linode_config_list
--linode_config_update
--linode_create
--linode_delete
--linode_disk_create
--linode_disk_createfromdistribution
--linode_disk_delete
--linode_disk_duplicate
--linode_disk_list
--linode_disk_resize
--linode_disk_update
--linode_ip_addprivate
--linode_ip_list
--linode_job_list
--linode_list
--linode_reboot
--linode_resize
--linode_shutdown
--linode_update
--stackscript_create
--stackscript_delete
--stackscript_list
--stackscript_update
--user_getapikey
To see valid parameters use: --help --all
Not only will it show you available commands you can use, but also the list of available named parameters
Valid Named Parameters
--alert_bwin_enabled=
--alert_bwin_threshold=
--alert_bwout_enabled=
--alert_bwout_threshold=
--alert_bwquota_enabled=
--alert_bwquota_threshold=
--alert_cpu_enabled=
--alert_cpu_threshold=
--alert_diskio_enabled=
--alert_diskio_threshold=
--backupweeklyday=
--backupwindow=
--comments=
--configid=
--datacenterid=
--description=
--diskid=
--disklist=
--distributionid=
--distributionidlist=
--distributionvendor=
--domain=
--domainid=
--expire_sec=
--helper_depmod=
--helper_disableupdatedb=
--helper_xen=
--ipaddressid=
--ispublic=
--isreadonly=
--isxen=
--jobid=
--kernelid=
--keywords=
--label=
--linodeid=
--lpm_displaygroup=
--master_ips=
--name=
--password=
--paymentterm=
--pendingonly=
--planid=
--port=
--priority=
--protocol=
--ramlimit=
--refresh_sec=
--resourceid=
--retry_sec=
--rev_note=
--rootdevicecustom=
--rootdevicenum=
--rootdevicero=
--rootpass=
--rootsshkey=
--runlevel=
--script=
--size=
--skipchecks=
--soa_email=
--stackscriptid=
--status=
--target=
--ttl_sec=
--type=
--username=
--watchdog=
--weight=