--- id: cosmosdb title: CosmosDB --- ToolJet can connect to CosmosDB databases to read and write data. ## Connection To establish a connection with the CosmosDB data source, you can either click on the **+ Add new data source** button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard. ToolJet requires the following to connect to your Cosmos DB. - **Cosmos DB Account End point** - **Cosmos DB Account Key** :::info **Azure Cosmos DB End Point** is the URL of the Cosmos DB service. **Azure Cosmos DB Key** is the key that is used to access the Cosmos DB service. You can find the endpoint and key in the **[Azure Portal](https://portal.azure.com/)**. :::
### List Containers
This query lists all the containers of a database in a Cosmos DB.
#### Required Parameter
- **Database**
### Insert Items
This query inserts one or more items in a container of a database in a Cosmos DB.
#### Required Parameter
- **Database**
- **Container**
- **Items**
#### Example
```yaml
{
"id": "123",
"product": "Laptop",
"price": 1200,
"customer_id": "C001"
}
```
### Read Item
To read a single item from a container of a database in a Cosmos DB, use the following query.
#### Required Parameter
- **Database**
- **Container**
- **Item ID**
### Delete Item
To delete an item from a container of a database in a Cosmos DB, use the following query.
#### Required Parameter
- **Database**
- **Container**
- **Item ID**
### Query Database
To query documents from a container of a database in a Cosmos DB using SQL-like syntax, use the following query.
#### Required Parameter
- **Database**
- **Container**
- **Query**
#### Example
```yaml
SELECT * FROM c WHERE c.age > 20 AND c.age <= 30
```