Skip to content

Source collected by query parameter#183

Open
johnbilt wants to merge 12 commits into
bbc:mainfrom
johnbilt:source-collected_by-query-parameter
Open

Source collected by query parameter#183
johnbilt wants to merge 12 commits into
bbc:mainfrom
johnbilt:source-collected_by-query-parameter

Conversation

@johnbilt
Copy link
Copy Markdown
Collaborator

Details

Currently at the Source level there is no filtering on the collected_by field.
When vendors are building systems which list content stored in TAMS then they are only looking for the Sources at the top of the content tree.
This PR is to add the ability to filter Sources (and Flows) to find the content which is not collected by another Source and therefore is the top level.

Jira Issue (if relevant)

Jira URL:

Related PRs

Where appropriate. Indicate order to be merged.

Submitter PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • API version has been incremented if necessary
  • ADR status has been updated, and ADR implementation has been recorded
  • Documentation updated (README, etc.)
  • PR added to Jira Issue (if relevant)
  • Follow-up stories added to Jira

Reviewer PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • Design makes sense, and fits with our current code base
  • Code is easy to follow
  • PR size is sensible
  • Commit history is sensible and tidy

Info on PRs

The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.

@johnbilt johnbilt requested a review from a team as a code owner April 15, 2026 20:01
Copy link
Copy Markdown
Member

@samdbmg samdbmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good so far, and I think it makes sense to match across to Flows too. It's also useful for #173 because it gives you a way to find the collected Flows/Sources while querying by other things at the same time

This behaviour focuses on starting from a known Flow to which the collection is applied.
There is no equivalent endpoints at the Source level.

If chosen to also apply at the Flow level then need to consider is `flows_collected_by_id=a46c49f1-4764-42b9-9f91-f267a58903c4` too similar to `/flows/a46c49f1-4764-42b9-9f91-f267a58903c4/flow_collection`?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distinction kinda comes up for the role discussion in #173 - the query string parameter lets you search for more things, for example /flows?flows_collected_by_id=<uuid>&format=urn:x-nmos:format:video&codec=video/h264 which feels useful, while the flows/<uuid>/flow_collection is the canonical resource itself - you can edit it there

@samdbmg
Copy link
Copy Markdown
Member

samdbmg commented May 1, 2026

TSC 2026-05-01
Option 3 seems to be the preferred option here - @johnbilt will continue to write the associated spec change. Will tidy up the empty string behaviour in webhooks to match what is proposed here as well. Will also make it consistent across Sources and Flows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants