Metadata API Reference
Note: Currently, metadata APIs use v2. Mutation and query operations have transitioned to v3, but metadata v3 support is planned for the future.
Note: Authentication is not yet implemented. The
Authorizationheader is reserved for future use.
Metadata APIs allow you to manage the structure and configuration of graph data in Actionbase, including services (v3: databases), labels (v3: tables), aliases, and queries.
For conceptual understanding, see Schema.
1. Service
Section titled “1. Service”Services are logical groups that contain labels and aliases, providing organization and isolation for related graph structures.
1.1 Get Service
Section titled “1.1 Get Service”Retrieve a single service by name.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
Response Type
Section titled “Response Type”ServiceEntity - Service information
Request Example
Section titled “Request Example”| Parameter | Value |
|---|---|
| Authorization | YOUR_API_KEY |
| service | myservice |
# GET /graph/v2/service/myservicecurl -X GET \ "http://ab.example.com/graph/v2/service/myservice" \ -H "Authorization: YOUR_API_KEY"Response Example
Section titled “Response Example”{ "active": true, "name": "myservice", "desc": "My service description"}1.2 Get All Services
Section titled “1.2 Get All Services”Retrieve all services.
Endpoint
Section titled “Endpoint”GET /graph/v2/serviceParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
Response Type
Section titled “Response Type”DdlPage of ServiceEntity - Paginated list of services
Request Example
Section titled “Request Example”# GET /graph/v2/servicecurl -X GET \ "http://ab.example.com/graph/v2/service" \ -H "Authorization: YOUR_API_KEY"Response Example
Section titled “Response Example”{ "count": 2, "content": [ { "active": true, "name": "myservice", "desc": "My service description" }, { "active": true, "name": "anotherservice", "desc": "Another service" } ]}1.3 Create Service
Section titled “1.3 Create Service”Create a new service.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Body | desc | Required | Service description |
Request Body
Section titled “Request Body”ServiceCreateRequest - Service creation payload
Response Type
Section titled “Response Type”DdlStatus of ServiceEntity - Service creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservicecurl -X POST \ "http://ab.example.com/graph/v2/service/myservice" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "desc": "My service description" }'Response Example
Section titled “Response Example”{ "status": "CREATED", "result": { "active": true, "name": "myservice", "desc": "My service description" }}1.4 Update Service
Section titled “1.4 Update Service”Update an existing service.
Endpoint
Section titled “Endpoint”PUT /graph/v2/service/{service}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Body | active | Optional | Whether the service is active |
| Body | desc | Optional | Service description |
Request Body
Section titled “Request Body”ServiceUpdateRequest - Service update payload
Response Type
Section titled “Response Type”DdlStatus of ServiceEntity - Service update status
Request Example
Section titled “Request Example”# PUT /graph/v2/service/myservicecurl -X PUT \ "http://ab.example.com/graph/v2/service/myservice" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "active": true, "desc": "Updated service description" }'2. Label
Section titled “2. Label”Labels define the schema for graph edges, specifying the structure of relationships, including source and target node types, edge properties, and indexes.
2.1 Get Label
Section titled “2.1 Get Label”Retrieve a single label by name.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/label/{label}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | label | Required | Label name |
Response Type
Section titled “Response Type”LabelEntity - Label information
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/label/followscurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/label/follows" \ -H "Authorization: YOUR_API_KEY"Response Example
Section titled “Response Example”{ "active": true, "name": "myservice.follows", "desc": "User follows relationship", "type": "HASH", "schema": { "src": { "type": "LONG", "desc": "User ID" }, "tgt": { "type": "LONG", "desc": "User ID" }, "fields": [ { "name": "created_at", "type": "LONG", "nullable": false, "desc": "Creation timestamp" } ] }, "dirType": "OUT", "storage": "hbase-storage-1", "indices": [], "groups": [], "event": false, "readOnly": false, "mode": "SYNC"}2.2 Get All Labels
Section titled “2.2 Get All Labels”Retrieve all labels in a service.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/labelParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
Response Type
Section titled “Response Type”DdlPage of LabelEntity - Paginated list of labels
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/labelcurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/label" \ -H "Authorization: YOUR_API_KEY"2.3 Create Label
Section titled “2.3 Create Label”Create a new label.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}/label/{label}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | label | Required | Label name |
| Body | desc | Required | Label description |
| Body | type | Required | Label type (HASH, INDEXED, MULTI_EDGE) |
| Body | schema | Required | Edge schema definition |
| Body | dirType | Required | Direction type (OUT, IN, UNDIRECTED) |
| Body | storage | Required | Storage name |
| Body | groups | Optional | List of groups |
| Body | indices | Optional | List of indexes |
| Body | event | Optional | Whether events are enabled (default: false) |
| Body | readOnly | Optional | Whether the label is read-only (default: false) |
| Body | mode | Optional | Mutation mode (default: SYNC) |
Request Body
Section titled “Request Body”LabelCreateRequest - Label creation payload
Response Type
Section titled “Response Type”DdlStatus of LabelEntity - Label creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservice/label/followscurl -X POST \ "http://ab.example.com/graph/v2/service/myservice/label/follows" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "desc": "User follows relationship", "type": "HASH", "schema": { "src": { "type": "LONG", "desc": "User ID" }, "tgt": { "type": "LONG", "desc": "User ID" }, "fields": [ { "name": "created_at", "type": "LONG", "nullable": false, "desc": "Creation timestamp" } ] }, "dirType": "OUT", "storage": "hbase-storage-1", "indices": [], "groups": [], "event": false, "readOnly": false, "mode": "SYNC" }'2.4 Update Label
Section titled “2.4 Update Label”Update an existing label.
Endpoint
Section titled “Endpoint”PUT /graph/v2/service/{service}/label/{label}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | label | Required | Label name |
| Body | active | Optional | Whether the label is active |
| Body | desc | Optional | Label description |
| Body | type | Optional | Label type |
| Body | schema | Optional | Edge schema definition |
| Body | groups | Optional | List of groups |
| Body | indices | Optional | List of indexes |
| Body | readOnly | Optional | Whether the label is read-only |
| Body | mode | Optional | Mutation mode |
Request Body
Section titled “Request Body”LabelUpdateRequest - Label update payload
Response Type
Section titled “Response Type”DdlStatus of LabelEntity - Label update status
Request Example
Section titled “Request Example”# PUT /graph/v2/service/myservice/label/followscurl -X PUT \ "http://ab.example.com/graph/v2/service/myservice/label/follows" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "active": true, "desc": "Updated label description" }'2.5 Copy Label
Section titled “2.5 Copy Label”Copy an existing label to create a new label.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}/label/{label}/copyParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | label | Required | Source label name |
| Body | target | Required | Target label name |
| Body | storage | Required | Storage name for the new label |
Request Body
Section titled “Request Body”LabelCopyRequest - Label copy payload
Response Type
Section titled “Response Type”DdlStatus of LabelEntity - Label creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservice/label/follows/copycurl -X POST \ "http://ab.example.com/graph/v2/service/myservice/label/follows/copy" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "target": "follows_backup", "storage": "hbase-storage-1" }'2.6 Get Label Status
Section titled “2.6 Get Label Status”Get the status of a label.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/label/{label}/statusParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | label | Required | Label name |
Response Type
Section titled “Response Type”String - Label status information
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/label/follows/statuscurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/label/follows/status" \ -H "Authorization: YOUR_API_KEY"3. Alias
Section titled “3. Alias”Aliases are references that point to labels, enabling alternative names for the same label.
3.1 Get Alias
Section titled “3.1 Get Alias”Retrieve a single alias by name.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/alias/{alias}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | alias | Required | Alias name |
Response Type
Section titled “Response Type”AliasEntity - Alias information
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/alias/friendscurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/alias/friends" \ -H "Authorization: YOUR_API_KEY"Response Example
Section titled “Response Example”{ "active": true, "name": "myservice.friends", "desc": "Alias for follows relationship", "target": "myservice.follows", "label": { "active": true, "name": "myservice.follows", "desc": "User follows relationship", "type": "HASH", "schema": { ... }, "dirType": "OUT", "storage": "hbase-storage-1" }}3.2 Get All Aliases
Section titled “3.2 Get All Aliases”Retrieve all aliases in a service.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/aliasParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
Response Type
Section titled “Response Type”DdlPage of AliasEntity - Paginated list of aliases
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/aliascurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/alias" \ -H "Authorization: YOUR_API_KEY"3.3 Create Alias
Section titled “3.3 Create Alias”Create a new alias.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}/alias/{alias}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | alias | Required | Alias name |
| Body | desc | Required | Alias description |
| Body | target | Required | Target label name (format: service.label) |
Request Body
Section titled “Request Body”AliasCreateRequest - Alias creation payload
Response Type
Section titled “Response Type”DdlStatus of AliasEntity - Alias creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservice/alias/friendscurl -X POST \ "http://ab.example.com/graph/v2/service/myservice/alias/friends" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "desc": "Alias for follows relationship", "target": "myservice.follows" }'3.4 Update Alias
Section titled “3.4 Update Alias”Update an existing alias.
Endpoint
Section titled “Endpoint”PUT /graph/v2/service/{service}/alias/{alias}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | alias | Required | Alias name |
| Body | active | Optional | Whether the alias is active |
| Body | desc | Optional | Alias description |
| Body | target | Optional | Target label name |
Request Body
Section titled “Request Body”AliasUpdateRequest - Alias update payload
Response Type
Section titled “Response Type”DdlStatus of AliasEntity - Alias update status
Request Example
Section titled “Request Example”# PUT /graph/v2/service/myservice/alias/friendscurl -X PUT \ "http://ab.example.com/graph/v2/service/myservice/alias/friends" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "active": true, "desc": "Updated alias description" }'3.5 Delete Alias
Section titled “3.5 Delete Alias”Delete an alias.
Endpoint
Section titled “Endpoint”DELETE /graph/v2/service/{service}/alias/{alias}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | alias | Required | Alias name |
Response Type
Section titled “Response Type”DdlStatus of AliasEntity - Alias deletion status
Request Example
Section titled “Request Example”# DELETE /graph/v2/service/myservice/alias/friendscurl -X DELETE \ "http://ab.example.com/graph/v2/service/myservice/alias/friends" \ -H "Authorization: YOUR_API_KEY"3.6 Create Label from Alias
Section titled “3.6 Create Label from Alias”Create a new label based on the label that an alias points to.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}/alias/{alias}/new-labelParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | alias | Required | Alias name |
| Body | target | Required | Target label name for the new label |
| Body | storage | Required | Storage name for the new label |
Request Body
Section titled “Request Body”LabelCopyRequest - Label creation payload
Response Type
Section titled “Response Type”DdlStatus of LabelEntity - Label creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservice/alias/friends/new-labelcurl -X POST \ "http://ab.example.com/graph/v2/service/myservice/alias/friends/new-label" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "target": "follows_new", "storage": "hbase-storage-1" }'4. Query
Section titled “4. Query”Queries define reusable query patterns for graph operations.
4.1 Get Query
Section titled “4.1 Get Query”Retrieve a single query by name.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/query/{query}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | query | Required | Query name |
Response Type
Section titled “Response Type”QueryEntity - Query information
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/query/user-followerscurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/query/user-followers" \ -H "Authorization: YOUR_API_KEY"4.2 Get All Queries
Section titled “4.2 Get All Queries”Retrieve all queries in a service.
Endpoint
Section titled “Endpoint”GET /graph/v2/service/{service}/queryParameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
Response Type
Section titled “Response Type”DdlPage of QueryEntity - Paginated list of queries
Request Example
Section titled “Request Example”# GET /graph/v2/service/myservice/querycurl -X GET \ "http://ab.example.com/graph/v2/service/myservice/query" \ -H "Authorization: YOUR_API_KEY"4.3 Create Query
Section titled “4.3 Create Query”Create a new query.
Endpoint
Section titled “Endpoint”POST /graph/v2/service/{service}/query/{query}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | query | Required | Query name |
| Body | desc | Required | Query description |
| Body | query | Required | Query definition |
| Body | stats | Optional | Statistics configuration |
Request Body
Section titled “Request Body”QueryCreateRequest - Query creation payload
Response Type
Section titled “Response Type”DdlStatus of QueryEntity - Query creation status
Request Example
Section titled “Request Example”# POST /graph/v2/service/myservice/query/user-followerscurl -X POST \ "http://ab.example.com/graph/v2/service/myservice/query/user-followers" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "desc": "Get user followers", "query": "SELECT * FROM myservice.follows WHERE src = ?", "stats": null }'4.4 Update Query
Section titled “4.4 Update Query”Update an existing query.
Endpoint
Section titled “Endpoint”PUT /graph/v2/service/{service}/query/{query}Parameters
Section titled “Parameters”| Location | Parameter | Required | Description |
|---|---|---|---|
| Header | Authorization | Optional | Authentication key (reserved for future use) |
| Path | service | Required | Service name |
| Path | query | Required | Query name |
| Body | active | Optional | Whether the query is active |
| Body | desc | Optional | Query description |
| Body | query | Optional | Query definition |
| Body | stats | Optional | Statistics configuration |
Request Body
Section titled “Request Body”QueryUpdateRequest - Query update payload
Response Type
Section titled “Response Type”DdlStatus of QueryEntity - Query update status
Request Example
Section titled “Request Example”# PUT /graph/v2/service/myservice/query/user-followerscurl -X PUT \ "http://ab.example.com/graph/v2/service/myservice/query/user-followers" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "desc": "Updated query description", "query": "SELECT * FROM myservice.follows WHERE src = ? LIMIT 100" }'Data Model
Section titled “Data Model”ServiceEntity
Section titled “ServiceEntity”Service information payload.
data class ServiceEntity( val active: Boolean, // Whether the service is active val name: String, // Service name val desc: String, // Service description)LabelEntity
Section titled “LabelEntity”Label information payload.
data class LabelEntity( val active: Boolean, // Whether the label is active val name: String, // Label name (format: service.label) val desc: String, // Label description val type: LabelType, // Label type (HASH, INDEXED, MULTI_EDGE) val schema: EdgeSchema, // Edge schema definition val dirType: DirectionType, // Direction type (OUT, IN, UNDIRECTED) val storage: String, // Storage name val indices: List<Index>, // List of indexes val groups: List<Group>, // List of groups val event: Boolean, // Whether events are enabled val readOnly: Boolean, // Whether the label is read-only val mode: MutationMode, // Mutation mode)AliasEntity
Section titled “AliasEntity”Alias information payload.
data class AliasEntity( val active: Boolean, // Whether the alias is active val name: String, // Alias name (format: service.alias) val desc: String, // Alias description val target: String, // Target label name (format: service.label) val label: LabelEntity?, // Referenced label information (optional))QueryEntity
Section titled “QueryEntity”Query information payload.
data class QueryEntity( val active: Boolean, // Whether the query is active val name: String, // Query name (format: service.query) val desc: String, // Query description val query: String, // Query definition val stats: String?, // Statistics configuration (optional))DdlPage
Section titled “DdlPage”Paginated response payload.
data class DdlPage<T>( val count: Long, // Total count val content: List<T>, // List of items)DdlStatus
Section titled “DdlStatus”DDL operation status payload.
data class DdlStatus<T>( val status: String, // Operation status (e.g., CREATED, UPDATED, DELETED) val result: T?, // Result entity (optional))ServiceCreateRequest
Section titled “ServiceCreateRequest”Service creation request payload.
data class ServiceCreateRequest( val desc: String, // Service description)ServiceUpdateRequest
Section titled “ServiceUpdateRequest”Service update request payload.
data class ServiceUpdateRequest( val active: Boolean?, // Whether the service is active (optional) val desc: String?, // Service description (optional))LabelCreateRequest
Section titled “LabelCreateRequest”Label creation request payload.
data class LabelCreateRequest( val desc: String, // Label description val type: LabelType, // Label type val schema: EdgeSchema, // Edge schema definition val dirType: DirectionType, // Direction type val storage: String, // Storage name val groups: List<Group>?, // List of groups (optional) val indices: List<Index>?, // List of indexes (optional) val event: Boolean?, // Whether events are enabled (optional, default: false) val readOnly: Boolean?, // Whether the label is read-only (optional, default: false) val mode: MutationMode?, // Mutation mode (optional, default: SYNC))LabelUpdateRequest
Section titled “LabelUpdateRequest”Label update request payload.
data class LabelUpdateRequest( val active: Boolean?, // Whether the label is active (optional) val desc: String?, // Label description (optional) val type: LabelType?, // Label type (optional) val schema: EdgeSchema?, // Edge schema definition (optional) val groups: List<Group>?, // List of groups (optional) val indices: List<Index>?, // List of indexes (optional) val readOnly: Boolean?, // Whether the label is read-only (optional) val mode: MutationMode?, // Mutation mode (optional))LabelCopyRequest
Section titled “LabelCopyRequest”Label copy request payload.
data class LabelCopyRequest( val target: String, // Target label name val storage: String, // Storage name for the new label)AliasCreateRequest
Section titled “AliasCreateRequest”Alias creation request payload.
data class AliasCreateRequest( val desc: String, // Alias description val target: String, // Target label name (format: service.label))AliasUpdateRequest
Section titled “AliasUpdateRequest”Alias update request payload.
data class AliasUpdateRequest( val active: Boolean?, // Whether the alias is active (optional) val desc: String?, // Alias description (optional) val target: String?, // Target label name (optional))QueryCreateRequest
Section titled “QueryCreateRequest”Query creation request payload.
data class QueryCreateRequest( val desc: String, // Query description val query: String, // Query definition val stats: String?, // Statistics configuration (optional))QueryUpdateRequest
Section titled “QueryUpdateRequest”Query update request payload.
data class QueryUpdateRequest( val active: Boolean?, // Whether the query is active (optional) val desc: String?, // Query description (optional) val query: String?, // Query definition (optional) val stats: String?, // Statistics configuration (optional))