Quote:
Now
function api_device_save($id, $host_template_id, $description, $hostname, $snmp_community, $snmp_version,
$snmp_username, $snmp_password, $snmp_port, $snmp_timeout, $disabled,
$availability_method, $ping_method, $ping_port, $ping_timeout, $ping_retries,
$notes, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_engine_id,
$max_oids = 5, $device_threads = 1, $poller_id = 1, $site_id = 1, $external_id = '', $location = '') {
Working backwards:
Location was added in commit f6510d680585e6b4461c1f2f3116bb436beb9bc0
External ID was added in commit 2e33bc95b29ec52032fa78f7bff024cd99239a6d
Site ID and Poller ID were changed from a ZERO default ot ONE in commit 8f304f744cdf67c3f08236f4f0e5d7178ab425bf
SNMP Engine ID was added in the middle in commit 76d75b0de33f790a27b33190c3785ecc939d57e5 (it's a required field)
Site ID and Poller ID were added in 247228c84e9790fce4415734559761bbb3eeed4a
These are all v1.2 changes as far as I can tell and all follow the practice you are describing with the exception of snmp_engine_id which unusually was added in the middle and does NOT have a default. That is irregular in terms of an API function but as with any API that could happen as it's a different version. If you are using this function from your own plugin, you can use the CACTI_VERSION constant to compare and see if that field would be required.
As the documentation is slowly being updated, that will also highlight potential API function call issues but we are not there yet.