Skip to content
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

Support PATCH for /allImages #953

Open
donaldgray opened this issue Feb 6, 2025 · 0 comments
Open

Support PATCH for /allImages #953

donaldgray opened this issue Feb 6, 2025 · 0 comments
Labels
API https://dlcs-book.readthedocs.io/en/latest/ refined Identify refined tickets in the backlog

Comments

@donaldgray
Copy link
Member

donaldgray commented Feb 6, 2025

See RFC-019 for more info.

Add PATCH support for /customers/{c}/allImages, accepting payloads in format:

{
 "member": [ {"id": "1/2/a"},{"id": "1/2/b"} ],
 "field": "manifests",
 "operation": "add|remove|replace",
 "value": [ "m123" ]
}
  • "members" is the list of image ids to apply PATCH to
  • "field" specifies which field is being modified - manifests is the only valid value for now (400 if other field)
  • "operation" can be one of (400 if other value):
    • 'add' - add the specified value(s) to field
    • 'remove' - remove the specified value(s) from field
    • 'replace' - replace the field with specified value(s). null is rejected with 400 as need to be explicit, use [] to clear values.
  • "value" is the value(s) to add/remove/replace

Returning HydraCollection of images. If no images found return an empty HydraCollection.

Writes should be atomic - competing requests that come in at the same time should both be recorded in the database. See npgsql EF support for arrays and RFC-019#implementation-details

Optional:

  • If possible the implementation of this should be fairly dynamic to make it easier to extend operations and fields in the future
@donaldgray donaldgray added API https://dlcs-book.readthedocs.io/en/latest/ refined Identify refined tickets in the backlog labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API https://dlcs-book.readthedocs.io/en/latest/ refined Identify refined tickets in the backlog
Projects
None yet
Development

No branches or pull requests

1 participant