GeoIP DB File¶
Overview¶
Use the GeoIP Register Update API to register GeoIP update package files with the BIG-IQ. Before using the GeoIP Register Update API, download the GeoIP DB update file package from F5 . The GeoIP DB update file package can contain a ZIP file and MD5 file. For example, you can manually download the files to your computer using SCP or any other file transfer tool and then copy them to the BIG-IQ.
You can use the GeoIP DB File API to get or delete a GeoIP DB File object. You cannot use the GeoIP DB File API with POST, PUT or PATCH operations. To create a GeoIP DB File object, use the GeoIP Register Update API.
You can use the GeoIP Config API to query GeoIP configuration settings, such as delayTimeBetweenBigips which specifies the number of seconds to wait before updating the next BIG-IP in a sequence of multiple BIG-IPs.
Finally, use the GeoIP Update Manager API to distribute and apply the GeoIP updates from the BIG-IQ to the specified BIG-IPs.
REST Endpoint: /mgmt/cm/device/geoip/dbfile¶
Requests¶
GET /mgmt/cm/device/geoip/dbfile¶
To retrieve a list of all GeoIP DB File objects, you can send a GET request to the /geoip/dbfile endpoint. To retrieve a single GeoIP DB File object, specify the object’s id.
Request Parameters¶
None
Query Parameters¶
None
Response¶
The JSON in the response can contain the following parameters.
HTTP/1.1 200 OK
Name | Type | Description |
---|---|---|
databaseVersion | string | BIG-IQ sets this value automatically based on fileName or filePath. Possible values: “V1” or “V2”. V1 databases can be applied to BIG-IP versions 12.0.0 and earlier. V2 databases can be applied to BIG-IP versions 12.1.0 and later. |
downloadDatetime | string | The time when the package was downloaded. |
fileName | string | The name of the GeoIP Database update package ZIP file without path. |
filePath | string | Name with path of the GeoIP Database update package ZIP file. |
id | string | The UUID for the object. |
name | string | Name based on fileName or filePath. |
selfLink | string | URL of the object. |
size | number | Size in bytes of the GeoIP Database update package ZIP file. |
validationFilePath | string | Name with path of the checksum file of the package. |
Permissions¶
Role | Allow |
---|---|
Device_Common_Viewer | Yes |
device_manager | Yes |
DELETE /mgmt/cm/device/geoip/dbfile/<id>¶
To delete an object, you can send a DELETE request and specify the task’s identifier id. This also removes the files listed in filePath and validationFilePath from the BIG-IQ.
Request Parameters¶
None
Query Parameters¶
None
Permissions¶
Role | Allow |
---|---|
device_manager | Yes |
Examples¶
GET to get an object¶
The following example sends a GET request to the object specified by id. The placeholder <id> represents the value of id, for example: “746fede8-24c4-4191-9b46-083c15ddfb64”. A GET request sent to the /geoip/dbfile endpoint can return all the objects in the collection.
GET https://<BIG-IQ>/mgmt/cm/device/geoip/dbfile/<id>
No request body is required to send a GET request.
Response¶
The response to the GET can contain the selfLink and id of the object. The JSON in the body of the response can look similar to the following example.
HTTP/1.1 200 OK
{
"fileName": "ip-geolocation-1.0.1-20190610.386.0.zip",
"filePath": "/shared/geoip/ip-geolocation-1.0.1-20190610.386.0.zip",
"validationFilePath": "/shared/geoip/ip-geolocation-1.0.1-20190610.386.0.zip.md5",
"name": "1.0.1-20190610.386.0",
"databaseVersion": "V1",
"size": 115335414,
"downloadDatetime": "2020-02-19T19:48:03.263Z",
"id": "746fede8-24c4-4191-9b46-083c15ddfb64",
"kind": "cm:device:geoip:dbfile:geoipdbfilestate",
"selfLink": "https://localhost/mgmt/cm/device/geoip/dbfile/746fede8-24c4-4191-9b46-083c15ddfb64",
"generation": 1,
"lastUpdateMicros": 1582141683262677
}
DELETE to delete an object¶
The following example sends a DELETE request to delete the object specified by id. The placeholder <id> represents the value of id, for example: “746fede8-24c4-4191-9b46-083c15ddfb64”.
DELETE https://<BIG-IQ>/mgmt/cm/device/geoip/dbfile/<id>
No request body is required to send a DELETE request.
Response¶
The JSON in the body of the response is for the deleted item.
HTTP/1.1 200 OK
{
"fileName": "ip-geolocation-1.0.1-20190610.386.0.zip",
"filePath": "/shared/geoip/ip-geolocation-1.0.1-20190610.386.0.zip",
"validationFilePath": "/shared/geoip/ip-geolocation-1.0.1-20190610.386.0.zip.md5",
"name": "1.0.1-20190610.386.0",
"databaseVersion": "V1",
"size": 115335414,
"downloadDatetime": "2020-02-19T19:48:03.263Z",
"id": "746fede8-24c4-4191-9b46-083c15ddfb64",
"kind": "cm:device:geoip:dbfile:geoipdbfilestate",
"selfLink": "https://localhost/mgmt/cm/device/geoip/dbfile/746fede8-24c4-4191-9b46-083c15ddfb64",
"generation": 1,
"lastUpdateMicros": 1582141683262677
}