Page 1 of 1

API create lab

Posted: Thu Mar 25, 2021 6:52 pm
by robort
Hey,

i have trouble to use the API. I'm not able to create a lab. Even when i use the example from https://www.eve-ng.net/index.php/docume ... ve-ng-api/

Code: Select all

curl -k -s -b /tmp/cookie -c /tmp/cookie -X POST -d '{"username":"admin","password":"eve"}' https://192.168.188.92/api/auth/login
{"code":200,"status":"success","message":"User logged in (90013)."}%

Code: Select all

curl -k -s -c /tmp/cookie -b /tmp/cookie -X POST -d '{"path":"/,"name":"NewLab","version":"1","author":"User1 Lastname","description":"A new demolab","body":"Lab usage and guide"}' -H 'Content-type: application/json' https://192.168.188.92/api/labs
{"code":400,"status":"fail","message":"Cannot create lab, invalid or missing mandatory parameters (60017)."}%
Version: 4.0.1-16-PRO

Re: API create lab

Posted: Thu Mar 25, 2021 8:55 pm
by ecze
This documentation concern EVE community mainly.....

For Pro, it is advised to use Dev tools from your browser to collect all parameters used for API calls..

Regards,

E.

Re: API create lab

Posted: Mon Apr 25, 2022 3:06 pm
by jnaranjo
Ecze,

Just following up on this thread. Could you please elaborate a bit more on your reply? Do you think you could provide an example of how to use the Dev Tools you mentioned?

Thanks!

Re: API create lab

Posted: Mon Feb 17, 2025 4:32 pm
by Lychos1985
hi,

I had the same issue but, I solved.

You need to create a folder and then create a lab because of you are created a lab on root folder!

{
"path": "/<<your_folder>>"
"name": "<<your_new_lab>>"
}