MongoDB unique Object ID
ID mongodbid
DatatypeNot PIIidentifier
MongoDB ObjectId, the unique id that MongoDB assigns to each document of a collection as the field _id. It is a 12-byte value written as 24 hexadecimal characters. The first 4 bytes are the creation time in seconds since the Unix epoch, then come a 5-byte random value per process and a 3-byte counter, so ObjectIds sort roughly by creation time. The MongoDB manual writes the hexadecimal digits in lowercase. The xid format encodes the same 12 bytes in Base32 (xid). It is not the ArcGIS OBJECTID (objectid).
- Categories
- Universal unique identifiers, Common
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Quality
- 90/100 · missing: mapping (Wikidata, Schema.org, ...)
- Metacrafter rules
- 2 rules (1 by field name, 1 by value)
mongodbidfieldfield, basic/identifiers.yamlmongodbidvaluedata, basic/identifiers.yaml
- Supported by tools
- csv-detective, metacrafter
Regular expression
^[0-9a-fA-F]{24}$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 507f1f77bcf86cd799439011 | Unique MongoDB ObjectID |
| 507f191e810c19729de860ea | Unique MongoDB ObjectID |
| 00000020f51bb4362eee2a4d | ObjectId(32) from the MongoDB manual, 32 seconds after the Unix epoch |
| 507f1f77bcf86cd79943901 invalid | 23 characters instead of 24 |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Идентификатор объекта MongoDB (ObjectId) |
Sources
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/mongodbid - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/identifiers/mongodbid.yamlon GitHub