Skip to content

List highlight rules

GET/v2/competitions/{competitionId}/highlight-rules

GET
/v2/competitions/{competitionId}/highlight-rules
curl --request GET \
--url https://api.ligr.live/rest/v2/competitions/1/highlight-rules \
--header 'Authorization: Bearer <token>'

Beta. This operation can change between minor versions. See Beta status.

Returns the highlight rules of a competition of your organization. A rule makes LIGR cut a clip when a fact of its event lands in a match of the competition. A match makes clips only while its stream runs with generateHighlights on.

competitionId
required

Entity identifier

integer format: int32
>= 1

Ok

Media typeapplication/json
object
rules
required

Oldest first. The dashboard can save two rules for one event; this list then names the event twice.

Array<object>

One highlight rule. When a fact of event factName lands in a match of the competition, and the match has a stream with generateHighlights on, LIGR cuts a clip.

object
factName
required

The event, for example GOAL, or MOMENT for a manual moment.

string
lead
required

Seconds before the fact. Null: 10.

number format: double
nullable
lag
required

Seconds after the fact. Null: 20.

number format: double
nullable
conditions
required
object
tag

MOMENT rules only. The name of a tag of your organization. The rule clips moments that carry it.

string
teamId

Clip only facts of this team.

integer format: int32
clubId

Clip only facts of a team of this club.

integer format: int32
homeTeam

POINT_SCORED rules only. Clip only points of the home team.

boolean
awayTeam

POINT_SCORED rules only. Clip only points of the away team.

boolean
subEvent

Clip only facts whose data sets this key, for example a tennis ace on POINT_SCORED.

string
Examplegenerated
{
"rules": [
{
"factName": "example",
"lead": 1,
"lag": 1,
"conditions": {
"tag": "example",
"teamId": 1,
"clubId": 1,
"homeTeam": true,
"awayTeam": true,
"subEvent": "example"
}
}
]
}

Request is invalid

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Competition or highlight rule not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Organization has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}