getMGInstallStatus

POST public/getMGInstallStatus

Checks whether an edge security device (ESD) can be activated at a location. If it can, returns the LAN numbering templates you can activate it with. Call this before activateMG.

Request syntax

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

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 to activate. To find location IDs, use getCompanyInfo with include_sites=1. Yes
serial_number String The serial number of the ESD, for example 0041ac000003. Yes

Response syntax

{
    "success": "string",
    "data": {
        "lan_numbering_templates": [
            "string"
        ]
    }
}

Response parameters

If the call succeeds, success is "1" and the following data is returned.

Field Description
lan_numbering_templates The LAN numbering templates you can use with activateMG. existing is included when the ESD already has a network configuration you can keep. The other names are your company's LAN numbering templates.

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.
INVALID_SERIAL_NUMBER Invalid serial number. serial_number is missing, isn't a valid ESD serial number, or doesn't match any ESD.
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.
SITE_ALREADY_ACTIVATED The location has already been activated. The location is already active.
MG_NOT_CHECKED_IN_FOR_API This Edge Security Device has not checked in with AcuVigil and therefore cannot be activated. The ESD hasn't checked in with SC//AcuVigil. Make sure it's powered on and connected to the internet.
MG_ALREADY_ACTIVATED The Edge Security Device has already been activated. The ESD is already active at a location.
MG_CANNOT_BE_ACTIVATED_AT_LOCATION The Edge Security Device cannot be activated at this location, as it is shown as being present at a different company. The ESD is assigned to a different company. Contact Scale Computing Support. For more information, see Getting support.
NO_LAN_NUMBERING_TEMPLATES_FOUND No LAN Numbering templates were found for this location. The company has no LAN numbering templates. Contact Scale Computing Support.
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 that an ESD can be activated

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

Response:

{
    "success": "1",
    "data": {
        "lan_numbering_templates": ["existing", "default", "Store-Standard", "Store-Fuel"]
    }
}

The ESD can be activated. Pass one of these names as lan_numbering_template to activateMG.

Example: Check a location that's already active

{
    "success": "0",
    "returnCode": "SITE_ALREADY_ACTIVATED",
    "returnMessage": "The location has already been activated."
}