About APIs and Primary Keys

If you expose some of your data to the public via APIs, make sure to use UUIDs or unique-string IDs for your objects. If you use incremental IDs, hackers will see how many items approximately you have in the database and that may be used to exploit your system.

Tips and Tricks Security Databases Django 4.2 Django 3.2 Django 2.2 PostgreSQL MySQL