cytoscape / cyREST

Core App: REST API module for Cytoscape
https://github.com/cytoscape/cyREST/wiki
MIT License
30 stars 13 forks source link

Add DELETE /v1/networks/{networkId}/views/{viewId}/{objectType}/{visualProperty}/bypass #93

Open AlexanderPico opened 5 years ago

AlexanderPico commented 5 years ago

Basically a generic version of the network delete method you have already:

DELETE /v1/networks/{networkId}/views/{viewId}/network/{visualProperty}/bypass 

Replacing network with {objectType}. I would like to use this to remove all bypasses for nodes and edges, for example. This is needed for basic operations like unhideAll(), which currently must DELETE for each node (very slow) or toggle the bypass value (which will continue to override any mappings).

AlexanderPico commented 5 years ago

@dotasek Do you prefer tracking CyREST issues here or at Jira?

AlexanderPico commented 5 years ago

Thanks! http://localhost:1234/v1/swaggerUI/swagger-ui/index.html?url=http://localhost:1234/v1/swagger.json#!/Network32Views/deleteSingleVisualPropertyValueBypass

AlexanderPico commented 5 years ago

Ah, I spoke too soon. Looks like this one is not the new one. Reopened.

dotasek commented 4 years ago

This is a difficult one, because of the data model. I think the correct way to handle this and other bulk updates is through the PATCH method.

If you follow the issue thread for #88, Google has a method for updating which could work:

PATCH /v1/networks/{networkId}/views/{viewId}/{objectType}?matches=ALL&bypass=true

with the content either being a value to create or update:

{
    "visualProperty": "COMPOUND_NODE_SHAPE",
    "value": "ROUND_RECTANGLE"
}

or a null value to delete

{
    "visualProperty": "COMPOUND_NODE_SHAPE",
    "value": null
}

I have to check if null is usable, because bypass might treat that as a valid value instead of a signal to delete.

AlexanderPico commented 3 years ago

Should we try to implement PATCH in RCy3 and py4cytoscape per your tip above? Or is there more checking needed first, i.e., regarding null?