SDC6 to SDC7 API Cheat Sheet

Modified: 15 Mar 2016 19:21 UTC

Cheat sheet for SDC 6.5 Users.

Activities

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /activities sdc-workflow /jobs
/activities:id /jobs/:uuid
/zones/:uuid/activities sdc-vmapi /vms/:uuid/jobs
/vms/:uuid/activities sdc-vmapi /vms/:uuid/jobs
/vms/:uuid/activities/:id sdc-workflow /jobs/:uuid
/servers/:uuid/activities /jobs?server_uuid=:uuid

Network Pools

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /network_pools sdc-napi /network_pools
/network_pools/:id /network_pools/:uuid
/network_pools/:id/networks /networks/:uuid json -aH networks

Networks

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /networks sdc-napi /networks
/networks/:id /networks/:uuid
/networks/:id/subnet n/a
/networks/:id/ips /networks/:uuid/ips
/networks/:id/ips/reserved /networks/:uuid/ips?reserved=true
/networks/:id/ips/reserve -d ips=1.2.3.4 /networks/:uuid/ips/1.2.3.4 -d '{ "reserved": true }'
/networks/:id/ips/unreserve -d ips=1.2.3.4 /networks/:uuid/ips/1.2.3.4 -d '{ "reserved": false }'
/networks/:id/ips/reserve -d start_ip=1.2.3.4 -d end_ip=1.2.3.9 n/a

NIC Tags

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /nic_tags sdc-napi /nic_tags
/nic_tags/:id /nic_tags/:name
/nic_tags/:id/networks /networks?nic_tag=:name
/nic_tags/:nic_tag_id/networks/:network_id /networks?uuid=:uuid

NICs

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /nics sdc-napi /nics
/nics/:address /nics/:address
/nics/:address -X PUT -d interface=... -d server=.... /nics/:address -X PUT -d '{ "belongs_to_uuid": "Server_UUID", "belongs_to_type": "server" }'
/nics/:address/unassign /nics/:address -X PUT -d '{ "belongs_to_uuid": null, "belongs_to_type": null }'

Packages

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /packages sdc-papi /packages
/packages/:package_id /packages/:uuid
/packages/:id/make_default n/a

Platform Images

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /platform_images sdc-cnapi /platforms
/platform_images/:id n/a
/platform_images/:id/make_default

Provisioner Messages

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /provisioner_messages sdc-workflow /jobs
/provisioner_messages/:id /jobs/:uuid
/customers/:owner_uuid/zones/:zone_id/provisioner_messages sdc-vmapi /vms/:uuid/jobs
/customers/:owner_uuid/zones/:zone_id/provisioner_messages/:id sdc-workflow /jobs/:uuid
SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /search API's ?field=value
sdc-ldap s field=value

Servers

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /servers sdc-cnapi /servers
/servers/:id/nics /servers/:uuid/nics
/servers/:id/:action /servers/:uuid/:action

Transitions

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /transitions sdc-vmapi /vms/:uuid/jobs

KVM and SmartOS Instances

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /zones & /vms sdc-vmapi /vms
/zones/:uuid /vms/:uuid
/zones/:uuid/action /vms/:uuid?action=:action
/zones/:uuid/zfs_snapshots /vms/:uuid json -aH snapshots
/customers/:customer_id/zones /vms?owner_uuid=:customer_uuid

Zones NICs

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /zones/:uuid/nics sdc-vmapi /vms/:uuid json -aH nics

Zpools

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-mapi /servers/:server_id/zpools sdc-cnapi /servers/:uuid/zpools
/servers/:server_id/zpools/:zpool_id n/a

Customers

SDC 6 SDC 7
API Endpoint API Endpoint
sdc-capi /customers sdc-ldap sdc-ldap s objectclass=sdcperson
/customers/:uuid sdc-ldap -s uuid=:uuid
/customers/:login sdc-ldap -s login=:login
/customers/:uuid/limits sdc-ldap 'uuid=:uuid,ou=users,o=smartdc' objectclass=capilimit