Ana içeriğe geç

Get Geolocation Status

Endpoint

GET /apiops/settings/geolocation/

Authentication

Requires a Personal API Access Token belonging to a user with the ADMIN role.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

This endpoint takes no path, query or body parameters. Geolocation is a system-wide setting, not a project-scoped one.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"resultList": [
{
"enabled": true,
"name": "GeoLite2-City",
"fileName": "GeoLite2-City.mmdb",
"uploadDate": "2026-08-01T09:14:22.301Z",
"mmdbFileUploaded": true
}
],
"resultCount": 1
}

When Geolocation has never been configured, the setting is returned with its defaults and mmdbFileUploaded: false.

Response Fields

FieldTypeDescription
enabledbooleanWhether Geolocation is enabled
namestringGeolocation setting name
fileNamestringName of the MMDB file recorded on the setting
uploadDatedateWhen the MMDB file was uploaded
mmdbFileUploadedbooleanWhether the MMDB file data actually exists in the database

Error Response (400 Bad Request)

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

cURL Example

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

Notes and Warnings

  • The MMDB file is never downloaded: MMDB databases are typically tens of megabytes. This endpoint returns status metadata only; there is no APIops endpoint that streams the file back
  • fileName vs mmdbFileUploaded: fileName and uploadDate are stored on the setting document, while the file itself is stored separately in chunks. Use mmdbFileUploaded to check whether the data is really present - a setting can carry a file name while the data is absent
  • Read-only: This endpoint does not modify anything and does not trigger a deployment

Permissions

  • User must have the ADMIN role (system administrators also qualify)