Amazon Neptune Gremlin API

Apache TinkerPop Gremlin graph traversal language API for querying property graphs in Neptune. It supports both WebSocket and HTTP REST endpoints for submitting Gremlin traversals. This spec covers the HTTP REST endpoint. Neptune supports Gremlin as defined in Apache TinkerPop and uses HTTP/1.1 with

Operations 5

POST /gremlin Amazon Neptune Execute a Gremlin Traversal via HTTP POST #
GET /gremlin Amazon Neptune Execute a Gremlin Traversal via HTTP GET #
GET /gremlin/status Amazon Neptune Get the Status of All Running Gremlin Queries #
GET /gremlin/status/{queryId} Amazon Neptune Get the Status of a Specific Gremlin Query #
DELETE /gremlin/status/{queryId} Amazon Neptune Cancel a Running Gremlin Query #

Documentation

📖
APIReference
https://docs.aws.amazon.com/neptune-analytics/latest/apiref/Welcome.html
📖
APIReference
https://docs.aws.amazon.com/neptune/latest/data-api/Welcome.html
📖
APIReference
https://docs.aws.amazon.com/neptune/latest/userguide/api.html
📖
APIReference
https://docs.aws.amazon.com/neptune/latest/userguide/load-api-reference.html
📖
APIReference
https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-reference.html
📖
APIReference
https://docs.aws.amazon.com/neptune/latest/userguide/streams-using-api-call.html
📖
Documentation
https://docs.aws.amazon.com/neptune-analytics/latest/userguide/what-is-neptune-analytics.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-opencypher.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/data-api.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/intro.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning.html
📖
Documentation
https://docs.aws.amazon.com/neptune/latest/userguide/streams.html
📖
GettingStarted
https://docs.aws.amazon.com/neptune-analytics/latest/userguide/gettingStarted-accessing.html
📖
GettingStarted
https://docs.aws.amazon.com/neptune/latest/userguide/get-started.html
📖
GettingStarted
https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-overview.html

Specifications

Other Resources

🔗
Best Practices
https://docs.aws.amazon.com/neptune/latest/userguide/best-practices-gremlin.html
🔗
Best Practices
https://docs.aws.amazon.com/neptune/latest/userguide/best-practices-opencypher.html
🔗
Best Practices
https://docs.aws.amazon.com/neptune/latest/userguide/best-practices-sparql.html
🔗
CLI Reference
https://docs.aws.amazon.com/cli/latest/reference/neptunedata/
🔗
Data API Reference
https://docs.aws.amazon.com/neptune/latest/userguide/data-api-dp-loader.html
🔗
Data API Reference
https://docs.aws.amazon.com/neptune/latest/userguide/data-api-dp-streams.html
🔗
Data Formats
https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format.html
🔗
Go SDK
https://docs.aws.amazon.com/sdk-for-go/api/service/neptunedata/
🔗
Gremlin Reference
https://tinkerpop.apache.org/docs/current/reference/
🔗
JavaScript SDK
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptunedata/
🔗
Loader Command
https://docs.aws.amazon.com/neptune/latest/userguide/load-api-reference-load.html
🔗
Model Training
https://docs.aws.amazon.com/neptune/latest/userguide/data-api-dp-ml-training.html
🔗
Pricing
https://aws.amazon.com/neptune/pricing/
🔗
REST Endpoint
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-rest.html
🔗
REST Endpoint
https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-sparql-http-rest.html
🔗
Reference
https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-api-reference.html
🔗
Response Format
https://docs.aws.amazon.com/neptune/latest/userguide/streams-using-api-reponse.html
🔗
SDKs
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptune-graph.html
🔗
SDKs
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptune.html
🔗
SDKs
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptunedata.html
🔗
SPARQL Reference
https://www.w3.org/TR/sparql11-query/
🔗
openCypher Reference
https://opencypher.org/

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-neptune-gremlin"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-neptune-gremlin-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Neptune Neptune Gremlin API
  description: >-
    Apache TinkerPop Gremlin graph traversal language API for querying
    property graphs in Neptune. It supports both WebSocket and HTTP REST
    endpoints for submitting Gremlin traversals. This spec covers the HTTP
    REST endpoint. Neptune supports Gremlin as defined in Apache TinkerPop
    and uses HTTP/1.1 with HTTPS only.
  version: '2024-01-01'
  contact:
    name: Amazon Web Services
    url: https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin.html
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://{cluster-endpoint}:8182
  description: Neptune Gremlin HTTP REST endpoint
  variables:
    cluster-endpoint:
      default: your-cluster-endpoint.region.neptune.amazonaws.com
      description: The cluster endpoint DNS name for your Neptune DB cluster
security:
- aws_sigv4: []
tags:
- name: Query
  description: Submit Gremlin graph traversal queries
- name: Status
  description: Query status and cancellation operations
