Connectors Reference

Azure Cosmos DB

Azure Cosmos DB is a globally distributed multi-model database service designed to enable you to elastically and independently scale throughput and storage across any number of geographical regions with a comprehensive SLA.

 

Status: Production

Tier: Premium

Version: 1.0.0

 

Actions:

Name

Summary

QueryDocumentsV2 (string databaseId, string collectionId, DocumentsQuery query, [advanced][Optional]string partitionKey, [advanced][Optional]string continuationToken)

Query documents V2

QueryDocumentsV3 (string databaseId, string collectionId, string queryText, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]boolean enableCrossPartition, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

Query documents V3

QueryDocumentsV4 (string databaseId, string containerId, [Optional]string queryText, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

Query documents V4

GetDocumentsV2 (string databaseId, string collectionId, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

Get all documents V2

TestConnection ()

Test connection

GetDatabases ()

Get all databases

GetDatabase (string databaseId)

Get a database

GetCollections (string databaseId)

Get all collections

GetCollection (string databaseId, string collectionId)

Get a collection

GetDocuments ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, [advanced][Optional]string x-ms-version)

Get all documents

CreateDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [Optional]boolean x-ms-documentdb-is-upsert, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, postDocumentsRequest body, [advanced][Optional]string x-ms-version)

Create or update document

CreateDocumentV2 ([advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [Optional]boolean x-ms-documentdb-is-upsert, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, postDocumentsRequest body, [advanced][Optional]string x-ms-version)

Create or update document (V2)

QueryDocuments ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]boolean x-ms-documentdb-query-enablecrosspartition, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, queryRequest body)

Query documents

GetDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, string documentId, [advanced][Optional]string x-ms-version)

Get a document

ReplaceDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, string documentId, putDocumentRequest body, [advanced][Optional]string x-ms-version)

Replace a document

DeleteDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, string documentId, [advanced][Optional]string x-ms-version)

Delete a document

GetStoredProcedures (string databaseId, string collectionId, [advanced][Optional]string x-ms-version)

Get stored procedures

CreateStoredProcedure (string databaseId, string collectionId, CreateStoredProcedureParameterBody body, [advanced][Optional]string x-ms-version)

Create stored procedure

ReplaceStoredProcedure (string databaseId, string collectionId, string sprocId, ReplaceStoredProcedureParameterBody body, [advanced][Optional]string x-ms-version)

Replace stored procedure

ExecuteStoredProcedure (string databaseId, string collectionId, [Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, string sprocId, [Optional]string parameters, [advanced][Optional]string x-ms-version)

Execute stored procedure

DeleteStoredProcedure (string databaseId, string collectionId, string sprocId, [advanced][Optional]string x-ms-version)

Delete stored procedure

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

CreateStoredProcedureParameterBody

 

createStoredProcedureResponse

 

DocumentsCollection

 

DocumentsQuery

 

getAccountResponse

 

GetCollectionResponseItem

 

getCollectionsResponse

 

getDatabaseResponse

 

getDatabasesResponse

 

getDocumentResponse

 

getDocumentsResponse

 

getStoredProceduresResponse

 

ObjectWithoutType

 

postDocumentsRequest

 

postDocumentsResponse

 

putDocumentRequest

 

putDocumentResponse

 

QueryDocumentsResponse

 

queryRequest

 

queryResponse

 

ReplaceStoredProcedureParameterBody

 

 

Actions:

QueryDocumentsV2

Summary: Query documents V2

Description: Query documents V2.

 

Syntax:

AzureCosmosDB.QueryDocumentsV2 (string databaseId, string collectionId, DocumentsQuery query, [advanced][Optional]string partitionKey, [advanced][Optional]string continuationToken)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

query

DocumentsQuery

 

Documents query parameters

True

partitionKey

string

(Partition key value)

Partition key value.

False

continuationToken

string

(Continuation Token)

A token to fetch additional results from the operation.

False

 

Returns:

          Type:QueryDocumentsResponse

          Description: Array of documents that match the requested query and the related metadata.

 

QueryDocumentsV3

Summary: Query documents V3

Description: Query documents V3.

 

Syntax:

AzureCosmosDB.QueryDocumentsV3 (string databaseId, string collectionId, string queryText, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]boolean enableCrossPartition, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

queryText

string

(SQL Syntax Query)

SQL query.

True

partitionKey

string

(Partition key value)

If empty, all partitions will be used to search for documents.

False

maxItemCount

integer(int32)

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

continuationToken

string

(Continuation Token)

A token to fetch additional results.

False

enableCrossPartition

boolean

(Enable Cross Partition)

Indicates whether user are enabled to send more than one request to execute the query.

False

consistencyLevel

string

(Consistency Level)Values: [Strong, BoundedStaleness, Session, Eventual, ConsistentPrefix]

Consistency level required for the feed (query/read feed) operation.

False

sessionToken

string

(Session Token)

The session token for use with session consistency.

False

 

Returns:

          Type:DocumentsCollection

          Description: Array of documents that match the requested query and the related metadata.

 

QueryDocumentsV4

Summary: Query documents V4

Description: Query documents V4.

 

Syntax:

AzureCosmosDB.QueryDocumentsV4 (string databaseId, string containerId, [Optional]string queryText, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

containerId

string

(Container ID)

The name of the container.

True

GetCollections

queryText

string

(SQL Syntax Query)

SQL query. If empty, will return all documents.

False

partitionKey

string

(Partition key value)

If empty, all partitions will be used to search for documents.

False

maxItemCount

integer(int32)

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

continuationToken

string

(Continuation Token)

A token to fetch additional results.

False

consistencyLevel

string

(Consistency Level)Values: [Strong, BoundedStaleness, Session, Eventual, ConsistentPrefix]

Consistency level required for the feed (query/read feed) operation.

False

sessionToken

string

(Session Token)

The session token for use with session consistency.

False

 

Returns:

          Type:DocumentsCollection

          Description: Array of documents that match the requested query and the related metadata.

 

GetDocumentsV2

Summary: Get all documents V2

Description: Get all documents V2.

 

Syntax:

AzureCosmosDB.GetDocumentsV2 (string databaseId, string collectionId, [Optional]string partitionKey, [advanced][Optional]integer maxItemCount, [advanced][Optional]string continuationToken, [advanced][Optional]string consistencyLevel, [advanced][Optional]string sessionToken)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

partitionKey

string

(Partition key value)

If empty, all partitions will be used to search for documents.

False

maxItemCount

integer(int32)

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

continuationToken

string

(Continuation Token)

A token to fetch additional results.

False

consistencyLevel

string

(Consistency Level)Values: [Strong, BoundedStaleness, Session, Eventual, ConsistentPrefix]

Consistency level required for the feed (query/read feed) operation.

False

sessionToken

string

(Session Token)

The session token for use with session consistency.

False

 

Returns:

          Type:DocumentsCollection

          Description: Array of documents that match the requested query and the related metadata.

 

TestConnection

Summary: Test connection

Description: Tests connection of the resource.

 

Syntax:

AzureCosmosDB.TestConnection ()

 

Returns:

          Type:getAccountResponse

 

GetDatabases

Summary: Get all databases

Description: Get all databases.

 

Syntax:

AzureCosmosDB.GetDatabases ()

 

Returns:

          Type:getDatabasesResponse

 

GetDatabase

Summary: Get a database

Description: Get a database.

 

Syntax:

AzureCosmosDB.GetDatabase (string databaseId)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

 

Returns:

          Type:getDatabaseResponse

 

GetCollections

Summary: Get all collections

Description: Get all collections.

 

Syntax:

AzureCosmosDB.GetCollections (string databaseId)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

 

Returns:

          Type:getCollectionsResponse

 

GetCollection

Summary: Get a collection

Description: Get a collection.

 

Syntax:

AzureCosmosDB.GetCollection (string databaseId, string collectionId)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

 

Returns:

          Type:array of (GetCollectionResponseItem)

 

GetDocuments

Summary: Get all documents

Description: Get all documents.

 

Syntax:

AzureCosmosDB.GetDocuments ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:getDocumentsResponse

 

CreateDocument

Summary: Create or update document

Description: Create or update document. When creating a document in DocumentDB, the body must include an id property.

 

Syntax:

AzureCosmosDB.CreateDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [Optional]boolean x-ms-documentdb-is-upsert, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, postDocumentsRequest body, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

x-ms-documentdb-is-upsert

boolean

(IsUpsert)

If set to true, the document will be replaced if it exists else created.

False

x-ms-documentdb-pre-trigger-include

string

(Pre-Trigger)

Comma-separated list of trigger names to run before the document operation is executed.

False

x-ms-documentdb-post-trigger-include

string

(Post-Trigger)

Comma-separated list of trigger names to run after the document operation is executed.

False

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

body

postDocumentsRequest

 

 

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:postDocumentsResponse

 

CreateDocumentV2

Summary: Create or update document (V2)

Description: Create or update document. When creating a document in DocumentDB, the body must include an id property.

 

Syntax:

AzureCosmosDB.CreateDocumentV2 ([advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [Optional]boolean x-ms-documentdb-is-upsert, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, postDocumentsRequest body, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

x-ms-documentdb-is-upsert

boolean

(IsUpsert)

If set to true, the document will be replaced if it exists else created.

False

x-ms-documentdb-pre-trigger-include

string

(Pre-Trigger)

Comma-separated list of trigger names to run before the document operation is executed.

False

x-ms-documentdb-post-trigger-include

string

(Post-Trigger)

Comma-separated list of trigger names to run after the document operation is executed.

False

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

body

postDocumentsRequest

 

 

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:postDocumentsResponse

 

QueryDocuments

Summary: Query documents

Description: Query documents.

 

Syntax:

AzureCosmosDB.QueryDocuments ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]boolean x-ms-documentdb-query-enablecrosspartition, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, queryRequest body)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-documentdb-query-enablecrosspartition

boolean

(Enable Cross Partition)

If the collection is partitioned, this must be set to True to allow execution across multiple partitions.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

databaseId

string

(Database ID)

The name of the database

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

body

queryRequest

 

 

True

 

Returns:

          Type:queryResponse

 

GetDocument

Summary: Get a document

Description: Get a document.

 

Syntax:

AzureCosmosDB.GetDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, string databaseId, string collectionId, string documentId, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

documentId

string

(Document ID)

The identifier for the document.

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:getDocumentResponse

 

ReplaceDocument

Summary: Replace a document

Description: Replace a document.

 

Syntax:

AzureCosmosDB.ReplaceDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, string documentId, putDocumentRequest body, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

x-ms-documentdb-pre-trigger-include

string

(Pre-Trigger)

Comma-separated list of trigger names to run before replacing the document.

False

x-ms-documentdb-post-trigger-include

string

(Post-Trigger)

Comma-separated list of trigger names to run after replacing the document.

False

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

documentId

string

(Document ID)

The identifier of the document.

True

body

putDocumentRequest

 

 

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:putDocumentResponse

 

DeleteDocument

Summary: Delete a document

Description: Delete a document.

 

Syntax:

AzureCosmosDB.DeleteDocument ([Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, [advanced][Optional]number x-ms-max-item-count, [advanced][Optional]string x-ms-continuation, [advanced][Optional]string x-ms-consistency-level, [advanced][Optional]string x-ms-session-token, [advanced][Optional]string x-ms-activity-id, [advanced][Optional]string x-ms-documentdb-pre-trigger-include, [advanced][Optional]string x-ms-documentdb-post-trigger-include, string databaseId, string collectionId, string documentId, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-max-item-count

number

(Max Item Count)

An integer indicating the maximum number of items to be returned per page.

False

x-ms-continuation

string

(Continuation Token)

A string token returned for queries and read-feed operations if there are more results to be read.

False

x-ms-consistency-level

string

(Consistency Level)Values: [Strong, Bounded, Session, Eventual]

This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest).

False

x-ms-session-token

string

(Session Token)

A string token used with session level consistency.

False

x-ms-activity-id

string

(Activity id)

A client supplied identifier for the operation, which will be echoed in the server response.

False

x-ms-documentdb-pre-trigger-include

string

(Pre-Trigger)

Comma-separated list of trigger names to run before the document is deleted.

False

x-ms-documentdb-post-trigger-include

string

(Post-Trigger)

Comma-separated list of trigger names to run after the document id deleted.

False

databaseId

string

(Database ID)

The name of the document.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

documentId

string

(Document ID)

The identifier of the document.

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

 

GetStoredProcedures

Summary: Get stored procedures

Description: Get stored procedures in the specified collection.

 

Syntax:

AzureCosmosDB.GetStoredProcedures (string databaseId, string collectionId, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:getStoredProceduresResponse

 

CreateStoredProcedure

Summary: Create stored procedure

Description: Create stored procedure.

 

Syntax:

AzureCosmosDB.CreateStoredProcedure (string databaseId, string collectionId, CreateStoredProcedureParameterBody body, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

body

CreateStoredProcedureParameterBody

 

 

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:createStoredProcedureResponse

 

ReplaceStoredProcedure

Summary: Replace stored procedure

Description: Replace stored procedure.

 

Syntax:

AzureCosmosDB.ReplaceStoredProcedure (string databaseId, string collectionId, string sprocId, ReplaceStoredProcedureParameterBody body, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

sprocId

string

(Sproc ID)

The name of the stored procedure.

True

GetStoredProcedures

body

ReplaceStoredProcedureParameterBody

 

 

True

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:createStoredProcedureResponse

 

ExecuteStoredProcedure

Summary: Execute stored procedure

Description: Execute stored procedure in specified collection.

 

Syntax:

AzureCosmosDB.ExecuteStoredProcedure (string databaseId, string collectionId, [Optional]string x-ms-documentdb-raw-partitionkey, [internal][Optional]string x-ms-documentdb-partitionkey, string sprocId, [Optional]string parameters, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

x-ms-documentdb-raw-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

x-ms-documentdb-partitionkey

string

(Partition key value)

The partition key value for the requested document or attachment operation.

False

sprocId

string

(Sproc ID)

The name of the stored procedure.

True

GetStoredProcedures

parameters

string

 

 

False

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:ObjectWithoutType

 

DeleteStoredProcedure

Summary: Delete stored procedure

Description: Delete stored procedure.

 

Syntax:

AzureCosmosDB.DeleteStoredProcedure (string databaseId, string collectionId, string sprocId, [advanced][Optional]string x-ms-version)

 

Parameters:

Name

Type

Summary

Required

Related Action

databaseId

string

(Database ID)

The name of the database.

True

GetDatabases

collectionId

string

(Collection ID)

The name of the collection.

True

GetCollections

sprocId

string

(Sproc ID)

The name of the stored procedure.

True

GetStoredProcedures

x-ms-version

string

(API version)Values: [2017-05-03, 2018-12-31]

API version.

False

 

Returns:

          Type:string

 


 

CreateStoredProcedureParameterBody

Summary:

Description:

 

          Properties:

Name

Type

Summary

body

string

Function definition

Function that defines the stored procedure, e.g. 'function(params){ ... }'

id

string

id

New id of the stored procedure.


 

createStoredProcedureResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_etag

string

_etag

_etag

_rid

string

_rid

_rid

_self

string

_self

_self

_ts

integer(int32)

_ts

_ts

body

string

body

body

id

string

id

id


 

DocumentsCollection

Summary:

Description: Array of documents that match the requested query and the related metadata.

 

          Properties:

Name

Type

Summary

value

array of (ObjectWithoutType)

Documents

 

ContinuationToken

string

Continuation Token

 

Count

integer(int32)

Number of Documents

 

RequestCharge

number(double)

Request Charge

 

SessionToken

string

Session Token

 

ActivityId

string

Activity Id

 


 

DocumentsQuery

Summary:

Description: Documents query parameters

 

          Properties:

Name

Type

Summary

QueryText

string

 

SQL Syntax Query over documents


 

getAccountResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_self

string

 

 

_rid

string

 

 

id

string

 

 


 

GetCollectionResponseItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

 

 

indexingPolicy

IndexingPolicy

 

 

_rid

string

 

 

_ts

integer(int32)

 

 

_self

string

 

 

_etag

string

 

 

_docs

string

 

 

_sprocs

string

 

 

_triggers

string

 

 

_udfs

string

 

 

_conflicts

string

 

 

 

IndexingPolicy

Summary:

Description:

 

          Properties:

Name

Type

Summary

indexingMode

string

 

 

automatic

string

 

 

includedPaths

array of (IncludedPathsItem)

 

 

excludedPaths

array of (string)

 

 

 

IncludedPathsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

path

string

 

 

indexes

array of (IndexesItem)

 

 

 

IndexesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

kind

string

 

 

dataType

string

 

 

precision

integer(int32)

 

 

 


 

getCollectionsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

DocumentCollections

array of (DocumentCollectionsItem)

 

 

_count

integer(int32)

 

 

 

DocumentCollectionsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

 

 

indexingPolicy

IndexingPolicy

 

 

_rid

string

 

 

_ts

integer(int32)

 

 

_self

string

 

 

_etag

string

 

 

_docs

string

 

 

_sprocs

string

 

 

_triggers

string

 

 

_udfs

string

 

 

_conflicts

string

 

 

 

IndexingPolicy

Summary:

Description:

 

          Properties:

Name

Type

Summary

indexingMode

string

 

 

automatic

string

 

 

includedPaths

array of (IncludedPathsItem)

 

 

excludedPaths

array of (string)

 

 

 

IncludedPathsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

path

string

 

 

indexes

array of (IndexesItem)

 

 

 

IndexesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

kind

string

 

 

dataType

string

 

 

precision

integer(int32)

 

 

 


 

getDatabaseResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

 

 

_rid

string

 

 

_self

string

 

 

_etag

string

 

 

_colls

string

 

 

_users

string

 

 

_ts

integer(int32)

 

 


 

getDatabasesResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

Databases

array of (DatabasesItem)

 

 

_count

integer(int32)

 

 

 

DatabasesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

 

 

_rid

string

 

 

_self

string

 

 

_etag

string

 

 

_colls

string

 

 

_users

string

 

 

_ts

integer(int32)

 

 

 


 

getDocumentResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

getDocumentsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

Documents

array of (DocumentsItem)

 

 

 

DocumentsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

 


 

getStoredProceduresResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_count

integer(int32)

_count

_count

_rid

string

_rid

_rid

StoredProcedures

array of (StoredProceduresItem)

StoredProcedures

StoredProcedures

 

StoredProceduresItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

_etag

string

_etag

_etag

_rid

string

_rid

_rid

_self

string

_self

_self

_ts

integer(int32)

_ts

_ts

body

string

body

body

id

string

id

id

 


 

ObjectWithoutType

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

postDocumentsRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

postDocumentsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

_ts

integer(int32)

 

 

_self

string

 

 

_etag

string

 

 

_attachments

string

 

 

id

string

 

 


 

putDocumentRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

putDocumentResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

id

string

 

 


 

QueryDocumentsResponse

Summary:

Description: Array of documents that match the requested query and the related metadata.

 

          Properties:

Name

Type

Summary

Documents

array of (ObjectWithoutType)

Documents

Array of documents that match the request.

_count

integer(int32)

Number of Documents

Number of documents.

ActivityId

string

Activity ID

Azure Cosmos DB service activity ID.


 

queryRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

query

string

 

 


 

queryResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_rid

string

 

 

_count

number

 

 

Documents

array of (DocumentsItem)

 

 

 

DocumentsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

 


 

ReplaceStoredProcedureParameterBody

Summary:

Description:

 

          Properties:

Name

Type

Summary

body

string

Function definition

Function that defines the stored procedure, e.g. 'function(params){ ... }'

id

string

id

Id of the existing stored procedure.