Tournaments
Object Types
Tik::Model::Tournament
{
"_type": "Tik::Model::Tournament",
// (ObjectId) ID of the tournament
"_id": "",
// (string) name of the tournament
"name": "",
// (Sportstype) identifier of the sportstype
"sportstype": "",
// (ObjectId) ID of the organization that owns the tournament
"owner_id": ""
}
Create a Tournament
Request: POST /api/v5/write/tournament/create.json
Query Parameters: (none)
Post Document:
{
"_type": "Tik::Model::Tournament",
// (string, required) name of the tournament
"name": "",
// (Sportstype, required) identifier of the sportstype
"sportstype": "",
// (ObjectId, required) ID of the organization that becomes the new owner of the tournament
"owner_id": ""
}
Success Response: Tik::Model::Tournament
Object
Update a Tournament
Only the name of a tournament can be updated!
Request: POST /api/v5/write/tournament/update.json
Query Parameters: (none)
Post Document:
{
"_type": "Tik::Model::Tournament",
// (ObjectId) ID of the tournament
"_id": "",
// (string, required) name of the tournament
"name": ""
}
Success Response: Tik::Model::Tournament
Object
Read a Tournament
Request: GET /api/v5/write/tournament/show.json
Query Parameters:
_id
: (ObjectId, required) The ID of the tournament
Success Response: Tik::Model::Tournament
Object
Search Tournaments
Request: GET /api/v5/write/tournament/index.json
Query Parameters:
q
: (string) Full-text search querysportstype
: (Sportstype, optional) Filters tournaments by sportstypearchive_id
: (ObjectId, optional) Filters tournaments by archive-
owner_id
: (ObjectId, optional) Filters tournaments by owner limit
: (int, optional, default: 30) The number of tournaments to returnpage
: (int, optional, default: 1) For pagination
Success Response: Tik::Model::Collection
containing Tik::Model::Tournament
Objects