-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update outdated response in vertex api #259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it's nice to use GPT/New Bing
to enhance the english/chinese typo problem.
Just past the url/phrase into it, ask for the improvement, then it will give us a string of suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a nice example for others to refer/improve the outdated doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement, could also add the (basic) pic/steps for others to refer~
* optimize by new-bing 37a1cb5
Fix this page: https://hugegraph.apache.org/cn/docs/clients/restful-api/vertex/
Local Tests:
Env: HG-Server depolyed by
docker
, (ip:port,192.168.34.164:18080
)schema:
1 Create a vertex
response:
2 Create multiple vertices
response:
3 Update vertex properties
response:
4 Batch Update Vertex Properties
add some verticesfor test:
response:
Batch Update Vertex Properties results:
response:
5 Delete Vertex Properties
response:
6 Get Vertices that Meet the Criteria
curl -i 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices?label=person&properties=\{%22age%22:30\}&limit=1' \ --compressed
response:
Paginate through all vertices, retrieve the first page (page without parameter value), limited to 3 records
add some verticesfor test:
response:
Start paging query
curl -i 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices?page&limit=3' \ --compressed
response:
search next page results:
curl -i 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices?page=CIYxOnBldGVyAAAAAAAAAAM=&limit=3' \ --compressed
response:
7 Retrieve Vertex by ID
curl -i 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices/%221:marko%22'
response:
Delete the vertex based on ID only.
curl -i -X DELETE 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices/%221:marko%22'
response:
curl -i -X DELETE 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices/%221:marko%22' HTTP/1.1 204 No Content Connection: keep-alive Keep-Alive: timeout=4 Proxy-Connection: keep-alive
Delete Vertex by Label+ID
curl -i -X DELETE 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices/%221:marko%22?label=person'
response:
curl -i -X DELETE 'http://192.168.34.164:18080/graphs/hugegraph/graph/vertices/%221:marko%22?label=person' HTTP/1.1 204 No Content Connection: keep-alive Keep-Alive: timeout=4 Proxy-Connection: keep-alive