# Automatic ID \[Jun 16\]

**URL:** <https://community.nocodb.com/t/automatic-id-jun-16/546>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546 "2022-11-03T10:10:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/1 "2022-11-03T10:10:00Z")

</div>

> 🙋‍♂️ **geocoast** _asked_

## Hello, I’ve not much experience so this might be simple but I have an json REST api that can successfully output data to nocodb but I can’t generate an “id” field to send (it is just a sensor outputting time and temperature). Is there a way to get nocodb to automatically generate the “id” or does the “id” have to be generated externally?

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/2 "2022-11-03T10:10:01Z")

</div>

> 💁 **o1lab** _replied_

#### when you create a table in nocodb - we generate an id which is set to autoincrement

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/3 "2022-11-03T10:10:02Z")

</div>

> 🙋‍♂️ **geocoast** _replied_

#### Thanks for the response - my problem is that it seems nocoDB requires an “Id” field. I am using REST POST api from a source that can’t send an incrementing “Id” field just sensor values. If I try to send the JSON formatted fields without an “Id” field I get a 400 Error. I guess I’m asking if there is a way for nocoDB to work out that there is no Id value and automatically add one to inputs coming from the POST api. I can add a timestamp field as “Id” but that doesn’t seem to work. Any possible workarounds would be appreciated.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/4 "2022-11-03T10:10:03Z")

</div>

> 💁 **o1lab** _replied_

#### can u pls confirm if you are using this api

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/5 "2022-11-03T10:10:04Z")

</div>

> 💁 **o1lab** _replied_

#### [https://apis.nocodb.com/#tag/DB-table-row/operation/db-table-row-create](https://apis.nocodb.com/#tag/DB-table-row/operation/db-table-row-create)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/6 "2022-11-03T10:10:05Z")

</div>

> 💁 **o1lab** _replied_

#### it works as you are proposing

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/7 "2022-11-03T10:10:06Z")

</div>

> 💁 **o1lab** _replied_

#### and wht are the error like on server side

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/8 "2022-11-03T10:10:07Z")

</div>

> 🙋‍♂️ **geocoast** _replied_

#### Hi, yes that is the api I am using. I was trying to follow the example schema from the api documents:Example Value

#### Schema

#### {

#### “Id”: 0,

#### “CreatedAt”: “string”,

#### “UpdatedAt”: “string”,

#### “time”: 0,

#### “precipMax”: 0

#### }

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/9 "2022-11-03T10:10:09Z")

</div>

> 🙋‍♂️ **geocoast** _replied_

#### However when I removed the “Id” and created/updated fields from the JSON I was sending and just sent the values the “Id” was correctly autogenerated. Seems like by adding the created/updated fields I was preventing the “Id” from being autogenerated. I’m sure this might be obvious to others but perhaps the example schema should not include the autogenerated variables? The link you sent about the api didn’t have these so perhaps they should be removed from the examples in the installed version NocoDB: API Docs. Again this may not be a problem for many users but may help inexperience ones like myself! Thanks again for helping to get me on the right path.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:10am UTC](https://community.nocodb.com/t/automatic-id-jun-16/546/10 "2022-11-03T10:10:10Z")

</div>

[Autogenerated from discord](https://discord.com/channels/661905455894888490/986281262035648522)

* * *

#### Join [NocoDB’s](http://www.nocodb.com/) community

[Discord](https://discord.gg/5RgZmkW) • [Twitter](https://twitter.com/nocodb) • [Reddit](https://www.reddit.com/r/NocoDB/) • [Docs](https://docs.nocodb.com/)
