Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This document describes how to configure the first rule for sending parking occupancy HTTP requests to your server.

Preparation

Please note that all data API routing templates and routes are applied only for positioned sensors. If you have no positioned sensor, please read Sensor Positioning Manual and configure position at least of one sensor.

Standard Parking HTTP API

Standard Parking HTTP API call contains all the information that can be derived from a single parking occupancy status change message:

{
  "device_id": "{device_id}",
  "position":{
      "network_id": "{network_id}",
      "custom_id": "{custom_id}",
      "latitude": {latitude},
      "longitude": {longitude},
      "group_inner_id": {group_inner_id},
      "group":{
          "id": {group_id},
          "name": "{group_name}",
          "zone_id": {zone_id}
      }
  },
  "message_type": "status_change",
  "message_trace_id": "{message_trace_id}",
  "occupied": "{"occupied" if parsed["occupation_status"] is True else "free"}",
  "parking_session_iterator": {parsed["parking_session_iterator"]},
  "previous_status_duration_min": {parsed["previous_occupancy_status_duration_min"]}
}

API Requests configuration guide

Here we will explain how to configure HTTP API requests sending data from devices in a particular Zone to your endpoint.

  1. Open the Main menu

    2. Go to menu "HTTP → Template suites"

    3. Locate Default Template Suite in the list and click on it. You will see the Template Suite page.

4. Go to the tab TEMPLATES and click on "Standard - Status Change" Template

5. Click on the button Edit in the form Template options

6. Now you can fill your URL into the field Url template

7. Click SAVE button. Your template is ready for use in routing configuration.

Routing configuration

After HTTP Template configuration you have to set up routing rules. Routing rule links Zone to HTTP Template suite. When this step is done you will be able to receive requests on your endpoint (set up in URL Template).

  1. Go to menu HTTP -> Routes

  2. Press the + button in the right bottom

  3. Select your Zone and Template Suite in the opened form. If you want to start receiving HTTP requests right after the route registration, you need to turn the “Active” switch on. Finally, click on button ADD when all these actions will be done.

Viewing the history / status logs of sent HTTP requests

When you've created Zone, set positions of sensors, configured HTTP Template Suite and created route, Nwave cloud starts sending requests bu URL you entered on HTTP Template Page. If you want to check history of sent HTTP requests, you can get to the page "HTTP → History" and see the table of sent requests:

  • No labels