Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My suggestion for a Collection API. The documentation file describes how it works. It works similar to the policy API as in that a GET to the root returns information on all collections you can modify, POST to the root for new collections, etc. PATCH is not supported, only PUT to replace a collection.
You can only create an asset collection over resources you are the owner of.
You can only create a party collection if you put yourself as one of the owners (that can modify this collection).
Automatically generated collections, through relations, can be read but not modified.
Example JSON bodies for the POST request:
{ "description": "My assets", "type": "asset", "parts": [ "http://example.com/alice/", "http://example.com/alice/README" ], }{ "description": "My party", "type": "party", "owners": [ "http://example.com/alice/profile/card#me" ], "parts": [ "http://example.com/alice/profile/card#me", "http://example.com/bob/profile/card#me" ], }A corresponding response to the GET request would then be something like