nexus
nexus copied to clipboard
Expand the payload sent for studio table resources to make adding to DataPanel easier
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
- Get information such as,
@id,distribution,createdAt,nameetc. A sample of what we receive is as follows - If the
@idreturned 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
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).