Skip to main content
All CollectionsFAQsDataseeding Quest
To add an item, should I utilize the items API call or should I add it directly to DB?
To add an item, should I utilize the items API call or should I add it directly to DB?
Wilco eng avatar
Written by Wilco eng
Updated over 2 years ago

Great question!

To add items you have a couple of options:

  • Connect directly to the DB and insert some records. By doing this you bypass the application code and might miss some checks.

  • Use the API. This can be complicated since your application might have some prerequisites when communicating with, such as authorization tokens. Also - you need to make sure your system is up and running, and it might be problematic or slow.

  • Use a seed script. That way you can use the application code to populate many records in a single run, and save time for others.

Seeds script will usually use you app code (your models), so you can leverage the application logic that might add data or validate some of it.

Did this answer your question?