Create a moment
POST/v2/matches/{matchId}/moments
const url = 'https://api.ligr.live/rest/v2/matches/1/moments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"date":"example","teamId":1,"playerId":1,"title":"example","tags":["example"],"lead":1,"lag":1,"highlight":true,"recordingId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
The match identifier
Request Bodyrequired
Section titled “Request Bodyrequired”object
When the moment happened, as an ISO 8601 date-time. Default: now. Not more than 60 seconds ahead of now.
The title of the clip. Default: MOMENT.
Names of tags of your organization. An unknown tag answers 400.
Seconds of video, from 0 to 720. Fractions are allowed and rounded to hundredths.
Seconds of video, from 0 to 720. Fractions are allowed and rounded to hundredths.
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.
Entity identifier
Examplegenerated
{ "date": "example", "teamId": 1, "playerId": 1, "title": "example", "tags": [ "example" ], "lead": 1, "lag": 1, "highlight": true, "recordingId": 1}Responses
Section titled “Responses”Created
object
Entity identifier
The clip LIGR is cutting. Null when the request sent highlight: false.
Examplegenerated
{ "factId": 1, "highlightId": 1}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"}Match not found
object
Examplegenerated
{ "message": "example"}No recording of the match covers the moment
object
NO_RECORDING
Examplegenerated
{ "message": "example", "code": "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"}