Skip to content

Source collected by query parameter - #183

Merged
samdbmg merged 14 commits into
bbc:mainfrom
johnbilt:source-collected_by-query-parameter
Aug 10, 2026
Merged

Source collected by query parameter#183
samdbmg merged 14 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

@samdbmg samdbmg left a comment

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.

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

samdbmg commented May 1, 2026

Copy link
Copy Markdown
Member

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.

@samdbmg

samdbmg commented May 29, 2026

Copy link
Copy Markdown
Member

TSC 2026-05-29
Current state is this has the ADR but no spec change yet - next step is to write up the spec change

@samdbmg samdbmg linked an issue Jun 12, 2026 that may be closed by this pull request

@j616 j616 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work. One question and a couple of minor suggestions.

Comment thread docs/adr/0049-source-collected_by-query-parameter.md Outdated
Comment thread docs/README.md Outdated
Comment thread api/TimeAddressableMediaStore.yaml
@johnbilt
johnbilt force-pushed the source-collected_by-query-parameter branch from f2cf548 to 9d9e58c Compare August 10, 2026 14:31

@samdbmg samdbmg left a comment

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.

LGTM, as discussed (I've taken the liberty of slipping in a minor fix to a typo I introduced in #225 )

@github-project-automation github-project-automation Bot moved this from In Progress to Ready to merge in TAMS Community Planning Aug 10, 2026
@samdbmg

samdbmg commented Aug 10, 2026

Copy link
Copy Markdown
Member

We discussed this on in #214 (comment) and the changes are non-functional history cleanup, so I'm going to go ahead and merge this

@samdbmg
samdbmg merged commit 87c7d58 into bbc:main Aug 10, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in TAMS Community Planning Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Provide a way to list Sources that are collected by a particular Source

3 participants