Waze.Tools CIFP Waze.Tools CIFP CIFP
FILLER
errorFILLER
FILLER
FILLER
FILLER
helpFILLER
FILLER
API Reference - Version 0.3.beta
Data Flow Example
Script Configuration
At this stage the script and WebApp user interfaces are only available in English.
In a future expansion, messages will be localized and passed (already translated) to the script via this API.
Maybe. :-)
Endpoint
[GET] https://cifp.waze.tools/api/getcfg
Response OK (API Server → Script WME)
{
  "rc": 200,
  "Icon": "data:image/png;base64,[BASE64_PNG_ICON_HERE]",
  "About": {
    "lblAppName": "Closure and Incidents Feed",
    "lblAuthors": "fmondini",
    "lblAuthUrl": "https://www.waze.com/en/user/editor/fmondini",
    "lblBugsRpt": "Report bugs and enhancement <a href="BUG_REPORTS_URL" target="_blank">here</a>"
  },
  "Messages": {
    "lblCreating": "Creating new Closures Group",
    "lblPleaseWait": "Please wait just a moment..."
  },
  "Results": {
    "lblNewHeadOK": "A new closure group has been created",
    "lblNewHeadKO": "New group NOT Created",
    "lblNewBodyOK": "Your new closures group has been created successfully",
    "lblNewBodyKO": "Error creating the new closure group",
    "lblNewNextOK": "Click on the new GroupID to configure closures<br>directly in the Waze.Tools CIFP Web App"
  },
  "Errors": {
    "lblHal9000": "I'm sorry, Dave... I'm afraid I can't do that.",
    "lblNoSelObj": "No segments selected<br>Please select one or more segment(s) to unlock",
    "lblSeeConsole": "See your browser console (F12) for more details (if available)"
  }
}
Response KO (API Server → Script WME)
{
  "status": "KO",
  "error": "Custom Error Message Here"
}
New closure creation
Endpoint
[GET] https://cifp.waze.tools/api/group/create
NOTE: This version uses GET to avoid AJAX JSONP limitations
Payload (Script WME → API Server)
{
  "source": "x.y.z.ga",
  "apiKey": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", (Request a valid API-KEY from your country coordinator)
  "user": "fmondini",
  "city": "",
  "state": "Lombardia",
  "country": "Italy",
  "ctryIso": "IT",
  "wmeEnv": "row",
  "wmeLat": 45.55656,
  "wmeLng": 9.9337,
  "wmeZoom": 16,
  "groupId": "", Always "" (empty) → insert new group id
  "data": [
    {
      "street": "Via Vincenzo Gioberti",
      "polyline": "45.53802 9.93679, 45.53779 9.93676",
      "sid": 83344301
    }, {
      "street": "Via della Battaglia",
      "polyline": "45.53722 9.94097, 45.53726 9.94101, 45.53773 9.94126, 45.53782 9.94133, 45.53787 9.94142, 45.5379 9.9415, 45.5379 9.9421",
      "sid": 253320299
    }, {
      "street": "Via della Battaglia",
      "polyline": "45.53812 9.94304, 45.53818 9.94349",
      "sid": 397809899
    },
    {
       ... repeats "n" times
    }
  ]
}
Response OK (API Server → Script WME)
{
  "status": "OK",
  "gid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", (New Group UUID)
}
Response KO (API Server → Script WME)
{
  "status": "KO",
  "error": "Custom Error Message Here"
}
Existing closure update
Endpoint
[GET] https://cifp.waze.tools/api/group/update
NOTE: This version uses GET to avoid AJAX JSONP limitations
Payload (Script WME → API Server)
{
  "source": "x.y.z.ga",
  "apiKey": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", (Request a valid API-KEY from your country coordinator)
  "user": "fmondini",
  "city": "",
  "state": "Lombardia",
  "country": "Italy",
  "ctryIso": "IT",
  "wmeEnv": "row",
  "wmeLat": 45.55656,
  "wmeLng": 9.9337,
  "wmeZoom": 16,
  "groupId": "xxxxxxxx-yyyy-zzzz-jjjj-kkkkkkkkkkkk", UUID of the group to change
  "data": [
    {
      "street": "Via Vincenzo Gioberti",
      "polyline": "45.53802 9.93679, 45.53779 9.93676",
      "sid": 83344301
    }, {
      "street": "Via della Battaglia",
      "polyline": "45.53722 9.94097, 45.53726 9.94101, 45.53773 9.94126, 45.53782 9.94133, 45.53787 9.94142, 45.5379 9.9415, 45.5379 9.9421",
      "sid": 253320299
    }, {
      "street": "Via della Battaglia",
      "polyline": "45.53812 9.94304, 45.53818 9.94349",
      "sid": 397809899
    },
    {
       ... repeats "n" times
    }
  ]
}
Response OK (API Server → Script WME)
{
  "status": "OK",
  "gid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" (Updated Group UUID)
}
Response KO (API Server → Script WME)
{
  "status": "KO",
  "error": "Custom Error Message Here"
}
JSON Feed
Endpoint
[GET] https://cifp.waze.tools/feed/get?c={COUNTRY_CODE}
Where {COUNTRY_CODE} is a ISO 3166-1 alpha-3 code.
Payload (Waze → API Server)
NONE
Response OK (API Server → Waze)
{
"incidents": [
  {
    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "type": "ROAD_CLOSED",
    "subtype": "ROAD_CLOSED_CONSTRUCTION",
    "polyline": "45.56296 9.93761 45.56264 9.93756 45.56179 9.93752",
    "direction": "BOTH_DIRECTIONS",
    "street": "Via Sala",
    "starttime": "2024-04-01T00:00:00+0200",
    "endtime": "2024-04-30T23:59:59+0200",
    "description": "Lavori di ripristino su Via Sala",
    "creationtime": "2024-04-09T10:09:58+0200",
    "updatetime": "2024-04-09T17:57:44+0200",
    "reference": "Waze.Tools CIFP v.x.x - GID: xxxxxxxx-yyyy-zzzz-jjjj-kkkkkkkkkkkk",
    "schedule": { The "schedule" element only exists if a schedule has been set
      "saturday": "00:00-23:59",
      "tuesday": "09:00-12:00",
      "thursday": "09:00-11:00,12:00-14:00"
    }
  },
  {
     ... repeats "n" times
  }
}
Response KO (API Server → Waze)
{
  "error": "Custom Error Message Here"
}
Reference
For more information about the Waze CIFP Feed protocol, see the Waze CIFS Feed Reference.
This is an unofficial Waze-related site managed by fmondini -- Waze™ is a trademark of GOOGLE LLC
Site hosted for free by Danisoft Srl, Northern Italy - Vat no. IT02914410986 - Datacenter located in (see here)
Unofficial site by fmondini & the Italian Waze Community
Waze™ is a trademark of Waze Mobile Ltd