Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c26ed5f
feat: First draft of Ingest API
sbaudlr Aug 23, 2023
73ef2e5
chore: Remove resyncURL
sbaudlr Aug 31, 2023
d279c78
chore: Remove internal Ids
sbaudlr Sep 7, 2023
92156b8
fix: Cleanup some errors
sbaudlr Sep 7, 2023
800d9fc
feat: If-Match headers
sbaudlr Sep 7, 2023
f97491b
chore: Remove studio Ids from ingest API
sbaudlr Oct 31, 2023
51dbf86
chore: Remove references to studio
sbaudlr Nov 2, 2023
defe14c
fix: missing property prevents build
jesperstarkar Nov 15, 2023
794d6ec
feat: changes ingest/playlists response
jesperstarkar Nov 15, 2023
5ced41b
feat: ingest/playlists updated example
jesperstarkar Nov 15, 2023
7398096
test: create tests for ingest api
Sep 2, 2024
181a9ed
test: add missing delete for ingest api
Sep 4, 2024
c1eea17
test: fix array header in api definition
Sep 4, 2024
d271cca
test: add comments in api definition
Sep 4, 2024
7545052
test: fix devices tests
Sep 4, 2024
0bd5b31
feat: basic Ingest API CRUD operations
Sep 4, 2024
421f8db
wip: Ingest API cleanup + post methods
Sep 23, 2024
019ac27
wip: ingest api resync url
Sep 25, 2024
2a0408e
feat: ingest api reload rundown action
Sep 25, 2024
a08c570
wip: ingest api cleanup
Sep 25, 2024
d64b59e
wip: ingest api details
Sep 26, 2024
92a9fdb
chore: fixing failing tests by doing a mock-mock (mock^2)
jesperstarkar Sep 27, 2024
02cc75e
fix: ingest api tests and promises
Sep 30, 2024
04900d7
wip: ingest api descriptions
Oct 2, 2024
0ce0f24
fix: add studio ID to ingest api definition
Oct 3, 2024
4480f08
wip: make playlist have own ID, add rundown timing to response
Oct 3, 2024
5b585d4
feat: add playlistExternalId to IngestRundown
Oct 7, 2024
532c5bd
fix: ingest api tests
Oct 7, 2024
703a458
wip: make user actions api work with external ids
Oct 7, 2024
4a872ee
feat: add timing to IngestRundown interface
Oct 8, 2024
0d05fbe
feat: segment timing
Oct 10, 2024
fc88a6f
wip: refine ingest api payload
Oct 23, 2024
568dc0e
feat: refine Ingest API and Ingest interfaces
Nov 13, 2024
4beb8de
fix: change part title to part name
Jan 31, 2025
095e39c
fix: extend duration and remove externalId from ingest api piece
Jan 31, 2025
ffa0604
fix: ingest api tests
Feb 3, 2025
4b2ae3d
fix: standardize ingest api
May 9, 2025
476b77c
feat: implement ingest api validation
May 15, 2025
fb7a560
fix: update ingest api for r53
Jun 11, 2025
1acaecb
fix: change part payload type to unknown
Jun 12, 2025
828d64b
feat: make user actions work with external ids
Jun 12, 2025
2b43bb3
fix: revert peripheral devices tests changes
Jun 12, 2025
5bc5b92
fix: update r53 imports in ingest api tests
Jun 12, 2025
209035f
Fix ingest tests
May 30, 2025
1d89ac3
fix: rename rundown source httpIngest to restApi
Jun 16, 2025
65dcb24
fix: remove fetch from meteor packages
Jun 16, 2025
35aef70
fix: handle ENOTFOUND rest api reload error
Jun 16, 2025
fc87125
feat: enable rundown and segment payload validation
Jun 17, 2025
5611679
fix: convert user actions external to internal ids on api layer
Jun 17, 2025
4e48f4a
fix: replace meteor fetch function with global fetch
Jun 18, 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'

function restAPIUserEvent(
Expand Down Expand Up @@ -201,3 +202,4 @@ registerStudiosRoutes(sofieAPIRequest)
registerSystemRoutes(sofieAPIRequest)
registerBucketsRoutes(sofieAPIRequest)
registerSnapshotRoutes(sofieAPIRequest)
registerIngestRoutes(sofieAPIRequest)
Loading
Loading