Skip to content

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 Authorization header 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.

Services are logical groups that contain labels and aliases, providing organization and isolation for related graph structures.

Retrieve a single service by name.

GET /graph/v2/service/{service}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name

ServiceEntity - Service information

ParameterValue
AuthorizationYOUR_API_KEY
servicemyservice
Terminal window
# GET /graph/v2/service/myservice
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice" \
-H "Authorization: YOUR_API_KEY"
{
"active": true,
"name": "myservice",
"desc": "My service description"
}

Retrieve all services.

GET /graph/v2/service
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)

DdlPage of ServiceEntity - Paginated list of services

Terminal window
# GET /graph/v2/service
curl -X GET \
"http://ab.example.com/graph/v2/service" \
-H "Authorization: YOUR_API_KEY"
{
"count": 2,
"content": [
{
"active": true,
"name": "myservice",
"desc": "My service description"
},
{
"active": true,
"name": "anotherservice",
"desc": "Another service"
}
]
}

Create a new service.

POST /graph/v2/service/{service}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
BodydescRequiredService description

ServiceCreateRequest - Service creation payload

DdlStatus of ServiceEntity - Service creation status

Terminal window
# POST /graph/v2/service/myservice
curl -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"
}'
{
"status": "CREATED",
"result": {
"active": true,
"name": "myservice",
"desc": "My service description"
}
}

Update an existing service.

PUT /graph/v2/service/{service}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
BodyactiveOptionalWhether the service is active
BodydescOptionalService description

ServiceUpdateRequest - Service update payload

DdlStatus of ServiceEntity - Service update status

Terminal window
# PUT /graph/v2/service/myservice
curl -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"
}'

Labels define the schema for graph edges, specifying the structure of relationships, including source and target node types, edge properties, and indexes.

Retrieve a single label by name.

GET /graph/v2/service/{service}/label/{label}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathlabelRequiredLabel name

LabelEntity - Label information

Terminal window
# GET /graph/v2/service/myservice/label/follows
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/label/follows" \
-H "Authorization: YOUR_API_KEY"
{
"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"
}

Retrieve all labels in a service.

GET /graph/v2/service/{service}/label
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name

DdlPage of LabelEntity - Paginated list of labels

Terminal window
# GET /graph/v2/service/myservice/label
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/label" \
-H "Authorization: YOUR_API_KEY"

Create a new label.

POST /graph/v2/service/{service}/label/{label}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathlabelRequiredLabel name
BodydescRequiredLabel description
BodytypeRequiredLabel type (HASH, INDEXED, MULTI_EDGE)
BodyschemaRequiredEdge schema definition
BodydirTypeRequiredDirection type (OUT, IN, UNDIRECTED)
BodystorageRequiredStorage name
BodygroupsOptionalList of groups
BodyindicesOptionalList of indexes
BodyeventOptionalWhether events are enabled (default: false)
BodyreadOnlyOptionalWhether the label is read-only (default: false)
BodymodeOptionalMutation mode (default: SYNC)

LabelCreateRequest - Label creation payload

DdlStatus of LabelEntity - Label creation status

Terminal window
# POST /graph/v2/service/myservice/label/follows
curl -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"
}'

Update an existing label.

PUT /graph/v2/service/{service}/label/{label}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathlabelRequiredLabel name
BodyactiveOptionalWhether the label is active
BodydescOptionalLabel description
BodytypeOptionalLabel type
BodyschemaOptionalEdge schema definition
BodygroupsOptionalList of groups
BodyindicesOptionalList of indexes
BodyreadOnlyOptionalWhether the label is read-only
BodymodeOptionalMutation mode

LabelUpdateRequest - Label update payload

DdlStatus of LabelEntity - Label update status

Terminal window
# PUT /graph/v2/service/myservice/label/follows
curl -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"
}'

Copy an existing label to create a new label.

POST /graph/v2/service/{service}/label/{label}/copy
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathlabelRequiredSource label name
BodytargetRequiredTarget label name
BodystorageRequiredStorage name for the new label

LabelCopyRequest - Label copy payload

DdlStatus of LabelEntity - Label creation status

Terminal window
# POST /graph/v2/service/myservice/label/follows/copy
curl -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"
}'

Get the status of a label.

GET /graph/v2/service/{service}/label/{label}/status
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathlabelRequiredLabel name

String - Label status information

Terminal window
# GET /graph/v2/service/myservice/label/follows/status
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/label/follows/status" \
-H "Authorization: YOUR_API_KEY"

Aliases are references that point to labels, enabling alternative names for the same label.

Retrieve a single alias by name.

GET /graph/v2/service/{service}/alias/{alias}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathaliasRequiredAlias name

AliasEntity - Alias information

Terminal window
# GET /graph/v2/service/myservice/alias/friends
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/alias/friends" \
-H "Authorization: YOUR_API_KEY"
{
"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"
}
}

