Images


All Images

You can get a list of all the images of a campaign by using the following endpoint. This is a superboosted campaign feature! If the campaign isn't superboosted, this API endpoint will result in a 404.

{warning} Don't forget that all endpoints documented here need to be prefixed with api/1.0/campaigns/{campaign.id}/.

Method Endpoint Headers
GET/HEAD images Default

Results

{
    "data": [
        {
            "id": "037494f8-1875-4e88-9de9-72efa4bfae11",
            "name": "attr",
            "is_folder": false,
            "folder_id": null,
            "path": "{url}",
            "ext": "png",
            "size": 1147,
            "created_at": "2020-11-15T10:42:38.000000Z",
            "created_by": 1,
            "updated_at": "2020-11-15T10:42:38.000000Z"
        },
        {
            "id": "0acd32f5-3286-4ffe-b82a-4e1e61c455c4",
            "name": "Blablabla Q&A",
            "is_folder": false,
            "folder_id": null,
            "path": "{url}",
            "ext": "jpeg",
            "size": 7201,
            "created_at": "2020-11-15T10:39:11.000000Z",
            "created_by": 1,
            "updated_at": "2020-11-15T10:39:20.000000Z"
        }
    ]
}

Image

To get the details of a single image, use the following endpoint.

Method Endpoint Headers
GET/HEAD images/{image.id} Default

Results

{
    "data":
    {
        "id": "0acd32f5-3286-4ffe-b82a-4e1e61c455c4",
        "name": "Blablabla Q&A",
        "is_folder": false,
        "folder_id": null,
        "path": "{url}",
        "ext": "jpeg",
        "size": 7201,
        "created_at": "2020-11-15T10:39:11.000000Z",
        "created_by": 1,
        "updated_at": "2020-11-15T10:39:20.000000Z"
    }

}

Create a Image

To create a image, use the following endpoint.

Method Endpoint Headers
POST images Default

Body

Parameter Type Detail
folder_id integer The image's folder id
image stream Stream to file uploaded

Results

{success} Code 200 with JSON body of the new image.

Update a Image

To update a image, use the following endpoint.

Method Endpoint Headers
PUT/PATCH images/{image.id} Default

Body

Parameter Type Detail
folder_id integer The image's folder id
name string The image's name

Results

{success} Code 200 with JSON body of the updated image.

Delete a Image

To delete a image, use the following endpoint.

Method Endpoint Headers
DELETE images/{image.id} Default

Results

{success} Code 200 with JSON.

Create a folder

Creating a folder is currently not supported by the Kanka API.