cyREST
cyREST copied to clipboard
How to set collection names
I attempted to useput /v1/collections/{networkId}/tables/{tableType}
, but it did not work. Taking a look at the default table of the root for the Yeast Perturbation sample network, I see that "name" is immutable (screenshot).
Should "name" be immutable? You can rename collections in the GUI.
Should we add rename functions to CyREST for collections?
Related RCy3 request: https://github.com/cytoscape/RCy3/issues/107
Any updates on this issue?
How did you perform the PUT?
I got mine to rename the collection (the SUID of the root network was 83 in this case):
PUT 'http://localhost:1234/v1/collections/83/tables/default'
body:
{ "key": "SUID", "data": [{ "SUID":83, "name": "newname"}] }
Would this satisfy the need for renaming functionality?
The immutable property is of the column, not of row data. You can't delete 'name' columns.
I did find the example JSON and other Swagger documentation on the PUT endpoint confusing, and I wrote it in the first place. It very much needs improvement.