Skip to content

tzuehlke/AzGremlinRestApi

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

AzGremlinRestApi

Provide simple REST API as Azure Function for Gremlin Cosmos DB in a Remote-Container (VSCode extension) gremlin-overview

Configuration

Azure Function

  1. modify Dockerfile lines:
# config for function
ENV GRAPHDBHOSTNAME=<COSMOSDBACCOUNT>.gremlin.cosmos.azure.com
ENV GRAPHDBKEY=<KEY>
ENV GRAPHDBNAME=<COSMOSDB>
ENV GRAPHDBCOLL=<GRAPHCOLLECTION>
  1. Rebuild container

Tinkerpop Console

modify remote-secure.yaml lines:

hosts: [<COSMOSDBACCOUNT>.gremlin.cosmos.azure.com]
port: 443
username: /dbs/<COSMOSDB>/colls/<GRAPHCOLLECTION>
password: <KEY>

Using

Calling Azure Function

calling as POST request with body:

{
    "query": "g.V().limit(3)"
}

Using Tinkerpop Console

  1. Navigate to: /workspaces/tinkerpop-cmd
  2. start console: ./gremlin.sh
  3. connect to Azure DB: :remote connect tinkerpop.server /workspaces/AzGremlinRestApi/remote-secure.yaml
  4. send query: :> g.V().limit(3)
  5. exit console: :exit

About

Provide simple REST API as Azure Function for Gremlin Cosmos DB in a Remote-Container (VSCode extension)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published