REST API doesn't work for me

leimaohui
 

Hi, all

I tried fossology REST API but failed. The following is my steps.

step1.Start the latest fossology docker.
--------------------------------------------
$ sudo docker run -d -p 8081:80 fossology/fossology:latest
390d501fec6e773340ff466c9876cf4d2155562748ed1e749d5457d490ad516e
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
390d501fec6e fossology/fossology:latest "/fossology/docker..." 18 seconds ago Up 4 seconds 0.0.0.0:8081->80/tcp focused_jepsen
--------------------------------------------

step2. Tried REST API, but failed.
--------------------------------------------
$ curl -k -s -S -u fossy:fossy -X GET http://localhost:8081/repo/api/v1/folders
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /repo/api/v1/folders was not found on this server.</p>
<hr>
<address>Apache/2.4.10 (Debian) Server at localhost Port 8081</address>
</body></html>
--------------------------------------------

I wonder if there is something error in my steps. Who can give me some suggestions?

Best regard
Lei Maohui

Join fossology@lists.fossology.org to automatically receive all group messages.