Skip to main content

service_devices

Creates, updates, deletes, gets or lists a service_devices resource.

Overview​

Nameservice_devices
TypeResource
Idovh.email_exchange.service_devices

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
device_idstringDevice Id (wire: deviceId)
task_pending_idintegerPending task id (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)
device_modelstringModel device (wire: deviceModel)
device_statestringDevice State (allowed, blocked, deviceDiscovery, quarantined) (wire: deviceState)
guidstringuser guid
identitystringExchange identity
imeistringInternational Mobile Equipment Identity (wire: IMEI)
last_updatestring (date-time)Last update date (wire: lastUpdate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, identity, organization_nameGet a device. Returns the model, IMEI, device ID, ActiveSync state and last update date of the ActiveSync device.
listselectexchange_service, organization_nameimei, device_state, identity, x_pagination_modeList devices. Returns the identities of the ActiveSync devices registered on the service. Filter them by identity, IMEI or deviceState.
updateupdateexchange_service, identity, organization_nameUpdate a device. Updates the ActiveSync state of the device with deviceState, for example to allow, block or quarantine it.
clear_deviceexecexchangeService, identity, organizationNameReset a device to factory settings. Runs a factory reset on the device and returns the task. This cannot be undone: all data on the device is lost.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
exchangeServicestringThe internal name of your exchange service
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
identitystringExchange identity
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)
device_statestringFilter the value of deviceState property (=) (wire: deviceState)
identitystringFilter the value of identity property (like)
imeistringFilter the value of IMEI property (like) (wire: IMEI)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a device. Returns the model, IMEI, device ID, ActiveSync state and last update date of the ActiveSync device.

SELECT
device_id,
task_pending_id,
creation_date,
device_model,
device_state,
guid,
identity,
imei,
last_update
FROM ovh.email_exchange.service_devices
WHERE exchange_service = '{{ exchange_service }}' -- required
AND identity = '{{ identity }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

UPDATE examples​

Update a device. Updates the ActiveSync state of the device with deviceState, for example to allow, block or quarantine it.

UPDATE ovh.email_exchange.service_devices
SET
device_state = '{{ device_state }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND identity = '{{ identity }}' --required
AND organization_name = '{{ organization_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Reset a device to factory settings. Runs a factory reset on the device and returns the task. This cannot be undone: all data on the device is lost.

EXEC ovh.email_exchange.service_devices.clear_device
@exchangeService='{{ exchangeService }}' --required,
@identity='{{ identity }}' --required,
@organizationName='{{ organizationName }}' --required
;