Skip to content

Create a moment

POST/v2/matches/{matchId}/moments

POST
/v2/matches/{matchId}/moments
curl --request POST \
--url https://api.ligr.live/rest/v2/matches/1/moments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "date": "example", "teamId": 1, "playerId": 1, "title": "example", "tags": [ "example" ], "lead": 1, "lag": 1, "highlight": true, "recordingId": 1 }'

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

Saves a manual moment in a match as a MOMENT fact, and cuts a clip of it. The clip runs from lead seconds before date to lag seconds after it, from a recording of the match that covers date.

A recording is a stream of the match with archiveFullFeed on that ran at date, or an uploaded video of the match, synced in the dashboard, that shows date. When a stream and an upload both cover date, the clip comes from the stream. When the stream’s video has a gap at date, the upload gives the clip. When two uploads cover it, the newest upload gives the clip. recordingId names a stream or an upload.

With no such recording the request answers 409 NO_RECORDING and creates nothing. Send highlight: false to save the moment without a clip.

matchId
required

Entity identifier

integer format: int32
>= 1

The match identifier

Media typeapplication/json
object
date

When the moment happened, as an ISO 8601 date-time. Default: now. Not more than 60 seconds ahead of now.

string
teamId
integer format: int32
playerId
integer format: int32
title

The title of the clip. Default: MOMENT.

string
tags

Names of tags of your organization. An unknown tag answers 400.

Array<string>
lead

Seconds of video, from 0 to 720. Fractions are allowed and rounded to hundredths.

number format: double
<= 720
lag

Seconds of video, from 0 to 720. Fractions are allowed and rounded to hundredths.

number format: double
<= 720
highlight

Cut a clip of the moment now. Default: true. The clip needs a recording of the match that covers date; without one the request answers 409 NO_RECORDING and creates nothing. Send false to save the moment only. A MOMENT highlight rule of the competition can still clip it while the stream runs with generateHighlights on.

boolean
recordingId

Entity identifier

integer format: int32
>= 1
Examplegenerated
{
"date": "example",
"teamId": 1,
"playerId": 1,
"title": "example",
"tags": [
"example"
],
"lead": 1,
"lag": 1,
"highlight": true,
"recordingId": 1
}

Created

Media typeapplication/json
object
factId
required

Entity identifier

integer format: int32
>= 1
highlightId
required

The clip LIGR is cutting. Null when the request sent highlight: false.

integer format: int32
>= 1
Examplegenerated
{
"factId": 1,
"highlightId": 1
}

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"
}

Match not found

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

No recording of the match covers the moment

Media typeapplication/json
object
message
required
string
code
required

NO_RECORDING

string
Examplegenerated
{
"message": "example",
"code": "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"
}