POST public/activateMG
Activates an edge security device (ESD) at a location. Activation assigns the ESD to the location, generates the site's network configuration from a LAN numbering template, and installs the default applications. The ESD then downloads the configuration and restarts.
Request syntax
curl https://apiv2.acumera.net/public/activateMG \
--cookie av_session.txt \
--data-urlencode "location_id=<location_id>" \
--data-urlencode "serial_number=<serial_number>" \
--data-urlencode "lan_numbering_template=<template_name>"
All parameters are required. 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.
Before you activate
Before you call activateMG:
- The ESD must be powered on, connected, and checked in with SC//AcuVigil.
- The ESD must not already be active or assigned to a location in another company.
- The location must not already be active.
To check these, use getMGInstallStatus. After you activate, use getMGActivationStatus to follow the ESD until it reports in with its new configuration.
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 to activate at the location, for example 0041ac000003. |
Yes | |
lan_numbering_template |
String | The LAN numbering template that sets the site's network addressing. Use the name of one of your company's LAN numbering templates, or existing to use the location's existing numbering. |
Yes |
Response syntax
{
"success": "string",
"returnCode": "string",
"returnMessage": "string"
}
Response parameters
| Field | Description |
|---|---|
success |
"1" if the location was activated, "0" if it wasn't. |
returnCode |
A code for the result, for example SITE_ACTIVATED_BASIC. |
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. |
INVALID_SERIAL_NUMBER |
Invalid serial number. | serial_number is missing, isn't a valid ESD serial number, or doesn't match any ESD. |
LAN_NUMBERING_TEMPLATE_NOT_FOUND |
The requested LAN Numbering template was not found. | lan_numbering_template is missing, or isn't existing or the name of one of your company's LAN numbering templates. |
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. |
DEFAULT_NUMBERING_NOT_SET |
This template requires that the Default IP Numbering is set in the location's Info page. | The LAN numbering template needs the location's default IP numbering, and it isn't set. |
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: Activate an ESD with a LAN numbering template
This example activates the ESD with serial number 0041ac000003 at location 4510, using the Store-Standard LAN numbering template.
curl https://apiv2.acumera.net/public/activateMG \
--cookie av_session.txt \
--data-urlencode "location_id=4510" \
--data-urlencode "serial_number=0041ac000003" \
--data-urlencode "lan_numbering_template=Store-Standard"
Response:
{
"success": "1",
"returnCode": "SITE_ACTIVATED_BASIC",
"returnMessage": "The location has been activated."
}
The ESD can take several minutes to download its configuration, restart, and report in. To follow its progress, use getMGActivationStatus.
Example: Activate an ESD and keep the location's existing numbering
curl https://apiv2.acumera.net/public/activateMG \
--cookie av_session.txt \
--data-urlencode "location_id=4510" \
--data-urlencode "serial_number=0041ac000003" \
--data-urlencode "lan_numbering_template=existing"
Example: Activate a location that's already active
{
"success": "0",
"returnCode": "SITE_ALREADY_ACTIVATED",
"returnMessage": "The location has already been activated."
}
Example: Activate an ESD that hasn't checked in
{
"success": "0",
"returnCode": "MG_NOT_CHECKED_IN_FOR_API",
"returnMessage": "This Edge Security Device has not checked in with AcuVigil and therefore cannot be activated."
}