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

Make dataset tags available in the KG API #994

Closed
12 tasks done
cmdoret opened this issue May 16, 2022 · 2 comments · Fixed by #1071
Closed
12 tasks done

Make dataset tags available in the KG API #994

cmdoret opened this issue May 16, 2022 · 2 comments · Fixed by #1071

Comments

@cmdoret
Copy link
Member

cmdoret commented May 16, 2022

Renku allows dataset versioning through a tags mechanism.
Users should be able to import, inspect and search for datasets at specific tags, both in the UI and the command line.

Dataset tags should be available from the KG API to make tags accessible in the UI.

Acceptance criteria:

  • expose a new GET /knowledge-graph/projects/:namespace/:name/datasets/:dsName/tags resource on the knowledge-graph service;
  • the :dsName has to be a valid Dataset name (renku:slug in the Renku ontology world);
  • the resource to find all schema:PublicationEvent linked to the dataset with the given name through the schema:about property;
  • the resource to find all schema:PublicationEvent on all versions of the dataset;
  • in the absence of an access token, only tags of public DS will be returned;
  • when an access token is given, all public, internal and private DS are considered;
  • either OAuth or Private Access Token can be given for authentication and authorization;
  • the results will be sorted by the schema:startDate DESC;
  • the response should be paged;
  • the response JSON will be of the following shape:
    [
      {
        "name":        "name",
        "date":        "2012-11-15T10:00:00.000Z",
        "description": "desc",
        "_links": [
          {
            "rel": "dataset-details",
            "href": "http://t:5511/knowledge-graph/datasets/1232444"
          }
        ]
      }
    ]
  • update README/API docs;
  • add acceptance tests.
@jachro
Copy link
Contributor

jachro commented Aug 19, 2022

I’m looking at the issue and trying to make it more concrete before I start working on it. The question I have is how are we going to use it? As far as I can see there are a few possibilities:

  1. GET /knowledge-graph/projects/:namespace/:name/datasets/:dsName/tags - then we’ve got tags of the DS with the given name on a specific project.

  2. GET /knowledge-graph/datasets/:dsName/tags - then we’ve got tags of all datasets with the given name (on all projects as DS name is only unique on a project level).

  3. GET /knowledge-graph/datasets/:id/tags - then we’ve got tags of a DS with the concrete identifier. It means that if a tag was created for any DS that was either a parent or a child of it, the tag won’t be returned (personally, I don’t think this is going to be very useful)

@jachro
Copy link
Contributor

jachro commented Aug 22, 2022

After discussing the above with Andrea we agreed that option 1. should meet the requirements the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants