These routes relate to retrieving and manipulating a team’s configuration for their machines. These can hold any relevant data pertaining to the machines that you would like teams to be able to edit. This data is meant to be used by checks in order to facilitate checking whether a service is up, such as authentication information for getting access to that service. There is no checking done on these fields in order to tell whether they are needed or not by the checks, for that I suggest reading the documentation on the checks themselves.
Gets all machine configs for the team that the currently logged in user belongs to.
Example request:
GET /current_team/configs HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Cookie: userid=team1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
[
{
'team_id': '1',
'machine_id': 'MongoDB',
'username': 'team1',
'password': 'team1mongo',
'port': '27017'
},
{
'team_id': '1',
'machine_id': 'Redis',
'username': 'team1',
'password': 'team1redis',
'port': 6379
},
{
'team_id': '1',
'machine_id': 'Apache',
'username': 'team1',
'password': 'team1apache',
'port': 80
}
]
Requires Authentication: Yes
Allowed Roles: Team
Creates a new machine config for the team which the currently logged in user belongs to use in the current scoring session.
Example request:
POST /current_team/configs HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Cookie: userid=team1
Content-Type: application/json
{
"machine_id": "MongoDB",
"username": "team1",
"password": "team1mongo",
"port": "27017"
}
Example response:
HTTP/1.1 201 Created
Location: http://example.com/current_team/configs/MongoDB
Requires Authentication: Yes
Allowed Roles: Team
Gets a specific machine’s config for the team that the currently logged in user belongs to.
Example request:
GET /current_team/configs/MongoDB HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Cookie: userid=team1
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"username": "team1",
"password": "team1mongo",
"port": "27017"
}
Requires Authentication: Yes
Allowed Roles: Team
Modifies a specific machine’s config for the team that the currently logged in user belongs to.
Example request:
PATCH /current_team/configs/MongoDB HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Cookie: userid=team1
Content-Type: application/json
{
"username": "team1a",
"password": "team1amongo",
"port": "27018"
}
Example response:
HTTP/1.1 204 No Content
Requires Authentication: Yes
Allowed Roles: Team
Deletes a specific machine’s config for the team that the currently logged in user belongs to.
Example request:
DELETE /current_team/configs/MongoDB HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
Cookie: userid=team1
Example response:
HTTP/1.1 204 No Content
Requires Authentication: Yes
Allowed Roles: Team