I've been trying to do some simple traversal in python using the REST API:
import requests
url = "http://localhost:8529/_api/traversal"
d = { "startVertex": 'V/62824208658', "graphName" : "G", "direction" : "outbound"}
r = requests.post(url, data = json.dumps(d))
print r.json()
But this what i get :
{u'errorMessage': u'invalid startVertex', u'errorNum': 1202, u'code': 404, u'error': True}
I am sure that the vertice and graph exist. I have created them, and connected the vertice to another one by hand using the graphical interface.
Does anyone know why?
Cheers,
Ok, i found the problem, you are working on a database test_db but your traversal request is adressing the (default) _system db. Change the call to:
url = "http://localhost:8529/_db/test_db/_api/traversal"
And don't forget to define a direction ;)
Cheers
Florian
The error message seems quite clear, i took a look at the implementation of traversal and it only returns this error when the vertex is not found in the database.
Just to confirm, try GET http://localhost:8529/_api/document/V/62824208658
to check if your vertex exists
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.