List highlight rules
GET/v2/competitions/{competitionId}/highlight-rules
const url = 'https://api.ligr.live/rest/v2/competitions/1/highlight-rules';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
Responses
Section titled “Responses”Ok
object
Oldest first. The dashboard can save two rules for one event; this list then names the event twice.
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
The event, for example GOAL, or MOMENT for a manual moment.
Seconds before the fact. Null: 10.
Seconds after the fact. Null: 20.
object
MOMENT rules only. The name of a tag of your organization. The rule clips moments that carry it.
Clip only facts of this team.
Clip only facts of a team of this club.
POINT_SCORED rules only. Clip only points of the home team.
POINT_SCORED rules only. Clip only points of the away team.
Clip only facts whose data sets this key, for example a tennis ace on POINT_SCORED.
Examplegenerated
{ "rules": [ { "factName": "example", "lead": 1, "lag": 1, "conditions": { "tag": "example", "teamId": 1, "clubId": 1, "homeTeam": true, "awayTeam": true, "subEvent": "example" } } ]}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Competition or highlight rule not found
object
Examplegenerated
{ "message": "example"}Organization has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}