Import of data into sen4cap database

Dear Sen4CAP team,

I would like to import some data into the sen4cap database, which was not computed by the sen4cap instance I am using.
How can I do it?

Best regards,
Emanuele

Just to provide some more information:
I have tried to get a token with this

curl --request POST --url http://localhost:8080/login --header 'Content-Type: application/x-www-form-urlencoded' --data user=sen4cap --data pwd=sen4cap

but I don’t get any response.

Dear Emanuele,

Could you please provide some information about the data you want to import into the Sen4CAP database? Are these S2 L2A products or S1 AMP or COHE products?
If they are S2 L2A products created with MAJA this is pretty simple (you can use the script insert_l2a_product_to_db.py) otherwise it is more complicated but maybe doable (for ex. if they are THEIA L2A products you can use the script import_theia.sh).

Best regards,
Cosmin

Dear Cosmin,

thank you for your reply! The data are all products of another sen4cap instance.
They are S1 AMP and COHE (S2 L2A worked with the python script, as you suggested).

Some time ago I have imported the data by first getting a token with the command above and then

curl --request GET --url "http://localhost:8080/s1l2/import/l2/{site_short_name}?folder=/path/to/data" --header 'X-Auth-Token: {token}'

But in the meantime I have updated to the latest Sen4CAP version, therefore I am not sure if it still is the correct way.
If it is, I don’t know how to address the problem that I don’t get the token from the POST request above .

Do you have any ideas or suggestions?

Best regards,
Emanuele

Dear Emanuele,

The login request was changed in the latest versions of the Sen4CAP and is now something like:

curl --request POST
–url <YOUR_IP>:8080/login
–header ‘Content-Type: multipart/form-data’
–form user=sen4cap
–form password=sen4cap

Hope this helps.

Best regards,
Cosmin

Dear Cosmin,

thank you very much for your hint! It worked like charm!

Best regards,
Emanuele