Git Product home page Git Product logo

cy-rest's People

Contributors

keiono avatar mckgamer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

changeyourname

cy-rest's Issues

NetworkClient.get()

line 148: return requests.get(self.__url + '/' + str(id) + '.json').json()
Does not seem to work. networks/52.json does not seem to be supported by CyREST API.
Maybe change it into:
return requests.get(self.__url + '/' + str(id)).json()

Design View object file format

Cytoscape.js JSON does not have specific format for the view. We need to design how CyNetworkViews are serialized into JSON file.

Add Edge Bundling API

Add support for Edge Bundling.

Open questions:

  • How can we set parameters set via Tunables?

Make starting the cy-rest server more interactive

If you want to run cy-rest on a different port, the current workflow of

set a global Cytoscape property from Edit-->Preserences-->Properties... and add a new property port.number"

is rather obscure.

I suggest the following:

  • Do not start the server automatically. I don't need it all the time and sometimes I have two instances of Cytoscape open and then I get the error message
    javax.ws.rs.ProcessingException: Failed to start Grizzly HTTP server: Address already in use
  • Don't put the global properties in the "cytoscape 3" namespace. Define a seperate "cy-rest" namespace for Edit-->Preserences-->Properties.
  • Also make it possible to define the address to bind to. It would be cool if you could control cy-rest from a different computer. The address "localhost" makes this impossible (unless you SSH into the machine first).
  • Define a management interface in the OSGi console:
    cy-rest start localhost 1234
    cy-rest start 192.168.1.1 1234
    cy-rest stop
    cy-rest query http://192.168.1.1/v1/networks

Where the last command only supports HTTP GET queries. This should be regarded mostly as a diagnostic tool and not as something to actually work with.

  • Define a dialog in the Menu: Apps -> cyREST. Then a window should pop up where you can start and stop the server with parameters described in the previous bullet point. This is for the people who start Cytoscape without a visible OSGi console. The hostname and port fields can be prefilled from the global Cytoscape properties if they are set. If the user uses this method, you can save his choice of host and port as global Cytoscape properties.

Add API for View objects

Need to support RESTful operations for View objects. This is for setting/getting Visual Property values for the given view object.

Wrong URL in docs for getting the groups of a node

Docs URL: http://keiono.github.io/cy-rest/#-875567376
REST URL: v1/networks/networkId/groups/nodeSUID

This always seem to produce a HTTP 404 response.

My curl request:

curl -X GET -v http://localhost:1234/v1/networks/80/groups/90                                                       22:36:25
* Hostname was NOT found in DNS cache
*   Trying ::1...
* connect to ::1 port 1234 failed: Verbindungsaufbau abgelehnt
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 1234 (#0)
> GET /v1/networks/80/groups/90 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:1234
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Date: Sun, 19 Oct 2014 20:45:58 GMT
< Content-Length: 0
< 
* Connection #0 to host localhost left intact

And I double-checked that network 80 and node 90 (within network 80) do exist.

Make Table PUT API more intuitive

In current version, updating Table data requires the following steps:

  1. Create new columns one-by-one
  2. Prepare data to be PUT:
    • mapping key name in target table
    • mapping key in the data to be posted
    • Actual key-value pairs
  3. Call PUT method

This is not intuitive. We need a simplified method to batch-update table.

Deploy Complete REST API Documentation

Hey,
Can I find API docs anywhere? Or even just a list of possible endpoints?
Am happy to help generate one, if it doesn't exist, if you point me in the right direction, as well :)
thanks!
Rishi

Get SUID list of networks; with GET parameters: Gives up too early

Used URL:
http://example.com/v1/networks/ (docs: http://keiono.github.io/cy-rest/#-1099067042)
with GET parameters "column" and "query".

This request will fail (HTTP 500) if at least one of the network collections doesn't have a network table with the specified column, even though other network collections do have that column in their network tables.

I therefore suggest that network collections which don't have the specified column are ignored for the search.

For POST Column API, add option to create List data type

Currently, there is no way to create new List column. We need to support it by adding new option in POST Column API. The new POST format will be:

{
    "name": COL_NAME,
    "type": COL_TYPE,
    "immutable": (optional),
    "isList": (optional.  If true, create as List)
{

Save and load sessions

It should be possible to save and load sessions via cy-rest.
This could be especially handy when several sessions have to be created automatically.

Add "Fit to Window" API

"Fit network view to current window" is a useful feature for everyone. This should be included in the first release.

Deleting a group doesn't seem to work

Docs: http://keiono.github.io/cy-rest/#1469098445
The curl command I have tried: curl -X DELETE -v http://localhost:1234/v1/networks/80/groups/115/
and I am very certain that network 80 and group 115 exist.

I get a HTTP 500 error for this. Complete HTTP conversation:

> DELETE /v1/networks/80/groups/115/ HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:1234
> Accept: */*
> 
< HTTP/1.1 500 Request failed.
< Content-Type: text/html;charset=ISO-8859-1
< Date: Sun, 19 Oct 2014 20:36:25 GMT
< Connection: close
< Content-Length: 1033
< 
<html><head><title>Grizzly 2.3.16</title><style><!--div.header {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#003300;font-size:22px;-moz-border-radius-topleft: 10px;border-top-left-radius: 10px;-moz-border-radius-topright: 10px;border-top-right-radius: 10px;padding-left: 5px}div.body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:#FFFFCC;font-size:16px;padding-top:10px;padding-bottom:10px;padding-left:10px}div.footer {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#666633;font-size:14px;-moz-border-radius-bottomleft: 10px;border-bottom-left-radius: 10px;-moz-border-radius-bottomright: 10px;border-bottom-right-radius: 10px;padding-left: 5px}BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B {font-family:Tahoma,Arial,sans-serif;color:black;}A {color : black;}HR {color : #999966;}--></style> </head><body><div class="header">Request failed.</div><div class="body">Request failed.</div><div class="footer">Grizzly 2.3.16</div></bod* Closing connection 0
y></html>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.