Structure API › Groups
GET /groups
Returns all groups with basic information and settings.
Resource URL
https://api.toornament.com/organizer/v2/groups
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:result
ororganizer:admin
scope (see Authorization) - Rangestring
A range of requested items using the
groups
unit. The size of the range can not exceed 50. (see Pagination)Example: groups=0-49
Query Parameters
- stage_idsarray
A list of stage ids to filter.
Example: 618965765764577354,618931468547654563
- stage_numbersarray
A list of stage numbers to filter.
Example: 1,3
- tournament_idsarray
Only return groups for the given list of tournaments.
Example: 618965416546776434,618975467354349191
Request Body
This endpoint does not require a request body.
Response
[200] Group retrieved.
Example
[ { "match_settings": { "format": { "type": "best_of", "options": { "nb_match_sets": 3 } } }, "tournament_id": "378426939508809728", "id": "618983668512789184", "stage_id": "618983668512789184", "number": 2, "name": "Group B", "closed": false, "settings": { "pairing_values": [] } } ]
Structure (collection)
- match_settingsobject
Settings that define the match configuration used in the group.
Example: {"format":{"type":"best_of","options":{"nb_match_sets":3}}}
- tournament_idstring
The id of the tournament that contains this group.
Example: "378426939508809728"
- idstring
The id of the group.
Example: "618983668512789184"
- stage_idstring
The id of the stage that contains the group.
Example: "618983668512789184"
- numberinteger
A number used for ordering groups.
Example: 2
- namestring
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Whether the group is closed.
Example: false
- settingsobject
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}
GET /groups/{id}
Returns a group by the given id with basic information and settings.
Resource URL
https://api.toornament.com/organizer/v2/groups/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:result
ororganizer:admin
scope (see Authorization)
Path parameters
- idstring
The id of the group.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Group retrieved.
Example
{ "match_settings": { "format": { "type": "best_of", "options": { "nb_match_sets": 3 } } }, "tournament_id": "378426939508809728", "id": "618983668512789184", "stage_id": "618983668512789184", "number": 2, "name": "Group B", "closed": false, "settings": { "pairing_values": [] } }
Structure (object)
- match_settingsobject
Settings that define the match configuration used in the group.
Example: {"format":{"type":"best_of","options":{"nb_match_sets":3}}}
- tournament_idstring
The id of the tournament that contains this group.
Example: "378426939508809728"
- idstring
The id of the group.
Example: "618983668512789184"
- stage_idstring
The id of the stage that contains the group.
Example: "618983668512789184"
- numberinteger
A number used for ordering groups.
Example: 2
- namestring
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Whether the group is closed.
Example: false
- settingsobject
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}
PATCH /groups/{id}
Updates a single group. You can either change a group settings, or open/close it (validation), but not both at the same time.
Resource URL
https://api.toornament.com/organizer/v2/groups/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Path parameters
- idstring
The id of the group.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Group data
Example
{ "name": "Group B", "closed": false, "settings": { "pairing_values": [] }, "match_settings": { "format": { "type": "best_of", "options": { "nb_match_sets": 3 } } } }
Structure (object)
- namestring
Optional
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Optional
Whether the group is closed.
Example: false
- settingsobject
Optional
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}
- match_settingsobject
Optional
Settings that define the match configuration used in the group.
Example: {"format":{"type":"best_of","options":{"nb_match_sets":3}}}
Response
[200] Success
Example
{ "match_settings": { "format": { "type": "best_of", "options": { "nb_match_sets": 3 } } }, "tournament_id": "378426939508809728", "id": "618983668512789184", "stage_id": "618983668512789184", "number": 2, "name": "Group B", "closed": false, "settings": { "pairing_values": [] } }
Structure (object)
- match_settingsobject
Settings that define the match configuration used in the group.
Example: {"format":{"type":"best_of","options":{"nb_match_sets":3}}}
- tournament_idstring
The id of the tournament that contains this group.
Example: "378426939508809728"
- idstring
The id of the group.
Example: "618983668512789184"
- stage_idstring
The id of the stage that contains the group.
Example: "618983668512789184"
- numberinteger
A number used for ordering groups.
Example: 2
- namestring
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Whether the group is closed.
Example: false
- settingsobject
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}
LegacyGET /tournaments/{tournament_id}/groups
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
Returns all groups of a tournament with basic information and settings.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/groups
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:result
scope (see Authorization) - Rangestring
A range of requested items using the
groups
unit. The size of the range can not exceed 50. (see Pagination)Example: groups=0-49
Path parameters
- tournament_idstring
The id of the tournament you want to retrieve data about.
Query Parameters
- stage_idsarray
A list of stage ids to filter.
Example: 618965765764577354,618931468547654563
- stage_numbersarray
A list of stage numbers to filter.
Example: 1,3
Request Body
This endpoint does not require a request body.
Response
[206] Groups retrieved.
Example
[ { "id": "618983668512789184", "stage_id": "618983668512789184", "number": 2, "name": "Group B", "closed": false, "settings": { "pairing_values": [] } } ]
Structure (collection)
- idstring
The id of the group.
Example: "618983668512789184"
- stage_idstring
The id of the stage that contains the group.
Example: "618983668512789184"
- numberinteger
A number used for ordering groups.
Example: 2
- namestring
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Whether the group is closed.
Example: false
- settingsobject
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}
LegacyGET /tournaments/{tournament_id}/groups/{id}
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
Returns a group with the given id with basic information and settings.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/groups/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:result
scope (see Authorization)
Path parameters
- tournament_idstring
The id of the tournament you want to retrieve data about.
- idstring
The id of the group.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Group retrieved.
Example
{ "id": "618983668512789184", "stage_id": "618983668512789184", "number": 2, "name": "Group B", "closed": false, "settings": { "pairing_values": [] } }
Structure (object)
- idstring
The id of the group.
Example: "618983668512789184"
- stage_idstring
The id of the stage that contains the group.
Example: "618983668512789184"
- numberinteger
A number used for ordering groups.
Example: 2
- namestring
The name of the group.
Max. length: 30 characters
Example: "Group B"
- closedboolean
Whether the group is closed.
Example: false
- settingsobject
Settings that describe the various options related to the stage types.
Example: {"pairing_values":[]}