Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
curl -X GET -H "Argus-API-Key: $API_KEY_ENV_VAR" https://api.mnemonic.no/geoip/v1/country?offset=0&limit=2&fromID=699

Response:

Code Block
collapsetrue
{
  "responseCode": 200,
  "limit": 225,
  "offset": 0,
  "count": 184,
  "metaData": {},
  "messages": [],
  "data": [
    {
      "id": 699,
      "countryName": "ESTONIA",
      "countryCode": "EE",
      "lastModified": 1384636074867,
      "flags": []
    },
    {
      "id": 701,
      "countryName": "ETHIOPIA",
      "countryCode": "ET",
      "lastModified": 1384636075076,
      "flags": []
    }
  ...
  ],
  "size": 225
}

Searching for a country

Request:

Code Block
languagebash
curl -X POST -H "Argus-API-Key: $API_KEY_ENV_VAR" -H "Content-Type: application/json" https://api.mnemonic.no/geoip/v1/country/search -d '{
  "sortBy": [
    "id"
  ],
  "limit": 2,
  "offset": 0,
  "fromID": 699,
  "includeDeleted": true
}'

The response returns the same format as listing countries.

...

Code Block
languagebash
curl -X GET -H "Argus-API-Key: $API_KEY_ENV_VAR" https://api.mnemonic.no/geoip/v1/location?offset=0&limit=2&fromID=699000000732

Response:

Code Block
collapsetrue
{
  "responseCode": 200,
  "limit": 225,
  "offset": 0,
  "count": 1123086,
  "metaData": {},
  "messages": [],
  "data": [
    {
      "id": 699000000732,
      "extID": 588409,
      "countryCode": "EE",
      "cityName": "Tallinn",
      "lastModified": 1658923216878,
      "flags": []
    },
    {
      "id": 699000000733,
      "extID": 0,
      "countryCode": "EE",
      "cityName": "Tahula",
      "lastModified": 1554790763175,
      "flags": [
        "disabled"
      ]
    }
  ...
  ],
  "size": 225
}

Searching for a location

...

Code Block
languagebash
curl -X POST -H "Argus-API-Key: $API_KEY_ENV_VAR" -H "Content-Type: application/json" https://api.mnemonic.no/geoip/v1/location/search -d '{
  "limit": 2,
  "offset": 0,
  "includeDeleted": true,
  "country": [
    "EE"
  ],
  "fromID": 699000000732,
  "sortBy": [
    "id"
  ]
}'

The response returns the same format as listing locations.

...

Code Block
languagebash
curl -X POST -H "Argus-API-Key: $API_KEY_ENV_VAR" -H "Content-Type: application/json" https://api.mnemonic.no/geoip/v1/ranges/search -d '{
  "limit": 2,
  "offset": 0,
  "includeDeleted": true,
  "country": [
    "EE"
  ],
  "locationID": [
    699000000732
  ],
  "fromIP": "5.101.176.0",
  "toIP": "5.101.176.255",
  "addressFamily": "IPv4"
}'

Response:

Code Block
collapsetrue
{
  "responseCode": 200,
  "limit": 225,
  "offset": 0,
  "count": 21,
  "metaData": {},
  "messages": [],
  "data": [
    {
      "id": 291076,
      "range": {
        "fromAddress": {
          "host": true,
          "ipv6": false,
          "maskBits": 32,
          "multicast": false,
          "public": true,
          "address": "5.101.176.0"
        },
        "toAddress": {
          "host": true,
          "ipv6": false,
          "maskBits": 32,
          "multicast": false,
          "public": true,
          "address": "5.101.191.255"
        }
      },
      "countryCode": "EE",
      "locationID": 699000000732,
      "lastModified": 1640696561369,
      "flags": [
        "deleted"
      ],
      "latitude": 59.433,
      "longitude": 24.7323
    },
    {
      "id": 407597944,
      "range": {
        "fromAddress": {
          "host": true,
          "ipv6": false,
          "maskBits": 32,
          "multicast": false,
          "public": true,
          "address": "5.101.176.0"
        },
        "toAddress": {
          "host": true,
          "ipv6": false,
          "maskBits": 32,
          "multicast": false,
          "public": true,
          "address": "5.101.191.255"
        }
      },
      "countryCode": "EE",
      "locationID": 699000000732,
      "lastModified": 1658232213883,
      "flags": [],
      "latitude": 59.433,
      "longitude": 24.7323
    }
  ],
  "size": 21
}