Skip to content

Aerospike Graph call steps

Use this page as a reference for Graph calls. For HTTP mappings, see HTTP endpoints.

For all commands, replace placeholder values with the correct values for your configuration.

Metadata

Get graph summary

Returns graph summary with counts for vertices, edges, and supernodes.

g.call("aerospike.graph.admin.metadata.summary").next()
Example response
==>Total vertex count=450036
==>Vertex count by label={Account=100008, Consumer=50004, Subscription=100008, Communication=100008, Contact=100008}
==>Vertex properties by label={Account=[Account Number], Consumer=[Consumer Name], Subscription=[Subscription Name], Communication=[Preference Code], Contact=[Contact Value, Contact Type]}
==>Total edge count=500040
==>Edge count by label={HAS_CONTACT=200016, OWNS_ACCOUNT=100008, SUBSCRIBED_TO=100008, HAS_SUBSCRIPTION=100008}
==>Edge properties by label={HAS_CONTACT=[], OWNS_ACCOUNT=[], SUBSCRIBED_TO=[], HAS_SUBSCRIPTION=[]}
==>Total supernode count=5
==>Supernode count by label={Contact=2, Communication=3}

Get usage statistics

Returns a map with raw usage samples and total-vcpu-hours. Supports an optional since date (yyyy-mm-dd) parameter.

g.call("aerospike.graph.admin.metadata.usage").with("since","SINCE_DATE").next()
Example response
'raw': [ { 'epoch-ms-final': 1702327851857,
'epoch-ms-start': 1702326901857,
'memory-gb': 32,
'uuid': '9c0ba414-c9f2-492f-adb9-9792bb6dfed1',
'vcpus': 16},
{ 'epoch-ms-final': 1702327148084,
'epoch-ms-start': 1702327148084,
'memory-gb': 9,
'uuid': 'c924f45e-886d-4c04-8039-292d56ea037c',
'vcpus': 16}],
'total-vcpu-hours': 8.4819888381532217,
'estimated-annual-total-vcpus': 80000}

Get configuration

Returns a snapshot of server and graph configuration.

g.call("aerospike.graph.admin.metadata.config").next()
Example response
{'Graph Properties': {'aerospike.client.host': 'aerospike-cluster',
'aerospike.client.namespace': 'retail-graph',
'aerospike.client.port': '3000',
'aerospike.graph.http.port': '9090',
'aerospike.graph.index.vertex.label.enabled': 'true',
'gremlin.graph': 'com.aerospike.firefly.structure.FireflyGraph'},
'Gremlin Server Configuration': 'host: 0.0.0.0\n'
'port: 8182\n'
'evaluationTimeout: 10000\n'
'channelizer: '
'org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer\n'
'...'
}

Get version

Returns Aerospike Database, Aerospike Graph, and Gremlin versions.

g.call("aerospike.graph.admin.metadata.version").next()
Example response
{'Aerospike Graph Service version': '2.6.0',
'Aerospike version': 'aerospike-cluster:8.0.0.7',
'Gremlin version': '3.7.3'}

Index management

Create a secondary index

Starts building a secondary index on a vertex property or label.

g.call("aerospike.graph.admin.index.create")
.with("element_type","ELEMENT_TYPE")
.with("property_key","PROPERTY_KEY")
.next()
Example response
Vertex index creation of property key 'PROPERTY_KEY' in progress.

Get index status

Returns progress and resource usage for an index build.

g.call("aerospike.graph.admin.index.status")
.with("element_type","ELEMENT_TYPE")
.with("property_key","PROPERTY_KEY")
.next()
Example response
==>percent_complete=100
==>total_used_bytes=33554432
==>total_entries=194
==>load_time=7

Get index cardinality

Returns distinct value counts for all existing secondary indexes.

g.call("aerospike.graph.admin.index.cardinality").next()
Example response
{'~vertex.label': 2}

List indexes

Lists indexed properties currently available to queries.

g.call("aerospike.graph.admin.index.list").next()
Example response
['vertex.~label']

Drop index

Drops a secondary index.

g.call("aerospike.graph.admin.index.drop")
.with("element_type","ELEMENT_TYPE")
.with("property_key","PROPERTY_KEY")
.next()
Example response
Vertex index of property key 'PROPERTY_KEY' dropped.

Bulk load

Bulk loader calls are Gremlin only. They are not exposed as HTTP endpoints. See HTTP endpoints.

Start bulk load

Starts a bulk import job from a data source using aerospike.graphloader.admin.bulk-load.load.

Use these .with() arguments to point to your dataset files:

  • aerospike.graphloader.vertices: Directory containing vertex CSV files.
  • aerospike.graphloader.edges: Directory containing edge CSV files.

Use thse .with() arguments for S3 (AWS) and GCS (GCP) storage backends:

  • aerospike.graphloader.remote-user: S3: AWS_ACCESS_KEY_ID or GCS: private_key_id.
  • aerospike.graphloader.remote-passkey: S3: AWS_SECRET_ACCESS_KEY or GCS: private_key.
  • aerospike.graphloader.gcs-email: GCS service account client_email.

Get bulk load errors

Returns load-time errors by type.

Use the following ERROR_TYPE values for the .with argument:

  • duplicate-vertex-ids: vertices that have the same ID in the input dataset.
  • bad-edges: edges (from or to) that reference missing vertex IDs.
  • bad-entry: vertices or edges with incorrectly typed data.
g.call("aerospike.graphloader.admin.bulk-load.errors")
.with("type","ERROR_TYPE")
.next()
Example response
==>count=1
==>bad-vertex-id=tommy

Get bulk load error count

Returns aggregate error counts for the most recent load.

g.call("aerospike.graphloader.admin.bulk-load.error-count").next()
Example response
Warning: Errors were encountered during bulk loading.
duplicate-vertex-id-count: 1
bad-edge-count: 3
bad-entry-count: 2
Use the g.call("aerospike.graphloader.admin.bulk-load.errors") command for details.

Security

Issue RBAC JWT

Issues a JSON Web Token (JWT) for access with the specified role.

g.call("aerospike.graph.admin.rbac-jwt.issue-token")
.with("username","USERNAME")
.with("role","ROLE")
.next()

Query control

Abort background queries

Terminates all Graph-related background database operations and returns counts affected.

g.call("aerospike.graph.admin.query.abort").next()
Example response
==>found=0
==>aborted=0
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?