Gremlin Resources - List Gremlin Graphs
Lists the Gremlin graph under an existing Azure Cosmos DB database account.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs?api-version=2024-11-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[a-z0-9]+(-[a-z0-9]+)* |
Cosmos DB database account name. |
database
|
path | True |
string |
Cosmos DB database name. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The Gremlin graph properties were retrieved successfully. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Impersonate your user account |
Examples
CosmosDBGremlinGraphList
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/gremlinDatabases/databaseName/graphs?api-version=2024-11-15
Sample response
{
"value": [
{
"id": "testgrf",
"name": "testgrf",
"type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/graphs",
"properties": {
"resource": {
"id": "testgrf",
"indexingPolicy": {
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*",
"indexes": [
{
"kind": "Range",
"dataType": "String",
"precision": -1
},
{
"kind": "Range",
"dataType": "Number",
"precision": -1
}
]
}
],
"excludedPaths": []
},
"partitionKey": {
"paths": [
"/AccountNumber"
],
"kind": "Hash"
},
"defaultTtl": 100,
"uniqueKeyPolicy": {
"uniqueKeys": [
{
"paths": [
"/testPath"
]
}
]
},
"conflictResolutionPolicy": {
"mode": "LastWriterWins",
"conflictResolutionPath": "/path"
},
"_rid": "PD5DALigDgw=",
"_ts": 1459200611,
"_etag": "\"00005900-0000-0000-0000-56f9a2630000\""
}
}
}
]
}
Definitions
Name | Description |
---|---|
Autoscale |
|
Composite |
|
Composite |
Sort order for composite paths. |
Conflict |
Indicates the conflict resolution mode. |
Conflict |
The conflict resolution policy for the container. |
Container |
The configuration of the partition key to be used for partitioning data into multiple partitions |
Create |
Enum to indicate the mode of account creation. |
Data |
The datatype for which the indexing behavior is applied to. |
Excluded |
|
Gremlin |
List of graphs and their properties. |
Gremlin |
The List operation response, that contains the graphs and their properties. |
Included |
The paths that are included in indexing |
Indexes |
The indexes for the path. |
Indexing |
Indicates the indexing mode. |
Indexing |
Cosmos DB indexing policy |
Index |
Indicates the type of index. |
Options | |
Partition |
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create |
Resource | |
Resource |
Parameters to indicate the information about the restore. |
Spatial |
|
Spatial |
Indicates the spatial type of index. |
Unique |
The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. |
Unique |
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. |
Vector |
|
Vector |
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported. |
AutoscaleSettings
Name | Type | Description |
---|---|---|
maxThroughput |
integer |
Represents maximum throughput, the resource can scale up to. |
CompositePath
Name | Type | Description |
---|---|---|
order |
Sort order for composite paths. |
|
path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
CompositePathSortOrder
Sort order for composite paths.
Value | Description |
---|---|
ascending | |
descending |
ConflictResolutionMode
Indicates the conflict resolution mode.
Value | Description |
---|---|
LastWriterWins | |
Custom |
ConflictResolutionPolicy
The conflict resolution policy for the container.
Name | Type | Default value | Description |
---|---|---|---|
conflictResolutionPath |
string |
The conflict resolution path in the case of LastWriterWins mode. |
|
conflictResolutionProcedure |
string |
The procedure to resolve conflicts in the case of custom mode. |
|
mode | LastWriterWins |
Indicates the conflict resolution mode. |
ContainerPartitionKey
The configuration of the partition key to be used for partitioning data into multiple partitions
Name | Type | Default value | Description |
---|---|---|---|
kind | Hash |
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create |
|
paths |
string[] |
List of paths using which data within the container can be partitioned |
|
systemKey |
boolean |
Indicates if the container is using a system generated partition key |
|
version |
integer (int32) minimum: 1maximum: 2 |
Indicates the version of the partition key definition |
CreateMode
Enum to indicate the mode of account creation.
Value | Description |
---|---|
Default | |
Restore |
DataType
The datatype for which the indexing behavior is applied to.
Value | Description |
---|---|
String | |
Number | |
Point | |
Polygon | |
LineString | |
MultiPolygon |
ExcludedPath
Name | Type | Description |
---|---|---|
path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
GremlinGraphGetResults
List of graphs and their properties.
Name | Type | Description |
---|---|---|
id |
string |
The unique resource identifier of the ARM resource. |
location |
string |
The location of the resource group to which the resource belongs. |
name |
string |
The name of the ARM resource. |
properties.options | ||
properties.resource | ||
tags |
object |
Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". |
type |
string |
The type of Azure resource. |
GremlinGraphListResult
The List operation response, that contains the graphs and their properties.
Name | Type | Description |
---|---|---|
value |
List of graphs and their properties. |
IncludedPath
The paths that are included in indexing
Name | Type | Description |
---|---|---|
indexes |
Indexes[] |
List of indexes for this path |
path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
Indexes
The indexes for the path.
Name | Type | Default value | Description |
---|---|---|---|
dataType | String |
The datatype for which the indexing behavior is applied to. |
|
kind | Hash |
Indicates the type of index. |
|
precision |
integer |
The precision of the index. -1 is maximum precision. |
IndexingMode
Indicates the indexing mode.
Value | Description |
---|---|
consistent | |
lazy | |
none |
IndexingPolicy
Cosmos DB indexing policy
Name | Type | Default value | Description |
---|---|---|---|
automatic |
boolean |
Indicates if the indexing policy is automatic |
|
compositeIndexes |
List of composite path list |
||
excludedPaths |
List of paths to exclude from indexing |
||
includedPaths |
List of paths to include in the indexing |
||
indexingMode | consistent |
Indicates the indexing mode. |
|
spatialIndexes |
List of spatial specifics |
||
vectorIndexes |
List of paths to include in the vector indexing |
IndexKind
Indicates the type of index.
Value | Description |
---|---|
Hash | |
Range | |
Spatial |
Options
Name | Type | Description |
---|---|---|
autoscaleSettings |
Specifies the Autoscale settings. |
|
throughput |
integer |
Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. |
PartitionKind
Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create
Value | Description |
---|---|
Hash | |
Range | |
MultiHash |
Resource
Name | Type | Default value | Description |
---|---|---|---|
_etag |
string |
A system generated property representing the resource etag required for optimistic concurrency control. |
|
_rid |
string |
A system generated property. A unique identifier. |
|
_ts |
number |
A system generated property that denotes the last updated timestamp of the resource. |
|
analyticalStorageTtl |
integer (int64) |
Analytical TTL. |
|
conflictResolutionPolicy |
The conflict resolution policy for the graph. |
||
createMode | Default |
Enum to indicate the mode of resource creation. |
|
defaultTtl |
integer |
Default time to live |
|
id |
string |
Name of the Cosmos DB Gremlin graph |
|
indexingPolicy |
The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph |
||
partitionKey |
The configuration of the partition key to be used for partitioning data into multiple partitions |
||
restoreParameters |
Parameters to indicate the information about the restore |
||
uniqueKeyPolicy |
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. |
ResourceRestoreParameters
Parameters to indicate the information about the restore.
Name | Type | Description |
---|---|---|
restoreSource |
string |
The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} |
restoreTimestampInUtc |
string (date-time) |
Time to which the account has to be restored (ISO-8601 format). |
restoreWithTtlDisabled |
boolean |
Specifies whether the restored account will have Time-To-Live disabled upon the successful restore. |
SpatialSpec
Name | Type | Description |
---|---|---|
path |
string |
The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) |
types |
List of path's spatial type |
SpatialType
Indicates the spatial type of index.
Value | Description |
---|---|
Point | |
LineString | |
Polygon | |
MultiPolygon |
UniqueKey
The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.
Name | Type | Description |
---|---|---|
paths |
string[] |
List of paths must be unique for each document in the Azure Cosmos DB service |
UniqueKeyPolicy
The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.
Name | Type | Description |
---|---|---|
uniqueKeys |
List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. |
VectorIndex
Name | Type | Description |
---|---|---|
path |
string |
The path to the vector field in the document. |
type |
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported. |
VectorIndexType
The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported.
Value | Description |
---|---|
flat | |
diskANN | |
quantizedFlat |