Ana içeriğe geç

Enable Geolocation

Endpoint

PUT /apiops/settings/geolocation/enable

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {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