getMGActivationStatus

POST public/getMGActivationStatus

Checks whether an edge security device (ESD) has finished activating. After activateMG, the ESD downloads its configuration, restarts, and sends a status report. This function returns success once the ESD has sent a status report after the time you specify.

Request syntax

curl https://apiv2.acumera.net/public/getMGActivationStatus \
  --cookie av_session.txt \
  --data-urlencode "location_id=<location_id>" \
  --data-urlencode "serial_number=<serial_number>" \
  --data-urlencode "timestamp=<unix_timestamp>"

The username, password, and tfa_token parameters are also accepted, and are required only if the client hasn't already signed in with login. See Getting started with the SC//AcuVigil API.

Request parameters

The request accepts the following parameters in a form-encoded body.

Parameter Type Description Required Default value
location_id Integer The ID of the location being activated. Yes
serial_number String The serial number of the ESD being activated, for example 0041ac000003. Yes
timestamp Integer A Unix timestamp. The ESD counts as activated only if it has sent a status report after this time. Use the time you called activateMG. Yes

Response syntax

{
    "success": "string",
    "returnCode": "string",
    "returnMessage": "string"
}

Response parameters

Field Description
success "1" if the ESD is activated and reporting, "0" if it isn't yet or the request failed.
returnCode SITE_ACTIVATED_AND_RESPONDING when the ESD has reported after timestamp, or SITE_NOT_YET_ACTIVATED when it hasn't.
returnMessage A description of the result.

Errors

If the call fails, success is "0", and returnCode and returnMessage describe the problem. The HTTP status is still 200.

Return code Message Cause
NO_LOCATION_SELECTED No location was selected or the location does not exist. location_id is missing or isn't a number.
LOCATION_NOT_FOUND The location was not found. No location has that ID.
AUTH_FAILED_FUNC_NOT_ALLOWED Authorization failed because you are not permitted to access the requested function. Your account isn't allowed to activate ESDs at this location.
INVALID_SERIAL_NUMBER Invalid serial number. serial_number is missing or isn't a valid ESD serial number.
INVALID_TIMESTAMP The timestamp is invalid. timestamp is missing, isn't a number, or is 0.
SITE_NOT_YET_ACTIVATED The location has not yet activated. The ESD hasn't sent a status report from this location since timestamp. Wait and try again.
INVALID_LOGIN We were unable to log you in. Make sure you entered the correct username, password and 2FA code. You haven't signed in, your session has ended, or the credentials sent with the call are wrong.

Examples

Example: Check whether an ESD has finished activating

This example checks whether the ESD has reported since the activation started at 1793397493.

curl https://apiv2.acumera.net/public/getMGActivationStatus \
  --cookie av_session.txt \
  --data-urlencode "location_id=4510" \
  --data-urlencode "serial_number=0041ac000003" \
  --data-urlencode "timestamp=1793397493"

Response:

{
    "success": "1",
    "returnCode": "SITE_ACTIVATED_AND_RESPONDING",
    "returnMessage": "Congratulations! The location has been successfully activated!"
}

Example: The ESD hasn't reported yet

{
    "success": "0",
    "returnCode": "SITE_NOT_YET_ACTIVATED",
    "returnMessage": "The location has not yet activated."
}

Activation can take several minutes. Call the function again every minute or so until it returns SITE_ACTIVATED_AND_RESPONDING.