Manage Device

This API changes the unmanaged state to managed state. Before the state of the device changed to managed state, the device configuration sync process was triggered.

Before you begin

Before attempting to manage devices with this API, users must ensure any one of the ACF permission ADC > Inventory > Manage / Unmanage is available. This can be checked under Accounts > Role > Authorized Functions.

Request Structure

URL: /adc-device-manage

Type: PUT

Parameters
Table 1. Parameter Details
Param Type Name Description Field Type Constraints
Header sessionId Session ID received after login. String Required if username and password are not provided.
Header username AppViewX login username. String Required if sessionId is not provided.
Header password AppViewX login password. String Required if sessionId is not provided.
Header Content-Type Specifies the nature of the data in the payload. String Value of the param should be ‘application/json’.
Query gwkey Tenant Key. Needed only in case of multi-tenant installations.

String

Query gwsource Source from which the request is triggered (Eg: web, external). String
Body payload Contains all the params to be sent in the request body for the put request.

Key value pair

Payload

Payload

Name Mandatory Description Field Type Constraints
deviceName Yes Name of the device(s) to manage. String[]

It can contain only alphanumeric characters, ‘-’ , ’_’ , ‘.’ , ‘*’ , ‘|’, ‘!’.

Response Structure

On 202 Accepted, manage device action will be initiated on requested device and string of type application/json will be returned with the following body params:
Name Description Field Type
response Success message or failure description in case of error. String
message Success message or failure description in case of error. String
appStatusCode Application-specific status code for the response. Will be non-null for failure response. String
tags More info in case of failure response. Key value pair

Status Codes

HTTP Status Code appStatusCode Message Possible Remediation
202 Accepted - State change to manage the device has been initiated. -
400 Bad Request ADC_INV_0234 Device name is mandatory.Value cannot be null or empty. Check and ensure a valid value is provided in field deviceName.
400 Bad Request AVX-VLDTN-001 Invalid payload data. Check and ensure a valid value is provided in field payload.
404 Not Found ADC_INV_0010 Device not found. Any of the given devices is not found in the database. Ensure if all the requested devices are added in inventory.
403 Forbidden ADC_INV_0008 Selected device(s) are not in un-managed state. Operation cannot be performed. All the requested devices are not in unmanaged state. Requested devices should be in unmanaged state to perform manage action.

Sample Request/Response

Use Case

Change the state of device ADC_DEVICE_1 from unmanaged to managed.

Sample Request
{

  "payload": {

    "deviceName": [

      "ADC_DEVICE_1"

    ]

  }

}
Sample Response
{

  "response": "State change to manage the device has been initiated",

  "message": "State change to manage the device has been initiated",

  "appStatusCode": null,

  "tags": null,

  "headers": null

}