cyREST icon indicating copy to clipboard operation
cyREST copied to clipboard

How to set collection names

Open AlexanderPico opened this issue 4 years ago • 2 comments

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

AlexanderPico avatar Jan 19 '21 20:01 AlexanderPico

Any updates on this issue?

AlexanderPico avatar Apr 13 '21 01:04 AlexanderPico

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.

dotasek avatar Apr 13 '21 16:04 dotasek