Enable Geolocation
Overview
Enables geolocation functionality in Apinizer. After enabling, geolocation features will be available for use in policies and other components.
Endpoint
PUT /apiops/settings/geolocation/enable
Authentication
Requires a Personal API Access Token with admin privileges.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
None.
Request Body
None.
Response
Success Response (200 OK)
{
"success": true,
"deploymentResult": {
"success": true,
"message": "Deployment completed successfully",
"environmentResults": [
{
"environmentName": "production",
"success": true,
"message": "Deployed successfully"
}
]
}
}
Error Response (401 Unauthorized)
{
"error": "unauthorized_client",
"error_description": "User does not have privilege to access admin settings!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/settings/geolocation/enable" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Admin Only:
- This endpoint requires admin privileges
- Only sysAdmin users can enable geolocation
- MMDB File Required:
- MMDB file should be uploaded before enabling
- Geolocation may not work properly without MMDB file
- Automatic Deployment:
- Setting is automatically deployed to all environments
- Deployment results are returned in the response
Related Documentation
- Upload MMDB File - Upload MMDB file
- Disable Geolocation - Disable geolocation