Skip to main content

How to View, Edit and Delete Items in Azure Cosmos DB Data Explorer

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

Data Explorer in the Azure portal shows the JSON items in an Azure Cosmos DB container, and lets you change one in place or delete one, without writing any code. Here's each of the three, and what the extra properties that start with an underscore mean.

In Azure Cosmos DB for NoSQL, a container holds items: JSON documents, each with an id. Data Explorer, in the account's menu in the Azure portal, is the built-in tool for looking at them, and it's the quickest way to check what an app has written.

My example is a small notes app's container, notes in the database notesdb, with two notes in it: note-1, Buy milk, and note-2, Call the plumber. The container's partition key is /id.

Prerequisites​

  • A Cosmos DB data role for your account, if the account has key-based authentication turned off. Data Explorer then reads and writes the items as you, and an Azure role such as Owner doesn't include Cosmos DB data.

Step 1: View an Item​

In Data Explorer, expand the database and the container, and select Items. The list shows the container's items by ID; Apply Filter with the box left empty loads all of them again. Select note-1, and its JSON opens on the right:

The notes.Items tab in Data Explorer with the filter SELECT * FROM c, the Apply Filter button, a list of the items note-1 and note-2 with note-1 selected, and on the right note-1's JSON: id note-1, text Buy milk, and the system properties _rid, _self, _etag, _attachments and _ts 1795506553

id and text are what the app wrote. Cosmos DB added the rest, its system properties:

PropertyWhat it is
_ridThe resource ID, a unique identifier Cosmos DB uses internally for placement and navigation
_selfThe unique addressable URI for the resource, made of the database, container and item resource IDs
_etagThe version of the item, required for optimistic concurrency control: it changes with every write
_attachmentsThe addressable path for the attachments resource, for attachments, a feature Microsoft is deprecating
_tsWhen the item was last written, in seconds since 1 January 1970 (Unix time)

1795506553 is 07:49:13 UTC on 24 November 2026, the last time the note was written. Cosmos DB sets the system properties itself; your own data goes in your own properties.

Step 2: Edit an Item​

Click in the JSON on the right and change it like text. I changed "Buy milk" to "Buy milk and eggs", then selected Update in the toolbar:

Data Explorer with note-1 open in the editor, the text property changed to Buy milk and eggs and outlined in red, and the Update button in the toolbar outlined in red, next to New Item, Discard, Delete and Upload Item

The _ts here is newer than in Step 1: the console app had written the note again in between. Data Explorer saved the change and reported Successfully updated item note-1. Update replaces the whole item with what's in the editor, and Cosmos DB gives it a new _etag and _ts: in another run, the _ts went from 1795506553 to 1795506620 when I selected Update.

Step 3: Delete an Item​

Select note-2 in the list, then Delete in the toolbar. Data Explorer asks first:

The Confirm delete dialog with the question Are you sure you want to delete the selected item? and the buttons Delete and Cancel

Check that the selected item is the one you mean, and select Delete. Data Explorer reported Successfully deleted 1 document(s), and the list has one note left:

The notes container's items list with the /id header and one item left, note-1

Common Mistakes​

MistakeWhat happensDo this instead
Editing an item that an app keeps writingThe app's next write replaces your edit: when my console app saved note-1 again, it was Buy milk once moreChange the data through the app, or stop it first
Opening Data Explorer with keys off and no data roleError while reading container, and no itemsGive your account a Cosmos DB data role (Fixed)
Deleting without checking which item is selectedThe selected item is goneRead the ID in the list before you confirm

FAQ​

Why can't I see an item my app just wrote?​

Select Apply Filter to load the list again. If the container has a time to live and the item is older than it, it has expired: an item no longer appears in query responses immediately after the TTL expires.

How do I read _ts as a date?​

It's Unix time, the seconds since 1 January 1970 UTC: 1795506553 is 24 November 2026, 07:49:13 UTC. In C#, DateTimeOffset.FromUnixTimeSeconds turns the number into a date.

Conclusion​

In Data Explorer, Items lists a container's items and shows the JSON of the one you select, with the system properties _rid, _self, _etag, _attachments and _ts beside your own. Change the JSON and select Update to replace the item, or select Delete and confirm to remove it. With key-based authentication off, all of this needs a Cosmos DB data role for your account.

Additional Resources​