Skip to content
Daniel Ramsay edited this page Mar 19, 2023 · 3 revisions

API endpoints - probe

POST /1.2/prepare/probe

For preparing to register a probe

Generates a new probeHMAC value, stores it in the DB and returns it to the user, only if they are active (e.g. status not pending, banned etc)

POST Data

Field Example Payload
email bob@example.com
date YYYY-MM-DD HH:mm:ss
signature User Private Key `hex_hmac(sha512, email + ':' + date, $secret)`

Response

{

   "success":true,
   "probe_hmac":"abc1234"

}

POST /1.2/register/probe

For registering a probe. The probe UUID is constructed via the follow pseudo code.

$probeSeed = $macAddress; //Or Android ID or something else unique

//probeHMAC is acquired from the /prepare/probe endpoint

$UUID = md5($probeSeed . "-" . $probeHMAC)

POST Data

Field Example Payload
email bob@example.com
probe_seed e456ddb7ea1f4b7b66d0a06b44e5c850
probe_uuid 30a5307cba6a493b2f6bf9d1d8b4ebd1
signature User Private Key

hex_hmac(sha512, probeuuid, $secret)</td.

probe_type raspi / android / atlas / web
country_code ISO 3166-1-alpha-2 location of the probe

Response

{

   "success":true,
   "secret":"fcAhIPCtu02f4SHUrM5LZjEiLurZiDixPTOx"

} 

GET /1.2/status/ip/{ip}

Returns ISP details for a given IP address.

If the {ip} argument is omitted, information is returned for the request's originating IP

GET parameters

Field Example Payload
probe_uuid 30a5307cba6a493b2f6bf9d1d8b4ebd1
date YYYY-MM-DD HH:mm:ss
signature Probe Private Key

hex_hmac(sha512, date, $secret)

Response

{

   "success":true, 
   "ip":"1.2.3.4",
   "isp": "ABC Internet Ltd"

} 

GET 1.2/config/{version}

To get the latest (or a specific) version of the ORG probe config

GET Data

Field Example Payload
version "latest" or [version number]
Format "json" or "xml"

Response

Config file, in json or XML format

See: Censorship Monitoring Project API Block Rules Format