incidents.index [draft]

Resource information

URLhttps://api.statscore.com/v2/incidents
MethodGET

Description

Returns incidents, which may occur during the event

Cache60 seconds
Authorization requiredYes

Method parameters

NameTypeDescription
There are no method parameters in this resource 

Query parameters

Name
Type
Description
tokenxsd:string

REQUIRED. More information concerning authorization in API introduction section

langxsd:stringDetermines language for the output data
pagexsd:intDetermines offset of paginated data. Default value is 1 which means first page.
limitxsd:int

Determines maximum number of returned records on page. Used in paginated data. Default value is 500. 

Possible values: 5, 10, 25, 50, 100, 250, 500

sport_idxsd:intIdentifier for the sport.
multi_idsxsd:stringIdentifiers for the incident.
importantxsd:string

Determines if incidents are important e.g. goals, cards, substitutions. By default all types are included.

Allowed values:

  • yes - returns only important incidents
  • no - returns only unimportant incidents
important_for_traderxsd:string

Determines type of incidents (if it is important for trader). By default all types are included.
Allowed values:

  • yes - returns only incidents important for trader
  • no - returns only incidents not important for trader
timestampxsd:unix_timestampSelection date, format UNIX_TIMESTAMP. Only changes that occurred or were updated after this timestamp will be returned

Method calling examples

Link
Description
https://api.statscore.com/v2/incidents.xml?token={{YOUR_TOKEN}}Returns a list of all incidents in XML format
https://api.statscore.com/v2/incidents?token={{YOUR_TOKEN}}Returns a list of all incidents in JSON format

https://api.statscore.com/v2/incidents.xml?token={{YOUR_TOKEN}}&sport_id=1

Returns a list of incidents which are used in basketball

Output elements

incidents
incidents > incident

idxsd:arrayIncident identifier. Unique for sport.
action

xsd:string

Describes type of operation. Possible values:

  • insert
  • update
  • delete
old_idxsd:intDEPRECATED. Old Id
event_idxsd:intREQUIRED. The event identifier
incident_idxsd:intIncident id in data.sports.incidents node for event. The complete list of possible incidents can be retrieved using the API resource: sports.show
participant_idxsd:intParticipant id
participant_team_idxsd:intParticipant team id
participant_namexsd:stringParticipant name.
status_idxsd:intStatus id in data.sports.statuses node for event. The complete list of possible statuses can be retrieved using the API resource: statuses.index
minutexsd:intIncident time: minute
secondxsd:intIncident time: second
home_scorexsd:intHome Score
away_scorexsd:intAway Score
home_score1xsd:intHome Score 1
away_score1xsd:intAway Score 1
home_score2xsd:intHome Score 2
away_score2xsd:intAway Score 2
x_posxsd:intBall position on X axis (percentage)
y_posxsd:intBall position on Y axis (percentage)
add_dataxsd:stringCustom information
display_infoxsd:stringLabel for incidents
counterxsd:intSubsequent number of the incydent type in the event. Example: 5th goal in the match.
ctxsd:intCreated date
utxsd:intLast update date
dtxsd:intDeleted date
old_added_idxsd:intDEPRECATED. Old Id
sort_typexsd:string

Determines sort order of data. Possible values:

  • id - Incidents are sorted by the id of the Incident
forxsd:stringDetermine what the participant includes incident
  • all
  • own
  • rival
  • none
category


xsd:int

Incident category. Possible values:

  • standard
  • emergency
groupxsd:int

Group of emergency incident. Possible values:

  • prematch
  • live
  • postmatch