Device Action v3.1

API version3.1
Last Update07/16/2019
AuthenticationYES
HTTP MethodPOST
Content Typeapplication/json
Rate limitedYES
Requests per rate limit10/min
Response FormatJSON
Change History07/16/2019: updated agent version which supports fetch_log command 01/22/2019: add one more action type, fetch_agent_log, to support retrieve OPSWAT Client log

Use to do an action on multiple devices on your account

API URL

Copy

Request Parameters

KeyDatatypeParameter TypeRequiredDescriptionDefault
access_tokenstringURLYesaccess token which archived from OAuth authentication step
typesstringBodyYes

Action Type:

  • exempt: exempt devices.

    • Apply: all devices exclude Unknown, Ignored, Out-of-license-usage devices
  • unexempt: unexempt devices

    • Apply: all devices exclude Unknown, Ignored, Out-of-license-usage devices
  • ignore: ignore unknown devices

    • Apply: unknown devices
  • unignore: undo ignore action.

    • Apply: ignored devices
  • delete: delete devices

    • Apply: all devices
  • dhcprenew: force agents call a DHCP request

    • Apply: devices which installed a persistent agent
  • re-identify: force agents to request end-users re-enter their custom information

    • Apply: all devices exclude Unknown, Ignored, Out-of-license-usage devices
  • assign_to_group: assign devices to a group

    • Apply: all devices exclude devices with domain controller agent installed
  • fetch_agent_log : retrieve OPSWAT Client log on devices

    • Apply: devices which installed a persistent agent version 7.6.231.0+/ 10.4.225.0+
idsarray<string>BodyOptionalDevice IDs of devices to be applied the action. The request body must have ids parameter or macs parameter, but not both.
macsarray<string>BodyOptionalMAC addresses of devices to be applied the action The request body must have ids parameter or macs parameter, but not both.
paramsobjectBodyOptionalRequired parameters for a specific action.
params.exempt_timeintBodyOptionalSpecify how long you want to exempt devices in hour. Value should be less than 65000 if this parameter equals 0, MetaAccess will exempt devices forever0
params.group_idstringBodyOptionalSpecify which group (group id) you want to assign devices to This parameter should be specified when action type is assign_to_groupdefault

Response HTTP Code

See APIs

Response Parameters

KeyDataTypeDescription
idstringDevice ID or MAC address of a device
statusinteger

action status. Value can be

  • -1: not support
  • 0: apply action failed
  • 1: apply action successfully
command_idstringOnly apply for fetch_agent_log action Command ID of the action. This will be used in Get Report v3.0+. This parameter will be empty if the action is failed/not supported (status is 01/0) or the action type is not fetch_agent_log

Example

Example Request: using Device ID

Copy

Example Response

Copy

Example Request: using Device MAC address

Copy

Example Response

Copy

History

ActionVersionURL
Device Action3.0Device Action v3.0
Delete2.0Delete Devices v2.0
Renew IP Exempt Unexempt2.0Devices Action v2.0 Device Action v2.0
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard