简体   繁体   中英

Getting an Error when I make this gremlin query in IBM Graph service on bluemix

When I issue this gremlin query using IBM Graph's gremlin endpoint I get an error

curl -u username:password -H 'Content-Type: application/json' -d '{"gremlin": "g = graph.traversal(); gV(4144)"}' -X POST "http://../g/gremlin"

Any thoughts?

In IBM Graph, it's required that you explicitly declare all variables in a gremlin query before using them. So the above query should look something like that :

curl -u username:password -H 'Content-Type: application/json' -d '{"gremlin": " def g = graph.traversal(); gV(4144)"}' -X POST " http://../g/gremlin "

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM