---
title: "Aerospike Graph call steps"
description: "Reference guide for using Gremlin g.call() to manage Aerospike Graph metadata, indexes, bulk loading, and cache."
---

# Aerospike Graph call steps

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

Use this page as a reference for Graph calls. For HTTP mappings, see [HTTP endpoints](https://aerospike.com/docs/graph/manage/endpoints/).

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

## Metadata

These call steps return information about the graph, its configuration, and resource usage.

### [Get graph summary](https://aerospike.com/docs/graph/manage/summary/)

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

```groovy
g.call("aerospike.graph.admin.metadata.summary").next()
```

Example response

```txt
==>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](https://aerospike.com/docs/graph/observe/usage-stats/)

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

```groovy
g.call("aerospike.graph.admin.metadata.usage").with("since","SINCE_DATE").next()
```

Example response

```txt
'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](https://aerospike.com/docs/graph/observe/info/#configuration-information)

Returns a snapshot of server and graph configuration. See [version and configuration info](https://aerospike.com/docs/graph/observe/info/#configuration-information) for the optional `mode` parameter.

```groovy
g.call("aerospike.graph.admin.metadata.config").next()
```

Example response

```txt
{'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](https://aerospike.com/docs/graph/observe/info/)

Returns Aerospike Database, Aerospike Graph, and Gremlin versions.

```groovy
g.call("aerospike.graph.admin.metadata.version").next()
```

Example response

```txt
{'Aerospike Graph Service version': '2.6.0',

 'Aerospike version': 'aerospike-cluster:8.0.0.7',

 'Gremlin version': '3.7.3'}
```

---

## Configuration management

Use `aerospike.graph.admin.metadata.set-config` to update supported [configuration options](https://aerospike.com/docs/graph/reference/config/) at runtime without restarting AGS. AGS saves these changes in graph metadata, so they persist across restarts and apply to all instances that share the same graph metadata.

### Set runtime configuration

To propagate changes to other running instances automatically, set [`aerospike.graph.config.update.enabled`](https://aerospike.com/docs/graph/reference/config/#aerospikegraphconfigupdateenabled) to `true`. Each instance then checks for updates at the interval defined by [`aerospike.graph.config.update.frequency`](https://aerospike.com/docs/graph/reference/config/#aerospikegraphconfigupdatefrequency) (default: 5000 ms). If `aerospike.graph.config.update.enabled` is `false` (the default), you must restart other instances to apply the changes.

You can update any configuration option that matches the following:

-   `aerospike.client.policy.*`
-   `aerospike.client.batch.read.*`
-   `aerospike.graph.pagination.*`
-   `aerospike.client.batch-threshold.per-node`
-   `aerospike.graph.cache.*`

Pass one or more key-value pairs with `.with()`:

```groovy
g.call("aerospike.graph.admin.metadata.set-config")

   .with("CONFIG_KEY", "CONFIG_VALUE")

   .iterate()
```

The call returns no output on success. If you pass an immutable key, the call throws an `IllegalArgumentException`:

```txt
IllegalArgumentException("Immutable option <key> can't be changed.")
```

**Examples:**

Set a single configuration option:

```groovy
g.call("aerospike.graph.admin.metadata.set-config")

   .with("aerospike.client.policy.write.socketTimeout", "1000")

   .iterate()
```

Set multiple configuration options in one call:

```groovy
g.call("aerospike.graph.admin.metadata.set-config")

   .with("aerospike.client.policy.write.socketTimeout", "1000")

   .with("aerospike.client.policy.write.totalTimeout", "5000")

   .with("aerospike.client.policy.write.sleepBetweenRetry", "1000")

   .with("aerospike.client.policy.maxRetries", "2")

   .iterate()
```

---

## Index management

These call steps create, inspect, and remove secondary indexes.

### [Create a secondary index](https://aerospike.com/docs/graph/develop/query/indexing/#create-an-index-with-the-call-api)

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

```groovy
g.call("aerospike.graph.admin.index.create")

   .with("element_type","ELEMENT_TYPE")

   .with("property_key","PROPERTY_KEY")

   .with("index_type", "INDEX_TYPE")

   .next()
```

Example response

```txt
Vertex index creation of property key 'PROPERTY_KEY' in progress.
```

---

### [Get index status](https://aerospike.com/docs/graph/develop/query/indexing/#index-status)

Returns progress and resource usage for an index build.

```groovy
g.call("aerospike.graph.admin.index.status")

   .with("element_type","ELEMENT_TYPE")

   .with("property_key","PROPERTY_KEY")

   .next()
```

Example response

```txt
==>percent_complete=100

==>total_used_bytes=33554432

==>total_entries=194

==>load_time=7
```

---

### [Get index cardinality](https://aerospike.com/docs/graph/develop/query/indexing/#cardinality)

Returns distinct value counts for all existing secondary indexes.

```groovy
g.call("aerospike.graph.admin.index.cardinality").next()
```

Example response

```txt
{'~vertex.label': 2}
```

---

### [List indexes](https://aerospike.com/docs/graph/develop/query/indexing/#list-indexed-property-keys)

Lists indexed properties currently available to queries.

```groovy
g.call("aerospike.graph.admin.index.list").next()
```

Example response

```txt
['vertex.~label']
```

---

### [Drop index](https://aerospike.com/docs/graph/develop/query/indexing/#drop-a-secondary-index)

Drops a secondary index.

```groovy
g.call("aerospike.graph.admin.index.drop")

   .with("element_type","ELEMENT_TYPE")

   .with("property_key","PROPERTY_KEY")

   .with("index_type", "INDEX_TYPE")

   .next()
```

Example response

```txt
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](https://aerospike.com/docs/graph/manage/endpoints/).

### [Start bulk load](https://aerospike.com/docs/graph/load/standalone/#the-bulk-load-command)

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 these `.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](https://aerospike.com/docs/graph/load/error-handling/#call-api-error-reporting)

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.

```groovy
g.call("aerospike.graphloader.admin.bulk-load.errors")

   .with("type","ERROR_TYPE")

   .next()
```

Example response

```txt
==>count=1

==>bad-vertex-id=tommy
```

---

### [Get bulk load error count](https://aerospike.com/docs/graph/load/error-handling/#call-api-error-reporting)

Returns aggregate error counts for the most recent load.

```groovy
g.call("aerospike.graphloader.admin.bulk-load.error-count").next()
```

Example response

```txt
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

These call steps manage authentication tokens for role-based access control.

### [Issue RBAC JWT](https://aerospike.com/docs/graph/manage/security/rbac-graph/#create-jwts)

Issues a JSON Web Token (JWT) for access with the specified [role](https://aerospike.com/docs/graph/manage/security/rbac-graph/#roles).

```groovy
g.call("aerospike.graph.admin.rbac-jwt.issue-token")

   .with("username","USERNAME")

   .with("role","ROLE")

   .next()
```

---

## Query control

These call steps manage running queries.

### [Abort background queries](https://aerospike.com/docs/graph/observe/query-terminate/)

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

```groovy
g.call("aerospike.graph.admin.query.abort").next()
```

Example response

```txt
==>found=0

==>aborted=0
```

---

## Cache management

### [Get cache status](https://aerospike.com/docs/graph/manage/cache/#get-cache-status)

Returns the current cache mode and usage statistics including weight, entry count, and hit/miss counts.

```groovy
g.call("aerospike.graph.admin.cache.status").next()
```

Example response

```txt
{'mode': 'TRANSACTIONAL',

 'cache_weight': 1000000,

 'estimated_entry_count': 0,

 'weighted_size': 0,

 'estimated_memory_bytes': 0,

 'estimated_memory_formatted': '0 B',

 'hit_count': 0,

 'miss_count': 0}
```

---

### [Set cache mode](https://aerospike.com/docs/graph/manage/cache/#set-cache-mode)

Changes the cache mode at runtime. You can optionally set a custom cache weight.

```groovy
g.call("aerospike.graph.admin.cache.set-mode")

   .with("mode","CACHE_MODE")

   .with("cache_weight","CACHE_WEIGHT")

   .next()
```

Example response

```txt
{'status': 'success',

 'previous_mode': 'TRANSACTIONAL',

 'current_mode': 'GLOBAL',

 'cache_weight': 20000000}
```

---

### [Reset cache](https://aerospike.com/docs/graph/manage/cache/#reset-cache)

Clears and reinitializes the current caches.

```groovy
g.call("aerospike.graph.admin.cache.reset").next()
```

Example response

```txt
{'status': 'success',

 'mode': 'GLOBAL',

 'previous_entry_count': 1523,

 'previous_weighted_size': 45690,

 'current_entry_count': 0,

 'current_weighted_size': 0}
```