Skip to content

Endpoints and plan for collections #235

Description

@dlamoris
  • /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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions