-
Notifications
You must be signed in to change notification settings - Fork 1
Proposal for an objects endpoint #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1a619c3
to
e9b10cd
Compare
2659ce4
to
472bf4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions in line. I'm also wondering if it's worth considering allowing querying by a list of object IDs. Mainly because one of our key use cases is removing all instances of content. This will likely take the form of obtaining a list of object IDs from a flow, querying this endpoint for all those IDs, then calling DELETE against all of those flows with the object IDs. The requests will add up quickly. That said, I don't currently think we expect this feature to be needed often!
Maybe the endpoint should be renamed to |
I was thinking a list in the query string. But thinking about it now, I seem to remember that when we recently looked into that for other purposes, we found the options unsatisfactory. |
I didn't think adding potentially hundreds of object IDs into the query string was ideal and that's why a POST seemed better. A POST is also used to make queries to DynamoDB for example. |
Fair point. Let's leave it for now and see what use cases actually pop up in the real world. I think if we do anything in this space, we should explore how we can provide some level of consistency with the rest of the API. |
I've changed my mind following James' comments on the query parameter. The object ID is now a path component of the URL. This matches what the S3 API does for example and also makes it more consistent with the other endpoints. |
0c493bf
to
f56ff7f
Compare
f56ff7f
to
a998870
Compare
This PR proposes an objects endpoint that includes a list of Flows that references the target media object.
The proposal also adds a property that holds the ID of the Flow that first referenced (via a Flow Segment) the media object. The proposal contains some questions around making the property required rather than optional (as currently specified) and whether a user should be able to set it.
Jira Issue (if relevant)
Jira URL: https://jira.dev.bbc.co.uk/browse/CLOUDFIT-3550
Related PRs
Where appropriate. Indicate order to be merged.
Submitter PR Checks
(tick as appropriate)
Reviewer PR Checks
(tick as appropriate)
Info on PRs
The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.