Ana içeriğe geç

Enable Geolocation

Endpoint

PUT /apiops/settings/geolocation/enable

Authentication

Requires a Personal API Access Token with system admin access (sysAdmin or ADMIN authority).

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

None.

Request Body

None.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true,
"responseTime": 1500,
"detailList": [
{
"envName": "production",
"success": true,
"detail": "Deployed successfully",
"responseTime": 450
}
]
}
}

Error Response (400 Bad Request)

Non-admin user with valid token:

{
"status": "FAILURE",
"resultMessage": "Unauthorized! Only users with ADMIN role can access this resource!"
}

Error Response (401 Unauthorized)

Invalid or missing API token.

{
"status": "FAILURE",
"resultMessage": "User not found!"
}

cURL Example

curl -X PUT \
"https://demo.apinizer.com/apiops/settings/geolocation/enable" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions

User must have system admin (sysAdmin) or ADMIN authority. See Geolocation API.

Notes and Warnings

  • System admin only:

    • Not a project-scoped endpoint
  • MMDB recommended:

    • Upload an MMDB file before or after enable
    • Backend does not block enable when no MMDB is uploaded; geolocation lookups require a valid MMDB
  • Automatic deployment:

    • Setting is deployed to Gateway environments after enable
    • Deployment results are returned in deploymentResult.detailList