Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
43b3f62
feat: First draft of Ingest API
sbaudlr Aug 23, 2023
2fee4de
chore: Remove resyncURL
sbaudlr Aug 31, 2023
bd112e9
chore: Remove internal Ids
sbaudlr Sep 7, 2023
e5706be
fix: Cleanup some errors
sbaudlr Sep 7, 2023
a1be428
feat: If-Match headers
sbaudlr Sep 7, 2023
e274374
chore: Remove studio Ids from ingest API
sbaudlr Oct 31, 2023
d7de386
chore: Remove references to studio
sbaudlr Nov 2, 2023
afe4933
fix: missing property prevents build
jesperstarkar Nov 15, 2023
a9a052e
feat: changes ingest/playlists response
jesperstarkar Nov 15, 2023
8b888c9
feat: ingest/playlists updated example
jesperstarkar Nov 15, 2023
0273b09
test: create tests for ingest api
Sep 2, 2024
98fe5c8
test: add missing delete for ingest api
Sep 4, 2024
a7c1ecb
test: fix array header in api definition
Sep 4, 2024
3ee2183
test: add comments in api definition
Sep 4, 2024
04139bc
test: fix devices tests
Sep 4, 2024
410927b
feat: implement ingest API
Sep 4, 2024
33c6160
fix: rename rundown source httpIngest to restApi
Jun 16, 2025
9a09353
fix: remove fetch from meteor packages
Jun 16, 2025
a8ba3be
fix: handle ENOTFOUND rest api reload error
Jun 16, 2025
5473c66
feat: enable rundown and segment payload validation
Jun 17, 2025
22ceb58
fix: convert user actions external to internal ids on api layer
Jun 17, 2025
08890d2
fix: replace meteor fetch function with global fetch
Jun 18, 2025
54daf41
fix: ingest api cleanup
Oct 7, 2025
9c7844e
fix: add playlistExternalId to runOperation
Oct 8, 2025
205e1c9
fix: add payload to rundown and segment
Oct 16, 2025
dd9eb5b
fix: add playlistExternalId to ingestRundown
Oct 16, 2025
fd9663c
fix: ingest api tests
Oct 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions meteor/server/api/ingest/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PeripheralDeviceType } from '@sofie-automation/corelib/dist/dataModel/P
import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest'
import { assertNever } from '@sofie-automation/corelib/dist/lib'
import { VerifiedRundownForUserAction } from '../../security/check'
import { logger } from '../../logging'

/*
This file contains actions that can be performed on an ingest-device
Expand All @@ -27,6 +28,26 @@ export namespace IngestActions {

return TriggerReloadDataResponse.COMPLETED
}
case 'restApi': {
const resyncUrl = rundown.source.resyncUrl
fetch(resyncUrl, { method: 'POST' })
.then(() => {
logger.info(`Reload rundown: resync request sent to "${resyncUrl}"`)
})
.catch((error) => {
if (error.cause.code === 'ECONNREFUSED' || error.cause.code === 'ENOTFOUND') {
logger.error(
`Reload rundown: could not establish connection with "${resyncUrl}" (${error.cause.code})`
)
return
}
logger.error(
`Reload rundown: error occured while sending resync request to "${resyncUrl}", message: ${error.message}, cause: ${JSON.stringify(error.cause)}`
)
})

return TriggerReloadDataResponse.WORKING
}
case 'testing': {
await runIngestOperation(rundown.studioId, IngestJobs.CreateAdlibTestingRundownForShowStyleVariant, {
showStyleVariantId: rundown.showStyleVariantId,
Expand Down
2 changes: 2 additions & 0 deletions meteor/server/api/rest/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { registerRoutes as registerStudiosRoutes } from './studios'
import { registerRoutes as registerSystemRoutes } from './system'
import { registerRoutes as registerBucketsRoutes } from './buckets'
import { registerRoutes as registerSnapshotRoutes } from './snapshots'
import { registerRoutes as registerIngestRoutes } from './ingest'
import { APIFactory, ServerAPIContext } from './types'
import { getSystemStatus } from '../../../systemStatus/systemStatus'
import { Component, ExternalStatus } from '@sofie-automation/meteor-lib/dist/api/systemStatus'
Expand Down Expand Up @@ -296,3 +297,4 @@ registerStudiosRoutes(sofieAPIRequest)
registerSystemRoutes(sofieAPIRequest)
registerBucketsRoutes(sofieAPIRequest)
registerSnapshotRoutes(sofieAPIRequest)
registerIngestRoutes(sofieAPIRequest)
Loading
Loading