Federation Export API
The federation export API is an API for feeding back competition data to a federation CMS. This competition data includes participant status data, exercise results and category rankings.
It is specifically tailored to integrating competition data back in to the CMS, since it leans on the ID's originating from the import out of the same CMS.
Receive the data in a CMS callback
If the receiving CMS has a callback defined for receiving the competition data. The user can trigger the data export to this callback from the ScoreExpress web interface.
- method:
POST - url:
<baseurl>/<method-path>
To enable this, the callbackUrl needs to be set in the competition configuration.
Data schema
Export schema
json
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "http://scoreexpress.io/schema/v1/competitionExport.schema.json",
"title": "Competition Export",
"description": "Top level schema for exporting a competition",
"type": "array",
"items": {
"$ref": "http://scoreexpress.io/schema/v1/categoryExport.schema.json"
}
}The export data is an array of categories, with within each category object all information related to the category.
The number of categories depends on the categories configured in the competition and the export call arguments.
Category schema
json
{
"$schema": "http://json-schema.org/draft-2020-12/schema",
"$id": "http://scoreexpress.io/schema/v1/categoryExport.schema.json",
"title": "Category Export",
"description": "Schema for exporting a category",
"type": "object",
"properties": {
"eventId": {
"type": "string",
"description": "Identifier of the event in the importing system (organiser defined)"
},
"categoryId": {
"type": "string",
"description": "Identifier of the category in the importing system (organiser defined)"
},
"rounds": {
"type": "array",
"description": "List of rounds in the category",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the round"
},
"index": {
"type": "integer",
"description": "Index of the round",
"minimum": 0
}
}
}
},
"participants": {
"type": "array",
"description": "List of participants in the category",
"items": {
"$ref": "http://scoreexpress.io/schema/v1/participantExport.schema.json"
}
},
"teams": {
"type": "array",
"description": "List of teams in the category",
"items": {
"$ref": "http://scoreexpress.io/schema/v1/teamExport.schema.json"
}
},
"ranking": {
"type": "array",
"description": "List of rankings in the category",
"items": {
"$ref": "http://scoreexpress.io/schema/v1/rankingExport.schema.json"
}
}
}
}Fields
eventId- Identifier of the event in the importing system (organiser defined)categoryId- Identifier of the category in the importing system (organiser defined)rounds- List of rounds in the category, indexed starting from 0participants- List individual and group participants in the categoryteams- List of teams in the categoryranking- List of rankings in the category
Participant schema
json
{
"$schema": "http://json-schema.org/draft-2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the participant in the importing system (organiser defined)"
},
"status": {
"enum": [],
"description": "Status of the participant in the first round (index 0)"
},
"bib": {
"type": "integer",
"description": "Bib number of the participant",
"minimum": 1,
"maximum": 9999
},
"exercises": {
"type": "array",
"description": "List of exercises for the participant",
"items": {
"type": "object",
"properties": {
"status": {
"enum": ["scheduled", "finished", "dns", "dnf"],
"description": "Status of the exercise"
},
"type": {
"type": "string",
"description": "Localized name of the exercise type, based on the language set in the competition"
},
"round": {
"type": "integer",
"description": "Index of the round the exercise belongs to",
"minimum": 0
},
"total": {
"type": "number",
"description": "Final score of the exercise (for AA results if relevant)"
},
"passes": {
"type": "array",
"description": "array of passes executed in the exercise",
"items": {
"type": "object",
"properties": {
"values": {
"type": "array",
"description": "score values for the exercise pass, one for each exercise part",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Label for the value"
},
"value": {
"type": "string",
"description": "Score value, formatted"
}
}
}
},
"total": {
"type": "string",
"description": "Total score of the pass (formatted)."
}
}
}
}
}
}
}
}
}Fields
id- Identifier of the participant in the importing system (organiser defined)status- Status of the participant in the first round (index 0)bib- Bib number of the participantexercises- List of exercises for the participantstatus- Status of the exercisetype- Localized name of the exercise type,passes- List of passes executed in the exercisevalues- score values for the exercise pass,total- Total score of the pass (formatted)
total- Final score of the exercise (unformatted)
Team schema
json
{
"$schema": "http://json-schema.org/draft-2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the team in the importing system (organiser defined)"
},
"status": {
"type": "string",
"description": "Status of the team in the first round (index 0)"
}
}
}Fields
id- Identifier of the team in the importing system (organiser defined)status- Status of the team in the first round (index 0)
Ranking schema
json
{
"$schema": "http://json-schema.org/draft-2020-12/schema",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Title of the ranking"
},
"type": {
"enum": ["AA", "TEAM-AA", "EVENTS", "TEAM-EVENTS"],
"description": "Type of the ranking"
},
"subtype": {
"enum": ["open", "regular","regional", "subDivision"],
"description": "Subtype of the ranking"
},
"region": {
"type": "string",
"description": "Code of the region (if subtype is regional)"
},
"subDivision": {
"type": "integer",
"description": "Subdivision (if subtype is subDivision)"
},
"items": {
"type": "array",
"description": "List of items in the ranking",
"items": {
"type": "object",
"properties": {
"participantId": {
"type": "string",
"description": "ID of the participant (as in the participant list)"
},
"award": {
"type": "string",
"description": "Award (if any) for the participant"
},
"result": {
"type": "string",
"description": "Result of the participant (formatted)"
},
"ranking": {
"type": "number",
"description": "Ranking of the participant (when applicable)"
}
}
}
}
}
}Fields
title- Title of the rankingtype- Type of the rankingAA- Individual All-around rankingTEAM-AA- Team All-around rankingEVENTS- Individual Event (apparatus) rankingTEAM-EVENTS- Team event (apparatus) ranking
subtype- Subtype of the rankingopen- Open ranking (includes all participants)regular- Regular ranking (includes all participants, except guests)regional- Ranking with participants from a specific regionsubDivision- Ranking with participants of one subdivision
region- Code of the region (if subtype is regional)subDivision- Subdivision (if subtype is subDivision)items- List of items in the rankingparticipantId- ID of the participant (as in the participant list)award- Award (if any) for the participantresult- Result of the participant (formatted)ranking- Ranking of the participant (when applicable)