Titan REST endpoint

Titan can speak REST.

From Connecting via REST:

Gremlin Server provides for a single REST endpoint - a Gremlin evaluator - which allows the submission of a Gremlin script as a request.

FIXME What follows is a very rough note

If you uncommented out com.tinkerpop.gremlin.server.channel.HttpChannelizer, you'd be able to execute queries using two REST APIs:

➜  ~  curl -i -H "Accept: application/json" http://localhost:8182/graphs -d '{"gremlin": "g.v(10240256)"}'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 325
Connection: keep-alive

{"result":{"data":[{"id":10240256,"label":"n0","type":"vertex","properties":{"name":[{"id":{"relationId":10240096,"longRepresentation":[10240096,10240256,4101]},"label":"name","value":"ORac","properties":{}}]}}],"meta":{}},"requestId":"83807d87-e871-4896-9481-6e653d4cda76","status":{"code":200,"attributes":{},"message":""}}%

➜  ~  curl "http://localhost:8182?gremlin=100-1" | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   136  100   136    0     0  14106      0 --:--:-- --:--:-- --:--:-- 15111
{
    "requestId": "9860eeb8-211c-40e0-b864-1da9904f59b2",
    "result": {
        "data": [
            99
        ],
        "meta": {}
    },
    "status": {
        "attributes": {},
        "code": 200,
        "message": ""
    }
}

results matching ""

    No results matching ""