REST API¶
Interface¶
Description of LeoFS’ behavior for each HTTP verb¶
HTTP Verb | LeoFS’ Behavior |
---|---|
PUT/POST | Insert an object into the storage cluster |
GET | Retrieve an object from the storage cluster |
DELETE | Remove an object from the storage cluster |
Examples¶
POST/PUT
$ curl -X POST -H "Content-Type:image/png" \
--data-binary @test.jpg https://hostname:8080/_test/_image/file.png
$ curl -X PUT -H "Content-Type:image/png" \
--data-binary @test.jpg https://hostname:8080/_test/_image/file.png
GET
$ curl -X GET https://hostname:8080/_test/_image/file.png
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6019k 0 6019k 0 0 210M 0 --:--:-- --:--:-- --:--:-- 217M
DELETE
$ curl -X DELETE https://hostname:8080/_test/_image/file.png