nexus icon indicating copy to clipboard operation
nexus copied to clipboard

Expand the payload sent for studio table resources to make adding to DataPanel easier

Open Dinika opened this issue 2 years ago • 1 comments

Problem: Right now we receive only the following information in the payload per row of the table:

{
    "s": {
        "type": "uri",
        "value": "https://dev.nise.bbp.epfl.ch/nexus/v1/projects/bbp-users/dinika"
    },
    "self": {
        "type": "uri",
        "value": "https://dev.nise.bbp.epfl.ch/nexus/v1/projects/bbp-users/dinika"
    }
}

This information is not enough to add a row to data-panel, so we do another (upto 2 requests) per row selected

  1. Get information such as, @id ,distribution, createdAt, name etc. A sample of what we receive is as follows
  2. If the @id returned by the response to the request above is of "curie" format, we make another request to get expanded id. (To be seen, if we can only do this request instead of the first one).

Proposal Get the following extra information in the original request that returns all rows for studio table row:

  • @id (expanded one, not just a curie)
  • name
  • project
  • self
  • description
  • createdAt
  • updatedAt
  • @type
  • distribution

Dinika avatar May 24 '23 08:05 Dinika

Please note that if the above proposal is not do-able, we can use the multi fetch feature, to fetch all the selected rows at once, instead of requesting them one by one. We are doing something similar in DataExplorer (see function fetchMultipleResources in src/subapps/dataExplorer/DataExplorerUtils.tsx).

Dinika avatar Nov 14 '23 12:11 Dinika