Gremlin API
  • 06 Apr 2022
  • 5 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Gremlin API

  • Dark
    Light
  • PDF

Article Summary

Azure Cosmos DB Gremlin

Cerebrata makes managing the data stored in your Cosmos DB Gremlin API accounts super easy. From managing databases, containers to entities, Cerebrata provides the most extensive set of features.
Loaded with features like viewing documents in multiple formats, built-in query manager, stored procedures, functions and triggers and more, you don't have to look beyond Cerebrata.

View Properties

User can view the following properties of Cosmos DB Gremlin.

  • Cosmos DB Gremlin account name
  • Account API
  • Resource ID
  • Resource Group name
  • Resource Group ID
  • Subscription name
  • Subscription ID
  • Location
  • URI
  • Provisioning State
  • Offer Type
  • Default Consistency
  • Multi Region Write Enabled

The below illustration shows viewing the properties of Cosmos DB Gremlin API account.
Gremlin API Properties

Note

Properties of Cosmos Gremlin DB can be accessed in Cerebrata only when you associate Cosmos DB Gremlin via Subscription Connection.

User can also open the appropriate Azure resource in the Azure portal without traversing between the browser and the application, using the Open in portal option available at the top right corner.

The below illustration shows viewing the Cosmos DB Gremlin API account in Azure Portal.
Gremlin API Open In Portal

Manage Tags

Tags are used for easy identification and grouping of the resources. Cerebrata allows us to create, delete and update the tags at ease.
The below illustration shows managing the tags of Cosmos DB Gremlin API.
CosmosDB Gremlin Manage Tags

Tags associated with the Cosmos DB Gremlin API can be accessed in Cerebrata only when you associate Cosmos DB Gremlin via Subscription Connection.

Manage Locks

Management locks can be created so that the users access the resources cannot update or delete the resources without your concern. Cerebrata helps us in managing the management locks in a comfortable manner.
The below illustration shows managing the locks of Cosmos DB Gremlin API.
CosmosDB Gremlin Manage Locks

Locks on a Cosmos DB Gremlin API can be accessed in Cerebrata only when you associate the Cosmos DB Gremlin API via Subscription Connection.

Manage Access Keys

Access Keys are used to connect to the required Cosmos DB account without the use of Azure AD. Cerebrata allows us to view the connection string, access keys and regenerate them based on the requirements.

The below illustration shows managing the Access Keys of Cosmos DB Gremlin API.
CosmosDB Access Keys(1)

Shared Access Key of a Cosmos DB Gremlin API can be accessed in Cerebrata only when you associate the Cosmos DB Gremlin API via Subscription Connection.

Edit Azure Cosmos DB Account Connection

For Cosmos DB accounts associated via the connection string, the user can edit the Cosmos DB account key. This feature helps us to update the account key when the account key is regenrated. User can also edit any friendly name given by clicking on the Edit button (or Crtl+E).

The below illustration shows editing the Cosmos DB Account Connection.
CosmosDB Edit Gremlin Account

Database

Create

Databases can be created by providing the database name and Throughput. The database can be created either with fixed, auto scale or no throughput.
The below illustration shows creation of a database in CosmosDB Gremlin API Account.
CosmosDB Add Gremlin Database

Update

The throughput of the created database can be modified.
The below illustration shows editing the throughput of a database in CosmosDB Gremlin API Account.
CosmosDB Update Gremlin Database

Delete

Databases can also be deleted through Cerebrata itself.
The below illustration shows deleting a database in CosmosDB Gremlin API Account.
CosmosDB Delete Gremlin Database

Graph

Create

Graphs can be created inside the databases with the following properties.

  • Graph Name
  • Throughput
  • TTL
  • Indexing Policy
  • Unique Key Policy
    The below illustration shows creation of a graph in database.
    CosmosDB Create Gremlin Graph(1)

Update

All the properties like Throughput, Indexing Policy, Unique Key Policy and TTL can be updated.
The below illustration shows editing a graph in database.
CosmosDB Update Gremlin Graph

Delete

The graph can also be deleted through Cerebrata itself.
The below illustration shows deleting a graph in database.
CosmosDB Delete Gremlin Graph

Stored Procedures

Stored procedures can be created, updated and deleted through Cerebrata itself.
The below illustration shows managing the stored procedures through Cerebrata.
CosmosDB Stored procedure Gremlin Graph

Functions

Functions can be created, updated and deleted through Cerebrata itself.
The below illustration shows managing the functions through Cerebrata.
CosmosDB Functions Gremlin Graph

Triggers

Triggers can be created, updated and deleted through Cerebrata itself.
The below illustration shows managing the triggers through Cerebrata.
CosmosDB Triggers Gremlin Graph

View Vertices and Edges

Cerebrata allows us to visualize the vertices and edges in graph both in the Graphical view and JSON view. Viewing the vertices and edges as graphical view allows us to easily read the vertex connections. It is also possible to query the required vertices and edges in a graph based on the provided query.

The below illustration shows viewing the vertices and edges as graphical view and Raw JSON.
CosmosDB View Gremlin Graph

Manage Queries

Cerebrata allows us to save the queries that can be executed in a graph. It is also possible to edit and delete them whenever required. We can mark a query a default, so that whenever a graph is opened default query will be opened in the query window. Queries can also be marked as shared so that they are available across all the graphs.
The below illustration shows managing the saved queries.
CosmosDB Manage Queries Gremlin API

User can save a query and use it for quick access. Saved queries can also be edited or deleted later.

Create Vertex

Cerebrata allows us to create or insert vertex into a table. We can specify the properties, Partition Key and Vertex Label when we create a new Vertex.
The below illustration shows creating a vertex in a Graph.
CosmosDB Create Gremlin Vertices

Edit Vertex

Cerebrata allows us to edit the properties of the vertex. We can add new properties, delete existing properties or update the existing property of the vertex.
The below illustration shows editing a vertex in a Graph.
CosmosDB Edit Gremlin Vertices

Delete Vertex

Cerebrata allows us to delete the vertices from a graph. Deletion of a vertex also removes the edges coming in and going out of the vertex.
The below illustration shows deleting a vertex in a Graph.
CosmosDB Delete Gremlin Vertices and Edges

Create Edge

Cerebrata allows us to create or insert edge into a table. We can specify the properties, Partition Key and Vertex Label when we create a new edge.
The below illustration shows creating a edge in a Graph.
CosmosDB Create Gremlin Edge

Edit Edge

Cerebrata allows us to edit the properties of the edge. We can add new properties, delete existing properties or update the existing property of the edge.
The below illustration shows editing a edge in a Graph.
CosmosDB Edit Gremlin Edge

Delete Edge

Cerebrata allows us to delete the edges from a graph.
The below illustration shows deleting a edge in a Graph.
CosmosDB Delete Gremlin Edge


Was this article helpful?

What's Next