Skip to content
Yukikoo edited this page Mar 24, 2017 · 10 revisions

How to create & setup a private dps server

API

You server must provide 2 services

Server Time

URL:{domain}/shared/servertime

Exemple: https://moongourd.com/shared/servertime

this service must return the current timestamp, like this

{"serverTime":1490290511}

the dps meter will read & use the value returned by this service

DPS upload

URL: {domain}/{what you want here}

Example: https://moongourd.com/dpsmeter_data.php

The dps meter will send all the dps data to this URL.

  • Media type: "application/json"
  • Encoding: UTF-8
  • Method: POST

DPS meter configuration

in window.xml config file, add your server URL.

Example:

  <teradps.io>
    <user></user>
    <token></token>
    <enabled>true</enabled>
    <private_servers enabled="true">
      <server>https://www.xxxxx.eu/shared/add_data</server>
    </private_servers>
  </teradps.io>

Sample of uploaded data

TODO

##Annexe The post request sended is raw.

If you use php as server backend, you can use something like that to get the data: $entityBody = file_get_contents('php://input'); https://stackoverflow.com/questions/8945879/how-to-get-body-of-a-post-in-php/8945912#8945912

Clone this wiki locally