API Version: 6.5

User Links

It is common for user-to-phone links to be associated with phone ownership, and for user-to-extension links to be associated with extension ownership. Ownership needs to be set separately using the user-edit function.

Permissions

Requires System-Admin or Company-Admin permissions.
Path: /rest/dialplan/link/ 6.3.10+
Link and/or unlink a user to a phone or an extenson number. Can also be used to set or update contact ordering on extensions.
NOTE: Valid link-types in 'link' call for phones are:
link forward fork unlink
It is not yet possible to set hotdesk links using this call, but a hotdesk link can be replaced or removed.
"type": "user",
	"scope": {
		"contact_id": contact-id,
		"uname": uname /* Ignored if contact_id provided */
	},
	"values": {
		"phones": {
			"phone-id": "link-type or 'unlink'",
			...
		},
		"extensions": {
			"extension_company" : order or null to unlink,
			...
		}
	}
Return value. The updated links are returned after the change has been applied. numrows indicates the number of individual changes actuallty applied:
{
    "result": "success",
    "numrows": number of affected rows,
    "values": {
        "contact_id": contact-id,
        "phones": {
            "phone-id": "link type",
            ...
        },
        "extensions": {
            "extension_company" : order,
            ...
        }
    }
}
Path: /rest/dialplan/readlink/ 6.3.10+
Read a list of linked phones/extensions and ownerships based on a simple search. If linked objects are not in an administered company then the link will be omitted from the result-set.
NOTE: Valid link-types in 'readlink' call for phones are:
link hotdesk forward fork
also, `"phone-id"` for linked devices may show `webrtc` or `mobrtc`
"type": "user",
	"scope": {
		"contact_id": contact-id,
		"uname": uname,
		"company": company/companies
	},
	"values": {
	}
Return value:
{
	"result": "success",
	"values": [
		{
			"contact_id": contact-id,
			"phones": {
				"phone-id": "link type",
				...
			},
			"extensions": {
				"extension_company" : order,
				...
			}
		},
		...
	],
	"numrows": number of affected rows
}