updateLocationPhoto

POST public/updateLocationPhoto

Changes a photo's description.

Request syntax

curl https://apiv2.acumera.net/public/updateLocationPhoto \
  --cookie av_session.txt \
  --data-urlencode "location_image_id=<photo_id>" \
  --data-urlencode "description=<description>"

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_image_id Integer The photo's ID. To find photo IDs, use getLocationPhotos. Yes
description String The new description. Yes

Response syntax

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

Response parameters

Field Description
success "1" if the description was changed.
returnCode IMAGE_DESCRIPTION_UPDATED when the description was changed.
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_IMAGE_SELECTED No image was selected. location_image_id is missing or isn't a number.
IMAGE_NOT_FOUND The image cannot be located. No photo has that ID.
NO_DESCRIPTION_PROVIDED No image description was entered. description is missing or empty.
AUTH_FAILED_FUNC_NOT_ALLOWED Authorization failed because you are not permitted to access the requested function. You aren't allowed to edit this photo.
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: Change a photo's description

curl https://apiv2.acumera.net/public/updateLocationPhoto \
  --cookie av_session.txt \
  --data-urlencode "location_image_id=19130" \
  --data-urlencode "description=Network rack after cleanup"

Response:

{
    "success": "1",
    "returnCode": "IMAGE_DESCRIPTION_UPDATED",
    "returnMessage": "The image description has been updated."
}

Example: Leave out the description

{
    "success": "0",
    "returnCode": "NO_DESCRIPTION_PROVIDED",
    "returnMessage": "No image description was entered."
}