Variable API

5.1 Variables

Variables can be used to store data about the entire graph. The data is accessed and stored in the form of key-value pairs.

5.1.1 Creating or Updating a Key-Value Pair

Method & Url
  1. PUT http://localhost:8080/graphs/hugegraph/variables/name
Request Body
  1. {
  2. "data": "tom"
  3. }
Response Status
  1. 200
Response Body
  1. {
  2. "name": "tom"
  3. }

5.1.2 Listing all key-value pairs

Method & Url
  1. GET http://localhost:8080/graphs/hugegraph/variables
Response Status
  1. 200
Response Body
  1. {
  2. "name": "tom"
  3. }

5.1.3 Listing a specific key-value pair

Method & Url
  1. GET http://localhost:8080/graphs/hugegraph/variables/name
Response Status
  1. 200
Response Body
  1. {
  2. "name": "tom"
  3. }

5.1.4 Deleting a specific key-value pair

Method & Url
  1. DELETE http://localhost:8080/graphs/hugegraph/variables/name
Response Status
  1. 204

Last modified May 21, 2023: Update variable.md (#248) (0e7a6a9d)