### Match Replacement Example (Concussion Substitute) Source: https://cricsheet.org/format/xml Provides an example of a match replacement due to a concussion substitute. ```xml CP Tremain DR Sams concussion_substitute Sydney Thunder ``` -------------------------------- ### Extras: Byes Source: https://cricsheet.org/format/json Example of how byes are recorded within the extras object. ```json "extras": { "byes": 4 } ``` -------------------------------- ### Extras: Wides Source: https://cricsheet.org/format/json Example of how wides are recorded within the extras object. ```json "extras": { "wides": 1 } ``` -------------------------------- ### Multiple Missing Fields Example Source: https://cricsheet.org/format/json An example demonstrating multiple missing fields, including player of the match, powerplay details for both innings, and reviews. Use for complex scenarios with various missing data points. ```json "missing": [ "player_of_match", { "powerplays": { "1": [ "batting" ], "2": [ "batting" ] } }, "reviews" ] ``` -------------------------------- ### Match Replacement Example (Supersub) Source: https://cricsheet.org/format/xml Details a match replacement where a player is substituted as a supersub. ```xml JAH Marshall JS Patel supersub New Zealand ``` -------------------------------- ### Example Delivery with Run Out Source: https://cricsheet.org/format/xml Illustrates a delivery where a batsman scores a single run and is then run out. The specific fielders involved in the run-out are not identified in this example. ```xml 7 2 Nahida Khan N de Klerk Umaima Sohail 1 0 1 run out Nahida Khan ``` -------------------------------- ### Date Array Formats Source: https://cricsheet.org/format/yaml Examples of the dates field for single-day and multi-day matches. ```yaml dates: - 2008-04-26 ``` ```yaml dates: - 2011-01-02 - 2011-01-03 - 2011-01-04 - 2011-01-05 - 2011-01-06 ``` -------------------------------- ### Example Delivery: Wicket (LBW) Source: https://cricsheet.org/format/json Illustrates a delivery where the batter was dismissed leg-before-wicket. ```json { "batter": "MJ Prior", "bowler": "Harbhajan Singh", "non_striker": "AJ Strauss", "runs": { "batter": 0, "extras": 0, "total": 0 }, "wickets": [ { "kind": "lbw", "player_out": "MJ Prior" } ] } ``` -------------------------------- ### Extras: Leg-byes Source: https://cricsheet.org/format/json Example of how leg-byes are recorded within the extras object. ```json "extras": { "legbyes": 2 } ``` -------------------------------- ### Match Replacement Example (Injury Substitute) Source: https://cricsheet.org/format/yaml Record an injury substitute replacement. The 'reason' field should be 'injury_substitute'. ```yaml replacements: match: - in: CH Stobo out: SA Abbott team: New South Wales reason: injury_substitute ``` -------------------------------- ### Extras: No-balls Source: https://cricsheet.org/format/json Example of how no-balls are recorded within the extras object. ```json "extras": { "noballs": 2 } ``` -------------------------------- ### Define Player Replacements Source: https://cricsheet.org/format/yaml Examples of role and match-level player replacements. ```yaml replacements: role: - in: KJ Abbott reason: injury role: bowler ``` ```yaml replacements: match: - in: CT Bancroft out: SM Whiteman reason: concussion_substitute team: Perth Scorchers ``` -------------------------------- ### Match Replacement Example (Supersub) Source: https://cricsheet.org/format/yaml Record a supersub replacement in a match. The 'in' field should match the supersub player. ```yaml replacements: match: - in: JAH Marshall out: JS Patel reason: supersub team: New Zealand ``` -------------------------------- ### Opening Over Data Example Source: https://cricsheet.org/format/json Represents the first over of an innings, including details of each of the 6 deliveries. ```json { "over": 0, "deliveries": [ { "batter": "AJ Strauss", "bowler": "IK Pathan", "non_striker": "MJ Prior", "runs": { "batter": 0, "extras": 0, "total": 0 } }, { "batter": "AJ Strauss", "bowler": "IK Pathan", "non_striker": "MJ Prior", "runs": { "batter": 1, "extras": 0, "total": 1 } }, { "batter": "MJ Prior", "bowler": "IK Pathan", "non_striker": "AJ Strauss", "runs": { "batter": 0, "extras": 0, "total": 0 } }, { "batter": "MJ Prior", "bowler": "IK Pathan", "non_striker": "AJ Strauss", "runs": { "batter": 0, "extras": 0, "total": 0 } }, { "batter": "MJ Prior", "bowler": "IK Pathan", "non_striker": "AJ Strauss", "runs": { "batter": 0, "extras": 0, "total": 0 } }, { "batter": "MJ Prior", "bowler": "IK Pathan", "non_striker": "AJ Strauss", "runs": { "batter": 1, "extras": 0, "total": 1 } } ] } ``` -------------------------------- ### Match Replacement Example (National Callup) Source: https://cricsheet.org/format/xml Shows a match replacement where a player is called up to the national team. ```xml G Clark BA Stokes national_callup Durham ``` -------------------------------- ### Extras: Penalty Runs Source: https://cricsheet.org/format/json Example of how penalty runs are recorded within the extras object. ```json "extras": { "penalty": 5 } ``` -------------------------------- ### Match Replacement Example (National Release) Source: https://cricsheet.org/format/xml Details a match replacement when a player is released from national commitments. ```xml TJ Murtagh ER Bamber national_release Middlesex ``` -------------------------------- ### Match Replacement Example (National Call-up) Source: https://cricsheet.org/format/yaml Record a player replacement due to a national team call-up. Use 'national_callup' for the reason. ```yaml replacements: match: - in: G Clark out: BA Stokes team: Durham reason: national_callup ``` -------------------------------- ### Match Replacement Example (Concussion Substitute) Source: https://cricsheet.org/format/xml Shows a match replacement where a player is permanently substituted due to concussion. ```xml CT Bancroft SM Whiteman concussion_substitute Perth Scorchers ``` -------------------------------- ### Match Replacement Example (National Release) Source: https://cricsheet.org/format/yaml Record a player replacement when a player is released from national commitments. The 'reason' should be 'national_release'. ```yaml replacements: match: - in: TJ Murtagh out: ER Bamber team: Middlesex reason: national_release ``` -------------------------------- ### Example Info Section Structure Source: https://cricsheet.org/format/yaml A representative YAML structure for the info section of a match data file. ```yaml info: balls_per_over: 6 city: Chennai competition: IPL dates: - 2008-04-26 gender: male match_type: T20 outcome: by: wickets: 9 winner: Chennai Super Kings overs: 20 player_of_match: - JDP Oram teams: - Chennai Super Kings - Kolkata Knight Riders toss: decision: bat winner: Kolkata Knight Riders umpires: - BF Bowden - AV Jayaprakash venue: 'MA Chidambaram Stadium, Chepauk' ``` -------------------------------- ### Example XML Info Section Source: https://cricsheet.org/format/xml A sample XML structure representing the metadata for an ODI match between New Zealand and Bangladesh. ```xml 6 Wellington 2021-03-26 male ODI 4282 164 New Zealand 50 DP Conway New Zealand Bangladesh bat New Zealand CB Gaffaney WR Knights Basin Reserve ``` -------------------------------- ### Role Replacement Example (Injury) Source: https://cricsheet.org/format/xml Illustrates a role replacement where a bowler is substituted due to injury. ```xml KJ Abbott injury bowler ``` -------------------------------- ### Target for 50-Over Innings Example Source: https://cricsheet.org/format/json Details the target for a 50-over innings, with 259 runs needed to win. ```json "target": { "overs": 50, "runs": 259 } ``` -------------------------------- ### Match Replacement Example (Concussion Substitute) Source: https://cricsheet.org/format/yaml Record a concussion substitute replacement in a match. The 'reason' field specifies the type of substitution. ```yaml replacements: match: - in: CP Tremain out: DR Sams team: Sydney Thunder reason: concussion_substitute ``` -------------------------------- ### Example Delivery: Wide Source: https://cricsheet.org/format/json Shows a delivery where the bowler conceded a wide, resulting in extra runs. ```json { "batter": "PD Collingwood", "bowler": "G Gambhir", "extras": { "wides": 1 }, "non_striker": "KP Pietersen", "runs": { "batter": 0, "extras": 1, "total": 1 } } ``` -------------------------------- ### Define Extra Runs Source: https://cricsheet.org/format/yaml Examples of different types of extra runs conceded on a delivery. ```yaml extras: byes: 1 ``` ```yaml extras: legbyes: 2 ``` ```yaml extras: noballs: 1 ``` ```yaml extras: penalty: 5 ``` ```yaml extras: wides: 1 ``` -------------------------------- ### GET /match/info Source: https://cricsheet.org/format/json Retrieves the metadata and contextual information for a specific cricket match. ```APIDOC ## GET /match/info ### Description Returns the match information object containing details such as venue, dates, teams, officials, and match type. ### Method GET ### Endpoint /match/info ### Response #### Success Response (200) - **balls_per_over** (integer) - The number of balls expected per over. - **venue** (string) - The location where the match was played. - **dates** (array) - List of dates the match took place. - **event** (object) - Information about the tournament or event. - **gender** (string) - Gender of the participants. - **match_type** (string) - The format of the match (e.g., T20, Test, ODI). - **officials** (object) - Details on match referees and umpires. - **players** (object) - Mapping of teams to their respective player lists. #### Response Example { "balls_per_over": 6, "venue": "Daren Sammy National Cricket Stadium, Gros Islet", "dates": ["2016-07-26"], "match_type": "T20", "gender": "male" } ``` -------------------------------- ### Target for 20-Over Innings Example Source: https://cricsheet.org/format/json Specifies the target for a 20-over innings, requiring 151 runs to win. ```json "target": { "overs": 20, "runs": 151 } ``` -------------------------------- ### Multiple Mandatory Powerplays Example Source: https://cricsheet.org/format/json Illustrates a scenario with multiple mandatory powerplays, covering a significant portion of the innings. ```json "powerplays": [ { "from": 0.1, "to": 9.6, "type": "mandatory" }, { "from": 10.1, "to": 39.6, "type": "mandatory" }, { "from": 40.1, "to": 45.4, "type": "mandatory" } ] ``` -------------------------------- ### YAML Meta Section Example Source: https://cricsheet.org/format/yaml The meta section contains details about the data file itself, including format version, creation date, and revision number. Ensure the 'data_version' matches the expected format. ```yaml meta: data_version: 0.92 created: 2009-08-15 revision: 1 ``` -------------------------------- ### Role Replacement Example (Bowler - Unknown Reason) Source: https://cricsheet.org/format/yaml Record a bowler replacement when the reason is unknown. Use 'unknown' for the 'reason' field. ```yaml replacements: role: - in: CW Perchard out: AW Hawkins-Kay reason: unknown role: bowler ``` -------------------------------- ### LBW Dismissal Example Source: https://cricsheet.org/format/json Represents a 'leg before wicket' (lbw) dismissal. No fielders are typically involved. ```json "wickets": [ { "kind": "lbw", "player_out": "ACL Richards" } ] ``` -------------------------------- ### Run Out Dismissal Example Source: https://cricsheet.org/format/json Represents a 'run out' dismissal, listing the player out and the fielders who effected the run out. ```json "wickets": [ { "kind": "run out", "player_out": "DR Smith", "fielders": [ { "name": "KP Pietersen" }, { "name": "MJ Prior" } ] } ] ``` -------------------------------- ### ODI Powerplays Example (Mandatory and Batting) Source: https://cricsheet.org/format/json Shows the two powerplays in ODIs: an initial mandatory one and a subsequent one at the batting team's discretion. ```json "powerplays": [ { "from": 0.1, "to": 9.6, "type": "mandatory" }, { "from": 35.1, "to": 39.6, "type": "batting" } ] ``` -------------------------------- ### Defining run scoring details Source: https://cricsheet.org/format/yaml Examples of the runs object structure, covering boundaries, extras, and non-boundary scenarios. ```yaml runs: batsman: 4 extras: 0 total: 4 ``` ```yaml runs: batsman: 0 extras: 1 total: 1 ``` ```yaml runs: batsman: 2 extras: 1 total: 3 ``` ```yaml runs: batsman: 4 extras: 0 non_boundary: 1 total: 4 ``` -------------------------------- ### Mandatory Powerplay Example Source: https://cricsheet.org/format/json Represents a single mandatory powerplay in a T20 match, spanning from the first to the sixth over. ```json "powerplays": [ { "from": 0.1, "to": 5.6, "type": "mandatory" } ] ``` -------------------------------- ### Match Replacement Example (COVID Replacement) Source: https://cricsheet.org/format/xml Illustrates a match replacement due to a COVID-19 related absence. ```xml JA Brooks L Gregory covid_replacement Somerset ``` -------------------------------- ### Match Replacement Example (COVID Replacement) Source: https://cricsheet.org/format/yaml Record a COVID-19 replacement in a match. Ensure the 'reason' field is set to 'covid_replacement'. ```yaml replacements: match: - in: JA Brooks out: L Gregory team: Somerset reason: covid_replacement ``` -------------------------------- ### Example Delivery with a Wide Source: https://cricsheet.org/format/xml Shows a delivery where the bowler bowls a wide. The batsman scores no runs, but the total runs include the wide. ```xml 2 1 TL Seifert RM ter Braak 1 KD Clarke 0 1 1 ``` -------------------------------- ### Example Innings Data Structure Source: https://cricsheet.org/format/json This JSON snippet illustrates the basic structure of the 'innings' section, showing two innings with overs and deliveries. ```json { "innings": [ { "team": "Ireland", "overs": [ { "over": 0, "deliveries": [ { "batter": "WTS Porterfield", "bowler": "IK Pathan", "extras": { "wides": 1 }, "non_striker": "JP Bray", "runs": { "batter": 0, "extras": 1, "total": 1 } }, { "batter": "WTS Porterfield", "bowler": "IK Pathan", "non_striker": "JP Bray", "runs": { "batter": 0, "extras": 0, "total": 0 } } ] } ] }, { "team": "India", "overs": [ { "over": 0, "deliveries": [ { "batter": "G Gambhir", "bowler": "WB Rankin", "non_striker": "RG Sharma", "runs": { "batter": 4, "extras": 0, "total": 4 } } ] } ] } ] } ``` -------------------------------- ### Multiple Miscounted Overs Example Source: https://cricsheet.org/format/json Shows two miscounted overs in the same innings by the same umpire, one with too few and one with too many deliveries. ```json "miscounted_overs": { "35": { "balls": 7, "umpire": "Asad Rauf" }, "39": { "balls": 5, "umpire": "Asad Rauf" } } ``` -------------------------------- ### Role Replacement Example (Excluded Bowler - Short Pitches) Source: https://cricsheet.org/format/yaml Record a bowler replacement due to excessive short-pitched deliveries. The 'reason' field specifies the exact exclusion reason. ```yaml replacements: role: - in: AT Thomson out: GLS Scrimshaw reason: excluded - excessive short-pitched deliveries role: bowler ``` -------------------------------- ### Role Replacement Example (Excluded Bowler - High Pitched Balls) Source: https://cricsheet.org/format/yaml Record a bowler replacement due to bowling high full-pitched balls. The 'reason' field must precisely match the exclusion criteria. ```yaml replacements: role: - in: RML Taylor out: NL Buck reason: excluded - high full pitched balls role: bowler ``` -------------------------------- ### Penalty Runs XML Example Source: https://cricsheet.org/format/xml Represents penalty runs added to an innings, either before the innings begins or after it concludes. ```xml 5 ``` ```xml 6 ``` -------------------------------- ### GET /meta Source: https://cricsheet.org/format/yaml Retrieves the meta information section of a Cricsheet YAML file, which provides metadata about the data file itself. ```APIDOC ## GET /meta ### Description The `meta` section contains details related to the data file itself, specifically the version of the data format, the date the file was created, and the revision of the file. ### Method GET ### Parameters #### Request Body - **data_version** (string) - Required - The version of the data format the file contains. - **created** (string) - Required - The date on which the data file was first created (YYYY-MM-DD). - **revision** (integer) - Required - The revision number for this data version of the file. ### Request Example ```yaml meta: data_version: 0.92 created: 2009-08-15 revision: 1 ``` ``` -------------------------------- ### Role Replacement Example (Excluded Bowler - Running on Pitch) Source: https://cricsheet.org/format/yaml Record a bowler replacement when the bowler is excluded for running on the pitch. The 'out' field may be omitted if the original player is un-named. ```yaml replacements: role: - in: ST Finn reason: 'excluded - running on the pitch' role: bowler ``` -------------------------------- ### Role Replacement Example (Bowler - Too Many Overs) Source: https://cricsheet.org/format/yaml Record a bowler replacement for exceeding the maximum number of overs. The 'out' field may be omitted if the original player is un-named. ```yaml replacements: role: - in: RA Jadeja reason: too many overs role: bowler ``` -------------------------------- ### Role Replacement Example (Injured Bowler) Source: https://cricsheet.org/format/yaml Record a bowler replacement due to injury. The 'out' field may be omitted if the original player is un-named. ```yaml replacements: role: - in: GH Dockrell out: DC Delany reason: injury role: bowler ``` -------------------------------- ### Stumped Dismissal Example Source: https://cricsheet.org/format/json Represents a 'stumped' dismissal, detailing the player out and the wicket-keeper involved. ```json "wickets": [ { "kind": "stumped", "player_out": "PD Collingwood", "fielders": [ { "name": "D Ramdin" } ] } ] ``` -------------------------------- ### Caught Dismissal Example Source: https://cricsheet.org/format/json Represents a 'caught' dismissal, including the player out and the fielder(s) involved. ```json "wickets": [ { "kind": "caught", "player_out": "MS Dhoni", "fielders": [ { "name": "Shoaib Malik" } ] } ] ``` -------------------------------- ### Bowled Dismissal Example Source: https://cricsheet.org/format/json Represents a 'bowled' dismissal. No fielders are involved in this type of wicket. ```json "wickets": [ { "kind": "bowled", "player_out": "SP Fleming" } ] ``` -------------------------------- ### Obstructing the Field Dismissal Example Source: https://cricsheet.org/format/json Represents a dismissal for 'obstructing the field'. This is a rare dismissal type. ```json "wickets": [ { "kind": "obstructing the field", "player_out": "DM Lord" } ] ``` -------------------------------- ### Miscounted Over with Umpire Example Source: https://cricsheet.org/format/json Details a miscounted over where only 5 balls were bowled, specifying the umpire involved. ```json "miscounted_overs": { "36": { "balls": 5, "umpire": "AV Jayaprakash" } } ``` -------------------------------- ### Caught and Bowled Dismissal Example Source: https://cricsheet.org/format/json Represents a 'caught and bowled' dismissal where the bowler also takes the catch. ```json "wickets": [ { "kind": "caught and bowled", "player_out": "KP Pietersen" } ] ``` -------------------------------- ### Miscounted Over with Unknown Umpire Example Source: https://cricsheet.org/format/json Represents a miscounted over with an unknown umpire, indicating only the number of balls bowled. ```json "miscounted_overs": { "10": { "balls": 7 } } ``` -------------------------------- ### Representing a cricket delivery Source: https://cricsheet.org/format/yaml Examples of individual delivery records showing batsman, bowler, and outcome details. ```yaml - 7.2: batsman: Nahida Khan bowler: N de Klerk non_striker: Umaima Sohail runs: batsman: 1 extras: 0 total: 1 wicket: player_out: Nahida Khan kind: run out ``` ```yaml - 2.1: batsman: TL Seifert bowler: RM ter Braak non_striker: KD Clarke extras: wides: 1 runs: batsman: 0 extras: 1 total: 1 ``` -------------------------------- ### Player Replacement: Match (Concussion Substitute) Source: https://cricsheet.org/format/json Illustrates a match replacement where a player is substituted due to concussion. ```json "replacements": { "match": [ { "in": "CT Bancroft", "out": "SM Whiteman", "reason": "concussion_substitute", "team": "Perth Scorchers" } ] } ``` -------------------------------- ### Penalty Runs Before Innings Source: https://cricsheet.org/format/json This JSON snippet shows how to represent penalty runs added before the start of an innings. ```json "penalty_runs": { "pre": 5 } ``` -------------------------------- ### Hit Wicket Dismissal Example Source: https://cricsheet.org/format/json Represents a 'hit wicket' dismissal, where the batsman dislodges the bails with their body or equipment. ```json "wickets": [ { "kind": "hit wicket", "player_out": "SS Tiwary" } ] ``` -------------------------------- ### Player Replacements Object Source: https://cricsheet.org/format/json Provides information on player substitutions that occurred before a delivery. ```APIDOC ### Player Replacements Object ### Description This object details any player replacements that happened before a delivery. It can include both 'match' replacements (where a player is permanently substituted) and 'role' replacements (where a player temporarily takes over a specific role, like bowling). ### Fields - **match** (array, optional) - An array of objects detailing match replacements. Each object may contain: - **in** (string) - The name of the player coming in. - **out** (string) - The name of the player being replaced. - **reason** (string) - The reason for the replacement (e.g., "concussion_substitute"). - **team** (string) - The team the replacement is for. - **role** (array, optional) - An array of objects detailing role replacements. Each object may contain: - **in** (string) - The name of the player taking over the role. - **reason** (string) - The reason for the role change (e.g., "injury"). - **role** (string) - The role being taken over (e.g., "bowler"). ### Example ```json { "replacements": { "role": [ { "in": "Yasir Shah", "reason": "injury", "role": "bowler" } ], "match": [ { "in": "CT Bancroft", "out": "SM Whiteman", "reason": "concussion_substitute", "team": "Perth Scorchers" } ] } } ``` ``` -------------------------------- ### Match Replacement: Concussion Substitute Source: https://cricsheet.org/format/json Log a 'concussion_substitute' for a player replaced due to concussion. ```json "replacements": { "match": [ { "in": "CP Tremain", "out": "DR Sams", "team": "Sydney Thunder", "reason": "concussion_substitute" } ] } ``` -------------------------------- ### Match Replacement: Supersub Source: https://cricsheet.org/format/json Record a 'supersub' replacement where one player takes the place of another for the entire match. ```json "replacements": { "match": [ { "in": "JAH Marshall", "out": "JS Patel", "reason": "supersub", "team": "New Zealand" } ] } ``` -------------------------------- ### Team Lineups Source: https://cricsheet.org/format/xml Lists the players involved in a match for each team. Includes the team name and an array of player names. ```xml Australia M Klinger AJ Finch BR Dunk MC Henriques TM Head AJ Turner JP Faulkner TD Paine PJ Cummins AJ Tye JA Richardson Sri Lanka N Dickwella WU Tharanga EMDY Munaweera BKG Mendis DAS Gunaratne TAM Siriwardana CK Kapugedera S Prasanna KMDN Kulasekara SL Malinga JRMVB Sanjaya ``` -------------------------------- ### Define Supersubs in Match Data Source: https://cricsheet.org/format/yaml Use this structure to map teams to their respective supersub players. The keys represent the team name, and the values represent the player name. ```yaml supersubs: Australia: JR Hopes ``` ```yaml supersubs: Adelaide Strikers: MW Short Hobart Hurricanes: M Wright ``` -------------------------------- ### Retired Hurt Dismissal Example Source: https://cricsheet.org/format/json Represents a 'retired hurt' dismissal. This indicates a player was unable to continue batting due to injury. ```json "wickets": [ { "kind": "retired hurt", "player_out": "SR Tendulkar" } ] ``` -------------------------------- ### Over Data Structure Source: https://cricsheet.org/format/json Contains detailed information about individual overs and their constituent deliveries. ```APIDOC ## Over Data ### Description Represents an over in an innings, containing a list of delivery objects. ### Parameters #### Request Body - **over** (number) - Required - The number of the over in the innings. - **deliveries** (array) - Required - An array of delivery objects. ### Request Example { "over": 0, "deliveries": [ { "batter": "AJ Strauss", "bowler": "IK Pathan", "non_striker": "MJ Prior", "runs": { "batter": 0, "extras": 0, "total": 0 } } ] } ```