Retrieve all aliases in a service.

GET /graph/v2/service/{service}/alias
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name

DdlPage of AliasEntity - Paginated list of aliases

Terminal window
# GET /graph/v2/service/myservice/alias
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/alias" \
-H "Authorization: YOUR_API_KEY"

Create a new alias.

POST /graph/v2/service/{service}/alias/{alias}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathaliasRequiredAlias name
BodydescRequiredAlias description
BodytargetRequiredTarget label name (format: service.label)

AliasCreateRequest - Alias creation payload

DdlStatus of AliasEntity - Alias creation status

Terminal window
# POST /graph/v2/service/myservice/alias/friends
curl -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"
}'

Update an existing alias.

PUT /graph/v2/service/{service}/alias/{alias}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathaliasRequiredAlias name
BodyactiveOptionalWhether the alias is active
BodydescOptionalAlias description
BodytargetOptionalTarget label name

AliasUpdateRequest - Alias update payload

DdlStatus of AliasEntity - Alias update status

Terminal window
# PUT /graph/v2/service/myservice/alias/friends
curl -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"
}'

Delete an alias.

DELETE /graph/v2/service/{service}/alias/{alias}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathaliasRequiredAlias name

DdlStatus of AliasEntity - Alias deletion status

Terminal window
# DELETE /graph/v2/service/myservice/alias/friends
curl -X DELETE \
"http://ab.example.com/graph/v2/service/myservice/alias/friends" \
-H "Authorization: YOUR_API_KEY"

Create a new label based on the label that an alias points to.

POST /graph/v2/service/{service}/alias/{alias}/new-label
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathaliasRequiredAlias name
BodytargetRequiredTarget label name for the new label
BodystorageRequiredStorage name for the new label

LabelCopyRequest - Label creation payload

DdlStatus of LabelEntity - Label creation status

Terminal window
# POST /graph/v2/service/myservice/alias/friends/new-label
curl -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"
}'

Queries define reusable query patterns for graph operations.

Retrieve a single query by name.

GET /graph/v2/service/{service}/query/{query}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathqueryRequiredQuery name

QueryEntity - Query information

Terminal window
# GET /graph/v2/service/myservice/query/user-followers
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/query/user-followers" \
-H "Authorization: YOUR_API_KEY"

Retrieve all queries in a service.

GET /graph/v2/service/{service}/query
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name

DdlPage of QueryEntity - Paginated list of queries

Terminal window
# GET /graph/v2/service/myservice/query
curl -X GET \
"http://ab.example.com/graph/v2/service/myservice/query" \
-H "Authorization: YOUR_API_KEY"

Create a new query.

POST /graph/v2/service/{service}/query/{query}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathqueryRequiredQuery name
BodydescRequiredQuery description
BodyqueryRequiredQuery definition
BodystatsOptionalStatistics configuration

QueryCreateRequest - Query creation payload

DdlStatus of QueryEntity - Query creation status

Terminal window
# POST /graph/v2/service/myservice/query/user-followers
curl -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
}'

Update an existing query.

PUT /graph/v2/service/{service}/query/{query}
LocationParameterRequiredDescription
HeaderAuthorizationOptionalAuthentication key (reserved for future use)
PathserviceRequiredService name
PathqueryRequiredQuery name
BodyactiveOptionalWhether the query is active
BodydescOptionalQuery description
BodyqueryOptionalQuery definition
BodystatsOptionalStatistics configuration

QueryUpdateRequest - Query update payload

DdlStatus of QueryEntity - Query update status

Terminal window
# PUT /graph/v2/service/myservice/query/user-followers
curl -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"
}'

Service information payload.

data class ServiceEntity(
val active: Boolean, // Whether the service is active
val name: String, // Service name
val desc: String, // Service description
)

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
)

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)
)

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)
)

Paginated response payload.

data class DdlPage&lt;T&gt;(
val count: Long, // Total count
val content: List&lt;T&gt;, // List of items
)

DDL operation status payload.

data class DdlStatus&lt;T&gt;(
val status: String, // Operation status (e.g., CREATED, UPDATED, DELETED)
val result: T?, // Result entity (optional)
)

Service creation request payload.

data class ServiceCreateRequest(
val desc: String, // Service description
)

Service update request payload.

data class ServiceUpdateRequest(
val active: Boolean?, // Whether the service is active (optional)
val desc: String?, // Service description (optional)
)

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)
)

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)
)

Label copy request payload.

data class LabelCopyRequest(
val target: String, // Target label name
val storage: String, // Storage name for the new label
)

Alias creation request payload.

data class AliasCreateRequest(
val desc: String, // Alias description
val target: String, // Target label name (format: service.label)
)

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)
)

Query creation request payload.

data class QueryCreateRequest(
val desc: String, // Query description
val query: String, // Query definition
val stats: String?, // Statistics configuration (optional)
)

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)
)