Clivern/Rabbit

REST API for Projects

Clivern opened this issue · 0 comments

New Project

$ curl -X POST \
 "http://localhost:8080/api/project" \
 -d '{"name":"beaver", "url":"https://github.com/Clivern/Beaver.git", "version":"1.2.0"}'

Get Project

$ curl -X GET \
 "http://localhost:8080/api/project/2c6ff23e-4e9b-489f-b191-573e1c1e5f43" \
 -d '' | python3 -m json.tool

{
    "name": "beaver",
    "uuid": "2c6ff23e-4e9b-489f-b191-573e1c1e5f43",
    "url": "https://github.com/Clivern/Beaver.git",
    "releases": {
        "1.2.0": {
            "version": "1.2.0",
            "created_at": "2019-06-05T23:49:01.126518+02:00",
            "binaries": [
                {
                    "file_name": "beaver_1.2.0_darwin_x86_64.tar.gz",
                    "checksum": "3a9c957ca88ad07ba769d20a729248d670ee894cdffe19ae691f0503dc21b615",
                    "checksum_type": "md5sum"
                },
                {
                    "file_name": "beaver_1.2.0_linux_i386.tar.gz",
                    "checksum": "f51f7b30e3968abc95e7596b8127aaeacc50738cf382ddd3817315c8fc768caa",
                    "checksum_type": "md5sum"
                },
                {
                    "file_name": "beaver_1.2.0_linux_x86_64.tar.gz",
                    "checksum": "d32c6c0bc3b83a64d403b0b0aeb7dbf62dd6501d9caeeee66943089415a55c13",
                    "checksum_type": "md5sum"
                },
                {
                    "file_name": "beaver_1.2.0_darwin_i386.tar.gz",
                    "checksum": "624190a9cdeb4b76d4ca9e60221deb899b8a7f063f7cbfe7ac005765103527ad",
                    "checksum_type": "md5sum"
                }
            ]
        }
    },
    "meta": null
}

Get Projects

$ curl -X GET \
 "http://localhost:8080/api/project" \
 -d '' | python3 -m json.tool