New To Strapi... What's the database for? And my own custom REST end points?

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

I am loving Strapi. I have been evaluating it for an intranet application, and I have some questions:

  1. What is the database used for ? And why do I need it if I have the REST API layer ?
  2. How can I use my own REST API end points? Say I already have some end points deployed that do the basic GetOne, GetList, Save, etc. Is there some kind of Data Provider that can “translate” or convert if you will, my return json to what Strapi expects ?

Welcome to the Strapi Community @Christopher101 :cake:
To try answer some of your questions.

  1. You will need to have a database to store values that are saved in the application. Else each time you would restart you would lose all the data, think of it like persistent storage. Like RAM vs a Harddrive.
  2. You can use your own RESTpoints etc from a collection or your own check out the docs here.
    REST API | Strapi Documentation

It will take what’s in the database and from there and translate to JSON which the frontend can use.
Is the simplest answer.

Thank you @Eventyret . Follow up questions :

(1) So I can “connect” Strapi straight to a database instead of saving data through an API ?

(2) Ok, but what If I have REST points ready that don’t conform to the JSON schema of Strapi’s REST API? Can I write a custom data provider ? Because If this capability is missing then I will have to change my existing API end points.