Context
I'm searching for an efficient and robust workflow to dump data from API responses to a PostgreSQL database.
Detailed explanation
I have access to a project RESTful API, to which I can send some requests (Fig. 1) and which gives me responses as JSON data.
E.g. when using postman for example, I can build a query using all the parameters that are taken into account by the API, and which may for example looks like:
Fig. 1: Request example in cURL.
The corresponding response looks like a bunch of those:
[
{
"id": "128",
"user": "UUID-981729jqdwm91888r",
"description": {
"producer": "John Wayne",
"title": "Alamo",
"year": 1960
},
"preview": {
"imageURL": "11231068.jpg"
}
},
{
...
}
]
On the other hand, I've a PostgreSQL database (inside a docker container) which is already structured to admit the response data. For example, all the individual film features from the previous result have to be recorded in a table 'films' (Fig. 2).

Fig. 2: An example of what the resulting PostgreSQL table would look like.
The thing is, I don't know from where to start as I always queried the API through my web browser or Postman until now.
Summarized, I have to dump API responses in a structured set of PostgreSQL tables as follow;
one API route that is requested --> one JSON response (with multiple features) --> one PostgreSQL table (with multiple rows)
one row corresponding to one of the response features).
Question
How could I technically do that; would it be possible to build API requests directly in SQL (I have the feeling it's a super bad idea) or do I have to use an other language or tool (for security reasons or simply for practicality)?
When searching the web for such thing I almost always found answer to "how to make API calls to a Postgres database?", which is obviously not what I want.