- /orgs/{orgId}/collections - GET - return collections metadata - POST with slug - same as PUT on /orgs/{orgId}/collections/{collectionId} (slug is collectionId) - /orgs/{orgId}/collections/{collectionId} - GET - return collection metadata - PUT - check referenced graphs for existence (can be branch, lock, scratch), - check user permission to update collection - create new collection with the referenced graphs, or replace existing collection if already exist, ex. request body ``` <> dct:title "some_collection" . <> mms:collects <../repos/repo1/branches/b1>, <../repos/repo2/locks/lock1>, <../../org2/repos/repo3/scratches/s1> . ``` - /orgs/{orgId}/collections/{collectionId}/query - POST - sparql query - get the graphs for each collected branch/lock/scratch (error if doesn't exist) - add `FROM <graph>` and `FROM NAMED <graph>` into the query for each graph referenced - /orgs/{orgId}/collections/{collectionId}/graph - GET - same as query, construct the graph of the union - ``` CONSTRUCT { ?s ?p ?o . } FROM <graph1> FROM <graph2> ... WHERE { ?s ?p ?o . } ``` - permission checking options - option 1 - collection curator has responsibility - on collection put, check user has permission to update collection, also admin permission to collected graphs - on query, user just needs read permission to collection, permission to underlying graphs is redefined through the collection - option 2 - check underlying permission on each query - on collection put, user just needs permission to update collection, and read permission to collected graphs - on query, user must have read access to all graphs, otherwise error
/orgs/{orgId}/collections
/orgs/{orgId}/collections/{collectionId}
/orgs/{orgId}/collections/{collectionId}/query
FROM <graph>andFROM NAMED <graph>into the query for each graph referenced/orgs/{orgId}/collections/{collectionId}/graph
permission checking options