paths:
  /gremlin:
    post:
      operationId: executeGremlinTraversal
      summary: Amazon Neptune Execute a Gremlin Traversal via HTTP POST
      description: >-
        Submits a Gremlin traversal query to the Neptune HTTP REST endpoint.
        The query is provided as a JSON body with a gremlin property containing
        the traversal string. All results are returned in a single JSON
        response by default. For large result sets, chunked responses can be
        enabled to avoid OutOfMemoryError.
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GremlinQueryRequest'
            examples:
              vertexCount:
                summary: Count all vertices
                value:
                  gremlin: g.V().count()
              limitedVertices:
                summary: Get first vertex
                value:
                  gremlin: g.V().limit(1)
              addVertex:
                summary: Add a vertex
                value:
                  gremlin: g.addV('person').property('name','John')
      responses:
        '200':
          description: Gremlin traversal executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GremlinQueryResponse'
              examples:
                executeGremlinTraversal200Example:
                  summary: Default executeGremlinTraversal 200 response
                  x-microcks-default: true
                  value:
                    requestId: neptune-cluster-abc123
                    status:
                      message: example-value
                      code: 1
                      attributes: {}
                    result:
                      data: example-value
                      meta: {}
        '400':
          description: Bad request - malformed Gremlin traversal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GremlinErrorResponse'
              examples:
                executeGremlinTraversal400Example:
                  summary: Default executeGremlinTraversal 400 response
                  x-microcks-default: true
                  value:
                    requestId: neptune-cluster-abc123
                    code: example-value
                    detailedMessage: example-value
        '408':
          description: Query timed out before completing.
        '500':
          description: Internal server error during query execution.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      operationId: executeGremlinTraversalGet
      summary: Amazon Neptune Execute a Gremlin Traversal via HTTP GET
      description: >-
        Submits a Gremlin traversal query via a URL query parameter. This
        is an alternative to the POST method for simple queries.
      tags:
      - Query
      parameters:
      - name: gremlin
        in: query
        required: true
        description: The Gremlin traversal query string (URL-encoded).
        schema:
          type: string
        example: g.V().count()
      responses:
        '200':
          description: Gremlin traversal executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GremlinQueryResponse'
              examples:
                executeGremlinTraversalGet200Example:
                  summary: Default executeGremlinTraversalGet 200 response
                  x-microcks-default: true
                  value:
                    requestId: neptune-cluster-abc123
                    status:
                      message: example-value
                      code: 1
                      attributes: {}
                    result:
                      data: example-value
                      meta: {}
        '400':
          description: Bad request - malformed Gremlin traversal.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gremlin/status:
    get:
      operationId: getGremlinQueryStatus
      summary: Amazon Neptune Get the Status of All Running Gremlin Queries
      description: >-
        Returns the status of all running and waiting Gremlin queries,
        including query IDs, query strings, and execution statistics.
      tags:
      - Status
      responses:
        '200':
          description: Query status retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GremlinQueryStatusList'
              examples:
                getGremlinQueryStatus200Example:
                  summary: Default getGremlinQueryStatus 200 response
                  x-microcks-default: true
                  value:
                    acceptedQueryCount: 1
                    runningQueryCount: 1
                    queries:
                    - {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /gremlin/status/{queryId}:
    get:
      operationId: getGremlinQueryStatusById
      summary: Amazon Neptune Get the Status of a Specific Gremlin Query
      description: >-
        Returns the status of a specific Gremlin query identified by its
        query ID, including the query string and execution statistics.
      tags:
      - Status
      parameters:
      - name: queryId
        in: path
        required: true
        description: The unique identifier of the Gremlin query.
        schema:
          type: string
      responses:
        '200':
          description: Query status retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GremlinQueryStatusDetail'
              examples:
                getGremlinQueryStatusById200Example:
                  summary: Default getGremlinQueryStatusById 200 response
                  x-microcks-default: true
                  value:
                    queryId: neptune-cluster-abc123
                    queryString: example-value
                    queryEvalStats:
                      waited: 1
                      elapsed: 1
                      cancelled: true
                      subqueries: {}
        '404':
          description: Query with the specified ID was not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: cancelGremlinQuery
      summary: Amazon Neptune Cancel a Running Gremlin Query
      description: >-
        Cancels a running Gremlin query by its query ID. The query must
        be currently running or waiting in the queue.
      tags:
      - Status
      parameters:
      - name: queryId
        in: path
        required: true
        description: The unique identifier of the Gremlin query to cancel.
        schema:
          type: string
      responses:
        '200':
          description: Query cancelled successfully.
        '404':
          description: Query with the specified ID was not found.
        '500':
          description: Failed to cancel the query.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  securitySchemes:
    aws_sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication via IAM
  schemas:
    GremlinQueryRequest:
      type: object
      required:
      - gremlin
      properties:
        gremlin:
          type: string
          description: >-
            The Gremlin traversal query string. Must be a valid Gremlin
            traversal starting with g. The bindings property is not
            supported by Neptune.
          examples:
          - g.V().count()
          - g.V().has('name','John').out('knows')
    GremlinQueryResponse:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: The unique request identifier.
        status:
          type: object
          properties:
            message:
              type: string
            code:
              type: integer
              description: The response status code (200 for success).
            attributes:
              type: object
              description: Additional response attributes.
        result:
          type: object
          properties:
            data:
              description: >-
                The query result data. The shape depends on the traversal's
                terminal step (e.g., count, valueMap, path).
            meta:
              type: object
    GremlinErrorResponse:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
        code:
          type: string
          description: The error code.
        detailedMessage:
          type: string
          description: A detailed description of the error.
    GremlinQueryStatusList:
      type: object
      properties:
        acceptedQueryCount:
          type: integer
          description: The total number of accepted queries.
        runningQueryCount:
          type: integer
          description: The number of currently running queries.
        queries:
          type: array
          description: The list of running and waiting queries.
          items:
            $ref: '#/components/schemas/GremlinQueryStatusDetail'
    GremlinQueryStatusDetail:
      type: object
      properties:
        queryId:
          type: string
          description: The unique query identifier.
        queryString:
          type: string
          description: The Gremlin traversal query string.
        queryEvalStats:
          type: object
          description: Query execution statistics.
          properties:
            waited:
              type: integer
              description: The time the query waited in the queue (milliseconds).
            elapsed:
              type: integer
              description: The elapsed execution time (milliseconds).
            cancelled:
              type: boolean
              description: Whether the query was cancelled.
            subqueries:
              type: object
              description: Statistics for subqueries, if any.