Updated on 2025-03-05 GMT+08:00

Database Edition

Database edition service plane APIs include vertex operations, edge operations, metadata operations, index operations, HyG dataset management, HyG algorithm, HyG job management, native algorithms, graph statistics, graph operations, job management, and Cypher operations.

Table 1 Vertex operation APIs

API

URL

Function

Querying Vertex Details

GET/ges/v1.0/{project_id}/graphs/{graph_name}/vertices/detail?vertexIds={vertex_ids}

Query details about a specified vertex of a specified set of vertices, including the label information.

Querying Vertex Data in Batches

POST/ges/v1.0/{project_id}/graphs/{graph_name}/vertices/action?action_id=batch-query

Query vertex details in batches.

Adding Vertices in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/vertices/action?action_id=batch-add

Add vertices in batches.

Deleting Vertices in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/vertices/action?action_id=batch-delete

Delete vertices in batches based on the vertex IDs.

Updating Vertex Properties in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/vertices/properties/action?action_id={actionId}

Update vertex properties in batches.

Table 2 Edge operation APIs

API

URL

Function

Querying Edge Details

GET /ges/v1.0/{project_id}/graphs/{graph_name}/edges/detail?source={sourceVertex}&target={targetVertex}&index={index}

Query the details about an edge based on its source and target vertices, including the edge's label information.

Querying Edge Data in Batches

POST/ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=batch-query

Query edge details in batches.

Adding Edges in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=batch-add

Add edges in batches.

Deleting Edges in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=batch-delete

Delete edges in batches based on the source vertices, target vertices, and indexes of the edges.

Updating Edge Properties in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/edges/properties/action?action_id={actionId}

Update edge properties in batches.

Table 3 Metadata operation APIs

API

URL

Function

Adding a Label

POST /ges/v1.0/{project_id}/graphs/{graph_name}/schema/labels

Add a label.

Updating a Label

POST /ges/v1.0/{project_id}/graphs/{graph_name}/schema/labels/{label_name}/properties

Update a label.

Querying Graph Metadata Details

GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema

Query metadata details.

Querying Labels

GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema?label={labelName}

Query labels.

Generating Data Assets

POST /ges/v1.0/{project_id}/graphs/{graph_name}/schema/data-assets

Generate data assets.

Obtaining Data Assets

GET /ges/v1.0/{project_id}/graphs/{graph_name}/schema/data-assets

Obtain data assets.

Table 4 Index operation APIs

API

URL

Function

Creating an Index

POST /ges/v1.0/{project_id}/graphs/{graph_name}/indices

Create an index.

Deleting an Index

DELETE /ges/v1.0/{project_id}/graphs/{graph_name}/indices/{indexName}

Delete an index.

Querying Indexes

GET /ges/v1.0/{project_id}/graphs/{graph_name}/indices

Query indexes.

Creating Indexes in Batches

POST /ges/v1.0/{project_id}/graphs/{graph_name}/ indices/action?action_id=batch-build

Create indexes in batches. By doing so, the number of data scans is reduced and the overall time required is shorten.

Table 5 HyG graph management APIs

API

URL

Function

Creating a HyG Graph

POST /ges/v1.0/{project_id}/hyg/{graph_name}

Create a HyG graph.

Synchronizing HyG Graph Data

POST /ges/v1.0/{project_id}/hyg/{graph_name}/sync

Synchronize graph database updates to the HyG computing engine.

Querying General Information About a HyG Graph

GET /ges/v1.0/{project_id}/hyg/{graph_name}/summary

Query general information about a HyG graph, such as the number of vertices, number of edges, properties, and partitioning policies.

Deleting a HyG Graph

DELETE /ges/v1.0/{project_id}/hyg/{graph_name}

Delete a HyG graph.

Listing HyG Graphs

GET /ges/v1.0/{project_id}/hyg

List HyG graphs.

Importing an HyG Graph

POST /ges/v1.0/{project_id}/hyg/{graph_name}/import-graph

Import HyG graph data.

Table 6 HyG algorithm API

API

URL

Function

Runing Algorithms

POST /ges/v1.0/{project_id}/graphs/{graph_name}/hyg/algorithm

Run the HyG algorithm.

Running DSL Algorithms

POST /ges/v1.0/{project_id}/hyg/{graph_name}/dsl

Provide flexible DSLs to help users design and run algorithms at low costs.

Table 7 HyG job management APIs

API

URL

Function

Dumping HyG Algorithm Results

POST /ges/v1.0/{project_id}/hyg/{graph_name}/jobs/{job_id}/export-result

Dump the execution results of the algorithm (jobId) to OBS.

Canceling a HyG Job

DELETE /ges/v1.0/{project_id}/hyg/{graph_name}/jobs/{job_id}

Cancel a submitted HyG job. (Currently, only jobs in a queue can be canceled.)

Table 8 Native algorithm API

API

URL

Function

Runing Algorithms

POST /ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=execute-algorithm

Run native algorithms.

Table 9 Graph statistics APIs

API

URL

Function

Querying General Information About a Graph

GET /ges/v1.0/{project_id}/graphs/{graph_name}/summary

Query general information about a graph.

Querying the Graph Version

GET /ges/v1.0/{project_id}/graphs/{graph_name}/version

Query the graph version.

Table 10 Graph operation APIs

API

URL

Function

Importing a Graph

POST /ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id= import-graph

Import graph data.

Clearing a Graph

POST /ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=clear-graph

Clear graph data.

Exporting a Graph

POST /ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=export-graph

Export graph data.

Creating a Graph

POST /ges/v1.0/{project_id}/graphs

Create a graph.

Deleting a Graph

DELETE /ges/v1.0/{project_id}/graphs/{graph_name}

Delete a graph.

Listing Graphs

GET /ges/v1.0/{project_id}/graphs

List graphs.

Table 11 Job management APIs

API

URL

Function

Querying Job Status

GET/ges/v1.0/{project_id}/graphs/{graph_name}/jobs/{job_id}/status?offset=offset&limit=limit

Query the job status.

Querying the Job List

GET /ges/v1.0/{project_id}/graphs/{graph_name}/jobs/status?limit={limit}&offset={offset}

After the ID of an asynchronous job is returned, if the job ID at the service layer is lost and cannot be obtained through the API, a new API is provided to query all asynchronous jobs stored in the engine. The job ID, job status, and original request of each job are returned.

Table 12 Cypher operation APIs

API

URL

Function

Cypher Operation APIs

POST /ges/v1.0/{project_id}/graphs/{graph_name}/action?action_id=execute-cypher-query

Run Cypher statements to query data in GES and obtain results.