Skip to content

Project Dataset Details API #1820

@jachro

Description

@jachro

As a renku-graph API user, I'd like to be able to fetch details of a Dataset with the given identifier that belongs to a project with the given slug.

Acceptance criteria:

  • KG service to expose a new GET /knowledge-graph/projects/:namespace/:name/datasets/:id
  • the API to respond 404 NOT_FOUND when
    • no project with the given slug is found
    • no dataset with the given identifier if found
    • user has no access to the project
  • for successfully found dataset, an 200 OK response is returned with the following JSON payload:
    {
      "_links": [
        {
          "rel":  "self",
          "href": "https://zemdgsw:9540/datasets/22222222222222222222222222222222"
        },
        {
          "rel":  "initial-version",
          "href": "https://zemdgsw:9540/datasets/11111111111111111111111111111111"
        },
        {
          "rel":  "tags",
          "href": "https://zemdgsw:9540/knowledge-graph/projects/namespace1/project1-name/datasets/dataset-name/tags"
        }
      ],
      "identifier": "22222222222222222222222222222222",
      "versions": {
        "initial": "11111111111111111111111111111111"
      },
      "name":        "dataset-name",
      "slug":        "dataset-name",
      "url":         "http://host/url1",             // optional property
      "sameAs":      "http://host/url2",             // optional property when no "derivedFrom" exists
      "derivedFrom": "http://host/url1",             // optional property when no "sameAs" exists
      "description": "vbnqyyjmbiBQpubavGpxlconuqj",  // optional property
      "published": {
        "datePublished": "2012-10-14",               // optional property
        "creator": [
          {
            "name":        "e wmtnxmcguz",
            "affiliation": "SDSC"                    // optional property
          },
          {
            "name":  "iilmadw vcxabmh",
            "email": "ticUnrW@cBmrdomoa"             // optional property
          }
        ]
      },
      "created":      "2012-10-15T03:02:25.639Z",    // optional property
      "dateModified": "2012-11-15T03:02:25.639Z",    // optional property,
      "hasPart": [
        {
          "atLocation": "data/dataset-name/file1"
        },
        {
          "atLocation": "data/dataset-name/file2"
        }
      ],
      "project":  {
        "_links": [
          {
            "rel":  "project-details",
            "href": "https://zemdgsw:9540/projects/namespace1/project1-name"
          }
        ],
        "dataset": {
          "identifier": "22222222-2222-2222-2222-222222222222"
        },
        "path":       "namespace1/project1-name",
        "slug":       "namespace1/project1-name",
        "name":       "project1 name",
        "visibility": "public"
      },
      "keywords": [ "rldzpwo", "gfioui" ],
      "images": [
        {
          "location": "image.png",
          "_links":[
            {
              "rel":  "view",
              "href": "https://renkulab.io/gitlab/project_path/raw/master/data/mniouUnmal/image.png"
            }
          ]
        },
        {
          "location": "http://host/external-image.png",
          "_links":[
            {
              "rel":  "view",
              "href": "http://host/external-image.png"
            }
          ]
        }
      ]
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions