Reference

Source code


<?xml version="1.0" encoding="utf-8"?>
<ApiConfig Name="Cosmos DB"
           Desc="Read and write Azure Cosmos DB data effortlessly. Query, integrate, and manage databases, containers, documents, and users — almost no coding required."
           Version="2"
           Slug="cosmosdb-connector"
           Id="b892d532-b55f-4c6c-b719-96a100bffae6"
           EngineVersion="12"
           Logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAta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Y23VBR5T7nuC59rYvmCRBT2H7QKGK24v6rhPFGw/ZJ6DPLg7F8muYA8V1rduNMl2labkV5RYn2GsWZXY5ZNJMuxUnUdIbZrUG+H9b7RPl4sCOKukmrHyyi5/2m30RcfnJNrOANzlFifIbi7voD4ILMT8X+cjZIMFh7sWjwBwDizAitAK1xOrARUO5g5cRol4QkbEdc/VDhujxwpis8IKHF9B2l0tefgrGXLukllInUvEClhC0ncyQKjxPoMQbDZt4ouF1taOR//WaPyZPyPi2CWbOBkIxDagISuI0CU6SijxPoM4aGLx7JOgLfJx6s+qE+ItccspkS8DsXZ14Gr4YaBAbS1ngEi/iMp0f6a1MznhSixPsPYvGACc8iywTEvoiFfahPhZyhZfgChvXcRTbVnCQilDxVmHwsUOUqszwk2zc1jqwf/qLS6+Uk08J8DNsrKLAi0iyDcXFGYvdPsJVFifc6wcV72+2v2NM63OQkbjj/TxCVHqcu2rCKIdlqGKLE+h2Aj2JFc1yC5WGfCbF/xsKbX5RRhxaYgScUQJdbnFIxcpbsav0pF8iYY84CKIr1p0/y8A6GkHyXW5xgb5+a9W1Ld9Dhy6E79OQr07+Xz80LsSBAl1ucedsG23ik6WU9g3hUxBIItrLlho8T6nIP1wC2tcjxJCXxHDiME/lk2N/toOOlGiRUFUIH8EyhViCWK4a/CGiVWFDA8PLwjxm5ncwqw5h9xOLb/lXDTjBIrCreHvqTaUY+7bKWQJqkHcFiIEisKGawb9blAwJLu1FFiReEGBXKSAL2U9VKwIr0osaJww2YTNlCneIa6xD9YkV6UWFG4IXW5WWVVelFiRRER/H8G9CDtAt8RCQAAAABJRU5ErkJggg==">
  <VersionHistory>
    <Change Ver="2" Date="2024-12-11" Type="Modified">Update logo and add images to authentication instructions</Change>      
	<Change Date="2024-04-05" Type="Fix">Change default rows per page (MaxItemCount) from 100 to 1000 for performance improvement</Change>  
	<Change Date="2024-04-05" Type="Fix">Maximum 10000 rows are fetched because PagingByUrlMaxPages is set to 100 by default. It needs to be 0 for unlimited pages.</Change>
    <Change Date="2023-08-31" Type="Fix">get_document throws error on UI due to bad options for ConsistencyLevel</Change>
    <Change Date="2023-05-20" Type="New">Initial version</Change>
  </VersionHistory>

  <ServiceUrls>
    <ServiceUrl Name="Cosmos DB Service Url" Url="https://[$Account$].documents.azure.com" />
  </ServiceUrls>

  <Auths>
    <Auth Name="ApiKey"
          Label="API Key"
          Type="Http"
          ConnStr="CredentialType=HashSignature;HashSignatureFormat=[$http-method$]-lc[$lf$][$url-part-regex-(/(?&lt;resourcetype&gt;dbs|colls|docs|users|permissions|sprocs|attachments|pkranges)(/([\w\d-\$\.=])+)?$){{0,resourcetype}}$]-lc[$lf$][$url-part-regex-(?&lt;id&gt;dbs/([\w \d-+=.]+)$)|((?&lt;id&gt;dbs/(.*?))/(colls|docs|users|attachments|permissions||pkranges)$)|(?&lt;id&gt;dbs/(.*)/(colls|docs|users|attachments|permissions)/[\w \d-+.=]+$){{0,id}}$][$lf$][$timestamp$]-lc[$lf$][$lf$];ExtraHeaders=x-ms-date: [$timestamp$]||x-ms-version: [$ApiVersion$]||Authorization:type%3dmaster%26ver%3d1.0%26sig%3d[$signature$]-enc;HashTimestampFormat=r;"
          ContentType="application/json"
          TestEndPoint="get_tables">
      <Notes>
<![CDATA[Connecting to your Azure Cosmos DB data requires you to authenticate your REST API access. Follow the instructions below:
<ol>
    <li>Go to your Azure portal homepage: <a target="_blank" href="https://portal.azure.com/">https://portal.azure.com/</a>.</li>
    <li>In the search bar at the top of the homepage, enter <strong>Azure Cosmos DB</strong>. In the dropdown that appears, select <strong>Azure Cosmos DB</strong>.</li>
    <li>Click on the name of the database account you want to connect to (also copy and paste the name of the database account for later use).</li>
    <li>
        On the next page where you can see all of the database account information, look along the left side and select <strong>Keys</strong>:
        
        <img src="https://cdn.zappysys.com/api/Images/authentication/cosmosdb/API-Key/use-api-key-to-get-cosmos-db-data-via-rest-api-in-azure.png"
             loading="lazy"
             decoding="async"
             class="img-thumbnail block"
             alt="Use API key to get Cosmos DB data via REST API in Azure"
             title="Using API key to get Cosmos DB data via REST API in Azure"
             width="720"
             height="500" />   
    </li>
    <li>
        On the <strong>Keys</strong> page, you will have two tabs: <strong>Read-write Keys</strong> and <strong>Read-only Keys</strong>.
        If you are going to write data to your database, you need to remain on the <strong>Read-write Keys</strong> tab.
        If you are only going to read data from your database, you should select the <strong>Read-only Keys</strong> tab.</li>
    <li>
        On the <strong>Keys</strong> page, copy the <strong>PRIMARY KEY</strong> value and paste it somewhere for later use 
        (the <strong>SECONDARY KEY</strong> value may also be copied and used).</li>    
    <li>
        Now go to SSIS package or ODBC data source and use this <strong>PRIMARY KEY</strong> in <strong>API Key</strong> authentication configuration.
    </li>    
    <li>Enter the primary or secondary key you recorded in step 6 into the <strong>Primary or Secondary Key</strong> field.</li>
    <li>Then enter the database account you recorded in step 3 into the <strong>Database Account</strong> field.</li>
    <li>Next, enter or select the default database you want to connect to using the <strong>Default Database</strong> field.</li>
    <li>Continue by entering or selecting the default table (i.e. container/collection) you want to connect to using the <strong>Default Table (Container/Collection)</strong> field.</li>
    <li>Select the <strong>Test Connection</strong> button at the bottom of the window to verify proper connectivity with your Azure Cosmos DB account.</li>
    <li>If the connection test succeeds, select <strong>OK</strong>.</li>
    <li>
        Done! Now you are ready to use Cosmos DB Connector!
    </li>        
</ol>]]>
      </Notes>
      <Params>
        <Param Name="Password" Label="Primary or Secondary Key" Required="True" Secret="True" />
        <Param Name="Account" Label="Account Name (Case-Sensitive)" Required="True" Desc="Login to your Cosmos DB Page and look in the title (copy that name). URL usually ends with /databaseAccounts/your-cosmos-db-account/overview" />
        <Param Name="Database" Required="True" Template="ParaDatabase"/>
		<Param Name="Table" Label="Default Table (needed to invoke #DirectSQL)" Template="ParaTable"/>
        <Param Name="ApiVersion" Label="API Version" Value="2020-07-15" Options="2020-07-15;2015-08-06" Required="True" Hidden="True" />
      </Params>
    </Auth>
  </Auths>


  <Template>
	<Param Name="ParaDatabase" Label="Database Name (keep blank to use default) Case-Sensitive" Desc="Leave blank to use default DB set on connection screen" OptionsEndPoint="get_databases" OptionsEndPointValueColumn="id" />
	<Param Name="ParaTable" Label="Table Name (Case-Sensitive)" Desc="" OptionsEndPoint="get_tables" OptionsEndPointValueColumn="id" OptionsEndPointParameters="Database=[$Database$]"  />
	<Param Name="ParaUser" Label="User Name (Case-Sensitive)" Desc="" OptionsEndPoint="get_users" OptionsEndPointValueColumn="id" OptionsEndPointParameters="Database=[$Database$]"  />
	<Param Name="ParaFilter" Type="Property" Value="$.Documents[*]" Options="$.Documents[*];$.Documents[*].SomeArray[*];$.Documents[*].SomeArray2ndLevel[*].SomeArray3rdLevel[*];$.Documents[*].SomeNestedProp" HelpLink="https://zappysys.com/links/?id=jpath_help" />
	
	<Param Name="ParaPartitionKey" Label="Partition Key Value (default is supplied Id)"  Key="x-ms-documentdb-partitionkey" Type="Header" 
		Value="." 
		Options="Default=.;SingleKeyValue=[&quot;someValue1&quot;];MultiKeyValue=[&quot;some_value1&quot;,&quot;some_value2&quot; ]" 
		ValueTemplate="&lt;&lt;{$value$}|~|Eq|~|.|~|[&quot;[$Id$]&quot;]|~|$1,FUN_IF&gt;&gt;" 
		Desc="The partition key value for the document. Must be included if and only if the collection is created with a partitionKey definition"/>
			
    <EndPoint Name="Pagination">
      <Params>
        <Param Name="PagingMode" Type="Property" Value="ByResponseHeaderContinuationToken" />
        <Param Name="PagingByUrlAttributeName" Type="Property" Value="x-ms-continuation" />
        <Param Name="PagingByUrlMaxPages" Type="Property" Value="0" />
        <Param Name="MaxItemCount" Label="Max Rows Per Page (Adjust for Speed)" Value="1000" Type="Header" Key="x-ms-max-item-count" Desc="An integer indicating the maximum number of items to be returned per page."/>
      </Params>
    </EndPoint>

    
	<EndPoint Name="CommonOutputColumns">
      <OutputColumns>
        <Column Name="id" DataType="DT_WSTR" Label="Id" Length="255" Desc="The unique name that identifies the collection." />
        <Column Name="_rid" DataType="DT_WSTR" Label="ResourceId" Length="2000" Desc="System generated property. The resource ID is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the permission resource." />
        <Column Name="_ts" DataType="DT_I4" Label="LastUpdated" Desc="System generated property. Specifies the last updated timestamp of the resource." />
        <Column_unused Name="_self" DataType="DT_WSTR" Label="UniqueUri" Length="2048" Desc="System generated property. The unique addressable URI for the resource." />
        <Column Name="_etag" DataType="DT_WSTR" Label="ETag" Length="4000" Desc="System generated property representing the resource etag required for optimistic concurrency control." />
      </OutputColumns>	
	</EndPoint>
	<EndPoint Name="UserOutputColumns" Template="CommonOutputColumns">
		<OutputColumns>
			<Column Name="_permissions" DataType="DT_WSTR" Label="Permissions" Length="4000" Desc="System generated property that specifies the addressable path of the conflicts resource. During an operation on a resource within a collection, if a conflict occurs, users can inspect the conflicting resources by performing a GET on the conflicts URI path." />
		</OutputColumns>
	</EndPoint>
	<EndPoint Name="DatabaseOutputColumns" Template="CommonOutputColumns">
      <OutputColumns>
        <Column Name="_colls" DataType="DT_WSTR" Label="Collections" Length="4000" />
		<Column Name="_users" DataType="DT_WSTR" Label="Users" Length="4000" />
      </OutputColumns>	
	</EndPoint>	
    <EndPoint Name="TableOutputColumns" Template="CommonOutputColumns">
      <OutputColumns>
        <Column Name="uniqueKeyPolicy.uniqueKeys" DataType="DT_WSTR" Label="UniqueKeys" Length="4000" Desc="Unique keys for the container." />
        <Column Name="indexingPolicy.indexingMode" DataType="DT_WSTR" Label="IndexingPolicyIndexingMode" Length="12" Desc="By default, the indexing mode is Consistent. This means that indexing occurs synchronously during insertion, replacement, or deletion of documents. To have indexing occur asynchronously, set the indexing mode to lazy." />
        <Column Name="indexingPolicy.automatic" DataType="DT_BOOL" Label="IndexingPolicyAutomatic" Desc="Indicates whether automatic indexing is on or off. The default value is True, thus all documents are indexed. Setting the value to False would allow manual configuration of indexing paths." />
        <Column Name="indexingPolicy.includedPaths" DataType="DT_WSTR" Label="IndexingPolicyIncludedPaths" Length="4000" Desc="The array containing document paths to be indexed. By default, two paths are included: the / path which specifies that all document paths be indexed, and the _ts path, which indexes for a timestamp range comparison." />
        <Column Name="indexingPolicy.excludedPaths" DataType="DT_WSTR" Label="IndexingPolicyExcludedPaths" Length="4000" Desc="The array containing document paths to be excluded from being indexed." />
        <Column Name="conflictResolutionPolicy.mode" DataType="DT_WSTR" Label="ConflictResolutionMode" Length="20" Desc="Policy-driven mechanism to resolve write conflicts. You can select from two conflict resolution policies on an Azure Cosmos DB container. (LastWriterWins and Custom)" />
        <Column Name="conflictResolutionPolicy.conflictResolutionPath" DataType="DT_WSTR" Label="ConflictResolutionPath" Length="4000" Desc="Policy-driven mechanism to resolve write conflicts. This is the conflict resolution path." />
        <Column Name="conflictResolutionPolicy.conflictResolutionProcedure" DataType="DT_WSTR" Label="ConflictResolutionProcedure" Length="4000" Desc="Policy-driven mechanism to resolve write conflicts. This is the conflict resolution procedure." />
        <Column Name="geospatialConfig.type" DataType="DT_WSTR" Label="GeospatialConfigType" Length="100" Desc="The type of geospatial data describing the position and shape of objects in space." />
        <Column Name="partitionKey.paths" DataType="DT_WSTR" Label="PartitionKeyPaths" Length="4000" Desc="An array of paths using which data within the collection can be partitioned. Paths must not contain a wildcard or a trailing slash. For example, the JSON property 'AccountNumber' is specified as '/AccountNumber'. The array must contain only a single value." />
        <Column Name="partitionKey.kind" DataType="DT_WSTR" Label="PartitionKeyKind" Length="4000" Desc="The algorithm used for partitioning. Only Hash is supported." />
        <Column Name="partitionKey.version" DataType="DT_I4" Label="PartitionKeyVersion" Desc="The partition key version." />
        <Column Name="_docs" DataType="DT_WSTR" Label="Documents" Length="2048" Desc="System generated property that specifies the addressable path of the documents resource." />
        <Column Name="_sprocs" DataType="DT_WSTR" Label="StoredProcedures" Length="2048" Desc="System generated property that specifies the addressable path of the stored procedures (sprocs) resource." />
        <Column Name="_triggers" DataType="DT_WSTR" Label="Triggers" Length="2048" Desc="System generated property that specifies the addressable path of the triggers resource." />
        <Column Name="_udfs" DataType="DT_WSTR" Label="UserDefinedFunctions" Length="2048" Desc="System generated property that specifies the addressable path of the user-defined functions (udfs) resource." />
        <Column Name="_conflicts" DataType="DT_WSTR" Label="Conflicts" Length="2048" Desc="System generated property that specifies the addressable path of the conflicts resource. During an operation on a resource within a collection, if a conflict occurs, users can inspect the conflicting resources by performing a GET on the conflicts URI path." />
      </OutputColumns>
    </EndPoint>
	
     <EndPoint Name="CreateDocument"
              Url="/dbs/[$Database$]/colls/[$Table$]/docs"
			  OutputHeaders="StatusCode"
			  Body="[$Document$]"
			  Method="POST"
			  >
      
      <Params>        
        <Param Name="Table" Template="ParaTable" Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>
		<Param Name="Document" />
		<Param Name="PartitionKey" Template="ParaPartitionKey" Value="[]"/>
		<Param Name="Upsert" Hidden="True" Label="Enable Upsert Mode (update if document found)" Key="x-ms-documentdb-is-upsert" Type="Header" Options=";true;false"/>
		<Param Name="IsMultiPart" Type="Property" Label="Read Document from File Path" />
      </Params>
	  
	  <InputColumns>
		<Column Name="PartitionKey" MapToParam="True" DataType="DT_WSTR" />
		<Column Name="Document" MapToParam="True" DataType="DT_NTEXT" />
	  </InputColumns>
	  
	  <OutputColumns>
		<Column Name="id" />
		<Column Name="_rid" />
		<Column Name="_ts" DataType="DT_I8"/>
		<Column Name="ResponseHeaders_StatusCode" Label="http_status" DataType="DT_I4" />
	  </OutputColumns>	  
    </EndPoint>

     <EndPoint Name="UpdateDocument"
			  Label="Replace Full Document (PUT) or Specific Part (PATCH)"	
              Url="/dbs/[$Database$]/colls/[$Table$]/docs/[$Id$]"
			  OutputHeaders="StatusCode"
			  Body="[$Document$]"
			  >      
      <Params>        
		<Param Name="RequestMethod" Type="Property" Hidden="False" Label="Full Replace (PUT) or Partial (PATCH)?" Value="PUT" Options="Full Replace=PUT;Partial Replace=PATCH" />
	    <Param Name="Id" Label="Document Id" IsKey="True" />
        <Param Name="Table" Template="ParaTable" Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>		
		<Param Name="Document" Desc="Full Document if RequestMethod=PUT else Partial Document" HelpLink="https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update" />
		<Param Name="PartitionKey" Template="ParaPartitionKey" Value="[]"/>
		<Param Name="IsMultiPart" Type="Property" Label="Read Document from File Path" />
      </Params>
	  
	  <InputColumns>		
		<Column Name="RequestMethod" MapToParam="True" DataType="DT_WSTR" />
		<Column Name="PartitionKey" MapToParam="True" DataType="DT_WSTR" />
	    <Column Name="Id" MapToParam="True" Key="True" />
		<Column Name="Document" MapToParam="True" DataType="DT_NTEXT" />
	  </InputColumns> 
	  
	  <OutputColumns>
		<Column Name="id" />
		<Column Name="_rid" />
		<Column Name="_ts" DataType="DT_I8"/>
		<Column Name="ResponseHeaders_StatusCode" Label="http_status" DataType="DT_I4" />
	  </OutputColumns>	  
    </EndPoint>

	
  </Template>


  <EndPoints>

    <EndPoint Name="get_databases"
              Label="Get List of Databases"
              Url="/dbs"
              Method="GET"
              Filter="$.Databases[*]"
              Template="Pagination,DatabaseOutputColumns"
              Desc="Gets a list of the databases in the current database account."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-databases"
			  CachedTtl="60"
			  >
    </EndPoint>


    <EndPoint Name="get_database"
              Label="Get Database Information by Id or Name"
              Url="/dbs/[$Id$]"
              Method="GET"
              Template="DatabaseOutputColumns"
              Desc="Gets a database by its Id."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/get-a-database"
			  CachedTtl="60"
			  >
      <Params>
		<Param Name="Id" IsKey="True" Required="True" Template="ParaDatabase"/>
      </Params>
    </EndPoint>


    <EndPoint Name="get_tables"
              Label="Get List of Tables"
              Url="/dbs/[$Database$]/colls"
              Method="GET"
              Filter="$.DocumentCollections[*]"
              Template="Pagination,TableOutputColumns"
              Desc="Gets a list of the tables in the database. (Tables are also called 'containers' or 'collections')"
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-collections"
			  CachedTtl="10"
			  >
      <Params>
        <Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint>


    <EndPoint Name="get_table"
              Label="Get table information by Id or Name"
              Url="/dbs/[$Database$]/colls/[$Id$]"
              Method="GET"
              Template="TableOutputColumns"
              Desc="Gets a table by its Id. (Tables are also called 'containers' or 'collections')"
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/get-a-collection"
			  CachedTtl="10"
			  >
      <Params>
        <Param Name="Id" IsKey="True" Required="True"  Template="ParaTable"/>
        <Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint>
	
    <EndPoint Name="get_partition_keyranges"
              Label="Get table partition key ranges"
              Url="/dbs/[$Database$]/colls/[$Table$]/pkranges"
              Method="GET"
			  Filter="$.PartitionKeyRanges[*]"
              Desc="Gets Partition Key Ranges for a table. This is useful for query if you want to minimize scan to specific partition (Tables are also called 'containers' or 'collections')"
              HelpLink=""
			  CachedTtl="30"
			  >
      <Params>
        <Param Name="Table" IsKey="True" Required="True"  Template="ParaTable"/>
        <Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint>	

    <EndPoint Name="query_documents"
              Label="Query documents using Cosmos DB SQL query language"
              Url="/dbs/[$Database$]/colls/[$Table$]/docs"
              Method="POST"
			  IsSqlEndPoint="True"
              Headers="content-type:application/query+json||x-ms-documentdb-query-enablecrosspartition:true||x-ms-documentdb-query-enable-scan:[$AllowScan$]"
              Filter="$.Documents[*]"
              Template="Pagination"
              Desc="Gets data based on the specified SQL query."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/querying-cosmosdb-resources-using-the-rest-api"
			  CachedTtl="15"
			  >
      <Body>
<![CDATA[{
    "query": "[$Query$]"
}
]]>
      </Body>
      <Params>
        <Param Name="Table" Template="ParaTable" Required="True" />
        <Param Name="Query" IsSqlParameter="True" Value="select * from root" Label="SQL Query" Required="True" Editor="MultiLine" Desc="Query for Cosmos DB" HelpLink="https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/select"/>
		<Param Name="Filter" Template="ParaFilter" Required="True" />
		<Param Name="Database" Template="ParaDatabase" />
		<Param Name="AllowScan" Label="Allow Query Scan" Value="true" Options="true;false"/>
		<Param Name="AllowCrossPartition" Label="Allow Cross Partition Query" Value="true" Options="true;false"/>
		<Param Name="PartitionKeyRangeId" Type="Header" Key="x-ms-documentdb-partitionkeyrangeid" Label="Cross Partition Key Range Id" Value="0" OptionsEndPoint="get_partition_keyranges"  
			OptionsEndPointValueColumn="id" OptionsEndPointLabelColumn="minInclusive,maxExclusive" OptionsEndPointParameters="Database=[$Database$];Table=[$Table$]"  />
      </Params>
    </EndPoint>
	
    <EndPoint Name="get_documents"
              Label="Get All Documents for a Table"
              Url="/dbs/[$Database$]/colls/[$Table$]/docs"
              Method="GET"
			  Template="Pagination"
              Filter="$.Documents[*]"
              Desc="Gets all documents for a Table."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-documents">
      
      <Params>        
        <Param Name="Table" Template="ParaTable" Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint>
	
    <EndPoint Name="get_document"
              Label="Get Document by Id"
              Url="/dbs/[$Database$]/colls/[$Table$]/docs/[$Id$]"
              Method="GET"
			  Headers="x-ms-documentdb-query-enablecrosspartition:[$EnableCrossPartition$]"
              Desc="Gets Document by Id."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/get-a-document"
			  CachedTtl="5"
			  >
      
      <Params>        
	    <Param Name="Id" Label="Document Id" Required="True" IsKey="True" />
		
        <Param Name="Table" Template="ParaTable" Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>
		<Param Name="EnableCrossPartition" Value="true" Options="true;false"/>
		<Param Name="PartitionKey" Template="ParaPartitionKey"/>
		<Param Name="ConsistencyLevel"  Key="x-ms-consistency-level" Type="Header" Options=";Strong;Bounded;Session;Eventual"  Desc="This is the consistency level override. The valid values are: Strong, Bounded, Session, or Eventual (in order of strongest to weakest). The override must be the same or weaker than the account's configured consistency level."/>
		
      </Params>
    </EndPoint>	
	
    <EndPoint Name="delete_document"
              Label="Delete a Document by Id"
              Url="/dbs/[$Database$]/colls/[$Table$]/docs/[$Id$]"
              Method="DELETE"
			  Headers="x-ms-documentdb-query-enablecrosspartition:[$EnableCrossPartition$]"
              Desc="Deletes a Document by Id."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/delete-a-document">
      
      <Params>        
	    <Param Name="Id" Label="Document Id" Required="True" IsKey="True"/>
        <Param Name="Table" Template="ParaTable" Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>
		<Param Name="EnableCrossPartition" Value="true" Options="true;false"/>
		<Param Name="PartitionKey" Template="ParaPartitionKey"/>
		
		<Param Name="RawOutputDataRowTemplate" Value="{}" ValueTemplate="{Status:'Deleted', Id:'[$Id$]', Table: [$Table$]}" Type="Property" />
        <Param Name="EnableRawOutputModeSingleRow" Value="True"  Type="Property" />
		<Param Name="ContineOnErrorForStatusCode" Value="True" Type="Property" />		
		<Param Name="ErrorStatusCodeToMatchRegex" Value="404|405" Type="Property" />		
      </Params>
	 <InputColumns>		
	    <Column Name="Id" MapToParam="True" Key="True" />
	  </InputColumns> 	  
	 <OutputColumns>		
		<Column Name="Id" />
		<Column Name="Status" />
		<Column Name="Table" />
	    <Column Name="ResponseHeaders_StatusCode" Label="StatusCode" DataType="DT_I4" />		  
	  </OutputColumns> 	  	  
    </EndPoint>		
	
    <EndPoint Name="get_users"
              Label="Get All Users for a Database"
              Url="/dbs/[$Database$]/users"
              Method="GET"
			  Template="Pagination,UserOutputColumns"
              Filter="$.Users[*]"
              Desc="Gets all users for a Database."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-users">
      
      <Params>        
		<Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint> 
	<EndPoint Name="get_user"
              Label="Get User by Id or Name"
              Url="/dbs/[$Database$]/users/[$Id$]"
              Method="GET"
			  Template="UserOutputColumns"
              Desc="Gets database user information for a specific Id"
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/get-a-user">
      
      <Params>        
		<Param Name="Id" Required="True" Template="ParaUser" IsKey="True"/>
		<Param Name="Database" Template="ParaDatabase"/>
      </Params>
    </EndPoint> 
    <EndPoint Name="create_user"
              Label="Create User for Database"
              Url="/dbs/[$Database$]/users"
              Method="POST"
			  Template="UserOutputColumns"
			  Body="[$RequestBody$]"
              Desc="Create a new user which you can later use to create permission set and obtain resource token."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-users">
      <Params>        
		<Param Name="Database" Template="ParaDatabase"/>
		<Param Name="RequestBody" Editor="MultiLine" Value="{&quot;id&quot;: &quot;TYPE_USERNAME_HERE&quot;}"/>
      </Params>
    </EndPoint> 

     <EndPoint Name="create_document" Template="CreateDocument"
              Label="Create a document in the container"
              Desc="Insert JSON document in Cosmos DB Container."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/create-a-document"	>
      <Params>
		
	  </Params>	  
     </EndPoint>
	 
     <EndPoint Name="upsert_document" Template="CreateDocument"
              Label="Upsert a document in the container"
              Desc="Insert JSON document in Cosmos DB Container."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/create-a-document">
      <Params>        
		<Param Name="Upsert" Value="true" />
      </Params>
    </EndPoint>
	
     <EndPoint Name="update_document" Template="UpdateDocument"
              Label="Update Document in the Container"
              Desc="Update full or part of the document in Cosmos DB Container."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/replace-a-document">
      <Params>        
      </Params>
    </EndPoint>
	
    
    <EndPoint Name="create_token"
              Label="Create Permission Token for a User (One Table)"
              Url="/dbs/[$Database$]/users/[$User$]/permissions"
              Method="POST"
              Desc="Create a new user which you can later use to create permission set and obtain resource token."
              HelpLink="https://learn.microsoft.com/en-us/rest/api/cosmos-db/list-users">
      <Body>{"id": "[$PermissionName$]","permissionMode": "[$PermissionMode$]","resource": "[$Table$]"}</Body>
	  <Params>        
		<Param Name="PermissionName" Label="Permission Name (e.g. read_orders)"  Required="True" />
		<Param Name="Database" Template="ParaDatabase"/>
		<Param Name="User" Template="ParaUser" Required="True" />
		<Param Name="PermissionMode"  Required="True" Value="all" Options="All;Read;Write;Delete"/>

		<Param Name="Table" Template="ParaTable" Label="Table (Add Permission for this)"  Required="True" ValueTemplate="dbs/[$Database$]/colls/{$value$}"/>
		<Param Name="ExpiresInSecond" Value="3600" Type="Header" Key="x-ms-documentdb-expiry-seconds" Desc="The validity period of the resource token returned by the operation. By default, a resource token is valid for one hour. To override the default, set this header with the desired validity period in seconds. The max override value is 18000, which is five hours." /> 
      </Params>
	  <OutputColumns>
		<Column Name="id" Label="Id" />
		<Column Name="permissionMode" Label="PermissionMode" />
		<Column Name="resource" Label="Resource" />
		<Column Name="_token" Label="Token" />
	  </OutputColumns>
    </EndPoint>	
  </EndPoints>

  <Tables>
	<Table Name="SysDatabases" SelectEndPoint="get_databases" LookupEndPoint="get_database" />
	<Table Name="SysTables" SelectEndPoint="get_tables" LookupEndPoint="get_table" />	
	<Table Name="SysUsers" SelectEndPoint="get_users" LookupEndPoint="get_user" />
    <Table Name="[$parent.id$]" 
		SelectEndPoint="get_documents" 
		LookupEndPoint="get_document"  
		InsertEndPoint="create_document"  
		UpdateEndPoint="update_document"  
		UpsertEndPoint="upsert_document" 
		DeleteEndPoint="delete_document" 
		
		DataEndPoint="get_tables" Expand="True" >
		<Params>
			<Param Name="Table" Value="[$parent.id$]" />
			<Param Name="Query" Value="SELECT * FROM [$parent.id$]" />
		</Params>		
	</Table>
  </Tables>


  <Examples>
  
	<Example Group="ODBC" Slug="query-documents-default-container" Default="True" Label="Query documents (default container)">
      <Desc><![CDATA[<p>Runs a Cosmos DB SQL query against the default container from the connection settings. Use the <code>#DirectSQL</code> prefix so the query is sent as-is; <code>root</code> refers to the container. Filter and order as needed (e.g. by <code>root._ts</code> for last-updated).</p><p>For query syntax see <a href="https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/select">Cosmos DB SQL query reference</a>.</p>]]></Desc>
      <Code><![CDATA[#DirectSQL SELECT * FROM root where root.id !=null order by root._ts desc]]></Code>
    </Example>  
	<Example Group="ODBC" Slug="list-all-documents-in-container" Label="List all documents in a container">
      <Desc><![CDATA[<p>Returns all documents in the specified container (table). Use the container name as the table in the <code>FROM</code> clause; the default database and container from the connection are used unless you override with <code>WITH</code>. Use for small containers or when you need a full dump; for large data sets consider a query with a filter.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM TestContainer]]></Code>
    </Example>  	
	<Example Group="ODBC" Slug="get-document-by-id" Label="Get document by ID">
      <Desc><![CDATA[<p>Returns a single document by its <code>id</code>. Filter with a <code>WHERE</code> clause on <code>Id</code>; the container must be the one from the connection or specified in <code>WITH</code>. For partitioned containers, partition key is inferred from the document when possible, or you can supply it in <code>WITH</code>.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM TestContainer Where Id='user2']]></Code>
    </Example>  		
	
	<Example Group="ODBC" Slug="query-documents-with-cosmos-db-sql" Label="Query documents with Cosmos DB SQL">
      <Desc><![CDATA[<p>Runs a Cosmos DB SQL query against a container via the <code>query_documents</code> endpoint. Supply the container name, the query text, and optionally <code>Meta</code> to define result columns and types. Use for filtered or ordered queries, or when you need a custom SELECT. Cross-partition and scan behavior can be set in <code>WITH</code>.</p><p>For query syntax see <a href="https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/select">Cosmos DB SQL query reference</a>.</p>]]></Desc>
      <Code><![CDATA[SELECT *
FROM query_documents
WITH(
  --  Database='TestDB', --if you dont supply connection level Default Database name is used
	  Table='TestContainer',  
	  Query='select * from root Where root.id!=null order by root._ts desc',
	  Meta='id:string(50);name:string(50);city;age'
	  --Meta='id; name; city; age' -- no types at all. Default is string(2000)
	  --Meta='id; name:string(50); city; age: int'   --Mixed types. If type is missing default string(2000) used
	  --check below URL for more information on Query Language Syntax
	  --https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/select
)
]]></Code>
    </Example>	
	<Example Group="ODBC" Slug="create-document-with-partition-key" Label="Create document with partition key">
      <Desc><![CDATA[<p>Inserts a new document into the container. If the container has a partition key, supply it in the <code>PartitionKey</code> column as a JSON array (e.g. ["user2"]). The value must match the document attribute used as the partition key. The <code>Document</code> column holds the full JSON body. Use the <code>Upsert</code> option in <code>WITH</code> to update if a document with the same <code>id</code> already exists.</p>]]></Desc>
      <Code><![CDATA[
INSERT INTO TestContainer (PartitionKey, Document)
VALUES(
'["user2"]', --partition key value must match its attribute from document else it will throw error. In this example container PartitionKey is /id so we used its value. For multiple key use JSON array ["val1","val2"]
'{
  "id": "user2",
  "name": "John Doe",
  "email": "jdoe@contoso.com",
  "phone": ["12345"],
  "level": "platinum"
}'
)
WITH(Upsert='true')  
]]></Code>
    </Example>

	<Example Group="ODBC" Slug="create-document-from-file-path" Label="Create document from file path">
      <Desc><![CDATA[<p>Inserts a document whose JSON body is read from a local file. The file path must start with the <code>@</code> symbol (e.g. @c:\data\order.json). Set <code>IsMultiPart=1</code> in <code>WITH</code> so the driver reads from disk. Partition key rules are the same as for inline document insert.</p>]]></Desc>
      <Code><![CDATA[
INSERT INTO TestContainer (PartitionKey, Document)
VALUES(
'["user2"]', --partition key value must match its attribute from document else it will throw error. In this example container PartitionKey is /id so we used its value. For multiple key use JSON array ["val1","val2"]
'@c:\data\order.json'   --path must start with @ symbol
)
WITH(Upsert='true', IsMultiPart=1)  
]]></Code>
    </Example>
	
	
	<Example Group="ODBC" Slug="upsert-document-insert-or-update-if-exists" Label="Upsert document (insert or update if exists)">
      <Desc><![CDATA[<p>Inserts the document or updates it if a document with the same <code>id</code> already exists. Use the <code>Upsert</code> option in <code>WITH</code> on <code>INSERT</code> to enable upsert. Handy for sync or idempotent loads where you do not want to fail on duplicate id.</p>]]></Desc>
      <Code><![CDATA[
INSERT INTO TestContainer (PartitionKey, Document)
VALUES(
'["user2"]', --partition key value must match its attribute from document else it will throw error. In this example container PartitionKey is /id so we used its value. For multiple key use JSON array ["val1","val2"]
'{
  "id": "user2",
  "name": "John Doe",
  "email": "jdoe@contoso.com",
  "phone": ["12345"],
  "level": "platinum"
}')
 WITH(Upsert='true')  
]]></Code>
    </Example>

	<Example Group="ODBC" Slug="upsert-document-using-upsert-keyword" Label="Upsert document using UPSERT keyword">
      <Desc><![CDATA[<p>Same as upsert with <code>INSERT</code> and the <code>Upsert</code> option in <code>WITH</code>, but uses the <code>UPSERT INTO</code> syntax so you do not need the <code>WITH</code> clause. Use whichever style you prefer; behavior is the same.</p>]]></Desc>
      <Code><![CDATA[
UPSERT INTO TestContainer (PartitionKey, Document)
VALUES(
'["user2"]', --partition key value must match its attribute from document else it will throw error. In this example container PartitionKey is /id so we used its value. For multiple key use JSON array ["val1","val2"]
'{
  "id": "user2",
  "name": "John Doe",
  "email": "jdoe@contoso.com",
  "phone": ["12345"],
  "level": "platinum"
}')
]]></Code>
    </Example>	

	<Example Group="ODBC" Slug="update-document-full-replace" Label="Update document (full replace)">
      <Desc><![CDATA[<p>Replaces the entire document for the given <code>Id</code>. Set <code>PartitionKey</code> and <code>Document</code> to the full JSON body. The default request method is PUT (full replace). Use this when you want to overwrite the document completely; for changing only some fields use the partial update (PATCH) example.</p>]]></Desc>
      <Code><![CDATA[
UPDATE TestContainer 
SET  
 PartitionKey='["user2"]'
,Document=
'{
  "id" : "user2",
  "name": "John Doe at <<FUN_NOW>>",
  "email": "jdoe@contoso.com",
  "phone": ["<<FUN_TODAY>>"],
  "level": "platinum"
}'
Where Id='user2'
]]></Code>
    </Example>	

	<Example Group="ODBC" Slug="partial-update-document-patch" Label="Partial update document (PATCH)">
      <Desc><![CDATA[<p>Updates only specified attributes using the PATCH method. Set <code>RequestMethod</code> to PATCH in <code>WITH</code> and supply a <code>Document</code> body with a JSON Patch <code>operations</code> array (e.g. set, add, remove, incr, move). Use when you need to change a few fields without sending the full document.</p><p>For operations and syntax see <a href="https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update">partial document update</a> and <a href="https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document">REST API</a>.</p>]]></Desc>
      <Code><![CDATA[
UPDATE TestContainer 
SET  
 PartitionKey='["user2"]'
,Document=
'{
  "operations": [
     { "op": "set", "path": "/name", "value": "updated name" }
	,{ "op": "set", "path": "/email", "value": "updated@email.com" }
  ]
}'
Where Id='user2'
WITH(
		RequestMethod='PATCH' --Partial Replace (change name and email only)
    )
	
/*
Example Document Operations
https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update
https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document

[
  { "op": "add", "path": "/color", "value": "silver" },
  { "op": "remove", "path": "/used" },
  { "op": "set", "path": "/price", "value": 355.45 }
  { "op": "incr", "path": "/inventory/quantity", "value": 10 },
  { "op": "add", "path": "/tags/-", "value": "featured-bikes" },
  { "op": "move", "from": "/color", "path": "/inventory/color" }
]

*/	
]]></Code>
    </Example>

<Example Group="ODBC" Slug="partial-update-document-patch-from-file" Label="Partial update document (PATCH) from file">
      <Desc><![CDATA[<p>Same as partial update (PATCH) but the JSON Patch operations are read from a local file. The path must start with the <code>@</code> symbol; set <code>IsMultiPart=1</code> in <code>WITH</code> to enable file upload. Useful when the patch payload is large or generated externally.</p><p>For operations and syntax see <a href="https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update">partial document update</a> and <a href="https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document">REST API</a>.</p>]]></Desc>
      <Code><![CDATA[
UPDATE TestContainer 
SET  
 PartitionKey='["user2"]'
,Document='@c:\temp\b.txt'  --path must start with @ symbol
Where Id='user2'
WITH(
		 RequestMethod='PATCH' --Partial Replace (change name and email only)
	    ,IsMultiPart=1 --this enables file upload	
    )
	
/*
Example Document Operations
https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update
https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document

[
  { "op": "add", "path": "/color", "value": "silver" },
  { "op": "remove", "path": "/used" },
  { "op": "set", "path": "/price", "value": 355.45 }
  { "op": "incr", "path": "/inventory/quantity", "value": 10 },
  { "op": "add", "path": "/tags/-", "value": "featured-bikes" },
  { "op": "move", "from": "/color", "path": "/inventory/color" }
]

*/	
]]></Code>
    </Example>
	
	<Example Group="ODBC" Slug="list-databases" Label="List databases">
      <Desc><![CDATA[<p>Returns all databases in the Cosmos DB account. Use this to discover database names and IDs for connection defaults or for querying a specific database. Columns include <code>Id</code>, <code>ResourceId</code>, <code>LastUpdated</code>, and <code>ETag</code>.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM SysDatabases]]></Code>
    </Example>  
	<Example Group="ODBC" Slug="list-containers-tables" Label="List containers (tables)">
      <Desc><![CDATA[<p>Returns all containers (tables/collections) in the default database from the connection. Use to discover container names for <code>SELECT</code> or <code>INSERT</code>. For a different database, use the next example with <code>WITH (Database='...')</code>.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM SysTables]]></Code>
    </Example>
	<Example Group="ODBC" Slug="list-containers-for-database" Label="List containers for a database">
      <Desc><![CDATA[<p>Returns all containers in a specific database by passing the database name in the <code>WITH</code> clause. Use when the connection default database is not the one you need.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM SysTables WITH (Database='MyCosmos DB')]]></Code>
    </Example>	
	<Example Group="ODBC" Slug="list-users" Label="List users">
      <Desc><![CDATA[<p>Returns all users for the default database. Users are used for resource-token permissions (e.g. create a permission and obtain a token for a specific container). Specify the database in <code>WITH</code> if not using the connection default.</p>]]></Desc>
      <Code><![CDATA[SELECT * FROM SysUsers]]></Code>
    </Example>

  </Examples>

</ApiConfig>