-
Notifications
You must be signed in to change notification settings - Fork 1
Server API
Will Davies edited this page Oct 3, 2018
·
9 revisions
All calls to the server should be made using an HttpConnection
with URL parameters.
A Java implementation of this API is available at: https://github.com/wdavies973/RobluCloud-API
General parameter and miscellaneous definitions:
-
code
is the unique string used to identify teams, it's a secret code that only team members should use, it determines which team's data should be modified in the requests below. -
time
generally refers to the milliseconds UNIX time stamp of the last successful sync, if the server's internal time stamp is greater than thetime
parameter, it will return updated information, otherwise, nothing will be returned. Note: the server will divide every milliseconds time stamp by 1000 to get seconds so it doesn't need to store as big of numbers. - Parameters should be added to the end of the server's IP address, the official cloud IP address is:
http://ec2-13-59-164-241.us-east-2.compute.amazonaws.com/
. See the/sync/cloud/API
in Roblu Scouter to see a working Java implementation of the Roblu Cloud API. -
auth
is the unique random string used to identify server admins that have elevated privileges - Roll: "Master" means the method is primarily used by Roblu Master, "Scouter" means the method is primarily used by Roblu Scouter.
-
GET /teams/getTeam
- Parameters:
code
- Returns: Team model (
FRC number
,active_event_name
,last_ui_edit
,last_edit
,active
,form
,ui
) - Roll: Scouter
- Parameters:
-
GET /teams/isActive
- Parameters:
code
- Returns: true if the client should continue to sync with the server
- Roll: Scouter
- Parameters:
-
GET /teams/regenerateCode
- Parameters:
code
- Returns: newly regenerated code for the team
- Roll: Master
- Parameters:
-
POST /teams/pushForm
- Parameters:
content
containing serialized, compressedRForm
model - Returns: none
- Roll: Master
- Parameters:
-
POST /teams/pushUI
- Parameters:
content
containing serialized, compressedRUI
model - Returns: none
- Roll: Master
- Parameters:
-
POST /checkouts/init
- Description: Sets all the parameters to the team model, updates its timestamp, and sets the team model to active
- Parameters:
code
,number
(FRC team number),active_event_name
,form
,ui
- Roll: Master
-
GET /checkouts/purge
- Description: Tells the server to stop managing the event, the event will be deleted, and all Roblu Scouters will be cleared
- Parameters:
code
- Team code, for authentication - Used by: Roblu Master
-
POST /checkouts/pushCheckouts
- Parameters:
-
code
- Team code, for authentication -
content
serialized array ofRCheckout
models
-
- Returns: nothing
- Used by: Roblu Scouter
- Parameters:
-
GET /checkouts/pullCheckouts
- Pulls a list of checkouts on the server, filtered by timestamp
- Parameters:
-
code
- The team code, for authentication -
teamNumber
(Optional) - If the team has opted in, the teamNumber may be used to obtain read-only data instead ofcode
. -
pullAll
(Optional) - set to true to return all checkouts regardless of timestamp (syncIDs
is not required if this parameter is provided) -
syncIDs
- A serialized array of checkout ID and their corresponding timestamp (the last time they were pulled). Look here for the proper serialization technique.
-
- Example return
- Used by: Roblu Scouter
-
GET /checkouts/pullCompletedCheckouts
- Pulls a list of checkouts from the server, filtered by timestamp & status (=completed)
- Parameters:
-
code
- The team code, for authentication -
syncIDs
- A serialized array of checkout ID and their corresponding timestamp (the last time they were pulled). Look here for the proper serialization technique.
-
- Returns: The same as
checkouts/pullCheckouts
except checkouts have a status like: (3, "completed") - Usedy by: Roblu Master
-
GET /admin/getTeam
- Parameters:
auth
,ownerEmail
- Returns: the requested team model
- Parameters:
-
GET /admin/createTeam
- Parameters:
auth
,ownerEmail
,secret
,officialName
- Returns: the newly created team
- Parameters:
-
GET /admin/deleteTeam
- Parameters:
auth
,ownerEmail
,officialName
- Returns: the deleted team
- Parameters:
-
GET /admin/regenerateCode
- Parameters:
auth
,officialName
,ownerEmail
- Returns: new team code
- Parameters: