Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Modpacks

Kyle Klaus edited this page Oct 10, 2017 · 6 revisions

Browse all modpacks

Request

GET /api/modpacks HTTP/1.1
Authentication: Bearer some-token

Response

HTTP/1.1 200 OK

    [
        {
            "id": 1,
            "name": "Attack of the B-Team",
            "slug": "attack-of-the-bteam",
            "status": "public",
        },
        {
            "id": 2,
            "name": "Hexxit",
            "slug": "hexxit",
            "status": "public",
        }
    ]

Browse all builds that belong to a modpack

Request

GET /api/modpacks/{modpack_id}/builds HTTP/1.1
Authentication: Bearer some-token

Response

HTTP/1.1 200 OK
Location: UPLOAD_URL

    [
        {
            "id": 1,
            "version": "1.0.0",
        },
        {
            "id": 1,
            "version": "1.2.0",
        }
    ]

Add a modpack

Request

POST /api/modpacks HTTP/1.1
Authentication: Bearer some-token

    {
        "name": "Attack of the B-Team",
        "slug": "attack-of-the-bteam",
        "status": "public",
    }

Response

HTTP/1.1 200 OK

    {
        "id": 1,
        "name": "Attack of the B-Team",
        "slug": "attack-of-the-bteam",
        "status": "public",
    }

Upload a modpack icon

PUT /api/modpacks/{modpack_id}/icon HTTP/1.1
Authorization: Bearer AUTH_TOKEN
Content-Length: CONTENT_LENGTH
Content-Type: image/png

BINARY_FILE_DATA

Response

HTTP/1.1 200 OK

    {
        "id": 1,
        "name": "Attack of the B-Team",
        "slug": "attack-of-the-bteam",
        "status": "public",
    }