Skip to content

Relay Server REST Communication

IsNull edited this page Oct 7, 2014 · 9 revisions

Overview

The relay server as well as your bot will be deployed in the cloud. There, the bot and the relay station will talk together using a REST API. Since the relay server has to send data to the bot as well, both have to send and listen to their specific REST Endpoints.

REST API Basics

The REST APIs expect the sent data in JSON Format application/JSON.

Relay-Server REST API

Base sever URL: http://relay2.beta.swisscloud.io/ws/rest

POST SpeedControl

The Bot can set the current speed of the race car by sending a POST request at /ws/rest/relay/speed. With each SpeedControl you send to the server, you have to provide your teamId and access code. This is primarily used to avoid distraction from malfunctioning bots while another team is having their race.

SpeedControl Data Example:

{
teamId: "carrera01",
accessCode: "1234",
power: 30,
timeStamp: 1412687269953
}

Clone this wiki locally