Erudika / para

Multitenant backend server for building web and mobile apps rapidly. The backend for busy developers. (self-hosted or hosted)

Home Page:https://paraio.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if I have data in my database, then how can I config the para use the api?

katty0924 opened this issue · comments

if i have data stored in the mysql, how can I config the para, then I can use the api to get the query results?

If the data in MySQL is not created by Para you can't simply configure Para to use it because the schema is different and Para can't understand it automatically. You'll have to transform the data first before Para can access it. You'll also have to denormalize all tables.

Otherwise, if you want to load the SQL plugin follow these steps:

  1. Place the plugin JAR in a folder called lib in the same folder as the Para server or include the plugin through Maven
  2. Set the configuration property para.dao = "SqlDAO" in application.conf
  3. Start the Para server and the new plugin should be loaded (check logs to make sure)
  4. Access localhost:8080/v1 to use the API and read the API docs

so , if i already have data in redis or other database(in json format), and i want to use para to provide restful api to query, the thing that i can do firstly is using para api such as POST /v1/_batch or POST /v1/{type} to load the data into configured database in para? then i can use the api to query ?