Call API

call-api

Call arbitrary API endpoints with the given SERVICE and METHOD.

Example:

slcli call-api Account getObject
slcli call-api Account getVirtualGuests --limit=10 --mask=id,hostname
slcli call-api Virtual_Guest getObject --id=12345
slcli call-api Metric_Tracking_Object getBandwidthData --id=1234 \
    "2015-01-01 00:00:00" "2015-01-1 12:00:00" public
slcli call-api Account getVirtualGuests \
    -f 'virtualGuests.datacenter.name=dal05' \
    -f 'virtualGuests.maxCpu=4' \
    --mask=id,hostname,datacenter.name,maxCpu
slcli call-api Account getVirtualGuests \
    -f 'virtualGuests.datacenter.name IN dal05,sng01'
call-api [OPTIONS] SERVICE METHOD [PARAMETERS]...

Options

--id <_id>

Init parameter

-f, --filter <_filters>

Object filters. This should be of the form: ‘property=value’ or ‘nested.property=value’. Complex filters like betweenDate are not currently supported. (multiple occurrence permitted)

--mask <mask>

String-based object mask

--limit <limit>

Result limit

--offset <offset>

Result offset

--output-python, --no-output-python

Show python example code instead of executing the call

Arguments

SERVICE

Required argument

METHOD

Required argument

PARAMETERS

Optional argument(s)

Shell

MetaData

Used to retrieve information about the server making the API call. Can be called with an un-authenticated API call.

metadata

Find details about the machine making these API calls.

Choices
backend_ip
backend_mac
datacenter
datacenter_id
fqdn
frontend_mac
id
ip
network
provision_state
tags
user_data
metadata [OPTIONS] [backend_ip|backend_mac|datacenter|datacenter_id|fqdn|front
         end_mac|id|ip|network|provision_state|tags|user_data]

Arguments

PROP

Required argument