Supported Formats: json


GET /v1/designs/:design_id/images Load all images of a design

Supported Formats

json

Examples

Request

GET /v1/designs/yozio-5/images?auth_token=KFopzjihgRbwJahsxbYN

Response

200
[
  {
    "id": 14,
    "name": "Latz",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>",
    "user_id": 19,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/14/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/14/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/14/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/14/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/14/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/14/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/14/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/14/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/14/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/14/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/14/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.559+02:00",
    "updated_at": "2016-06-10T12:16:57.559+02:00",
    "contribution_id": null
  },
  {
    "id": 13,
    "name": "Aivee",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
    "user_id": 18,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/13/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/13/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/13/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/13/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/13/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/13/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/13/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/13/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/13/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/13/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/13/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.497+02:00",
    "updated_at": "2016-06-10T12:16:57.497+02:00",
    "contribution_id": null
  },
  {
    "id": 12,
    "name": "Centidel",
    "description": "",
    "user_id": 17,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/12/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/12/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/12/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/12/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/12/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/12/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/12/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/12/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/12/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/12/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/12/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.430+02:00",
    "updated_at": "2016-06-10T12:16:57.430+02:00",
    "contribution_id": null
  },
  {
    "id": 11,
    "name": "Yodel",
    "description": "",
    "user_id": 16,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/11/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/11/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/11/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/11/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/11/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/11/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/11/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/11/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/11/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/11/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/11/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.346+02:00",
    "updated_at": "2016-06-10T12:16:57.346+02:00",
    "contribution_id": null
  },
  {
    "id": 10,
    "name": "Zoonder",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>",
    "user_id": 15,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/10/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/10/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/10/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/10/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/10/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/10/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/10/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/10/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/10/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/10/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/10/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.256+02:00",
    "updated_at": "2016-06-10T12:16:57.256+02:00",
    "contribution_id": null
  },
  {
    "id": 9,
    "name": "Devcast",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>",
    "user_id": 14,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/9/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/9/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/9/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/9/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/9/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/9/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/9/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/9/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/9/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/9/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/9/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.201+02:00",
    "updated_at": "2016-06-10T12:16:57.201+02:00",
    "contribution_id": null
  },
  {
    "id": 8,
    "name": "Youtags",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 13,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/8/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/8/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/8/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/8/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/8/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/8/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/8/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/8/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/8/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/8/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/8/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.146+02:00",
    "updated_at": "2016-06-10T12:16:57.146+02:00",
    "contribution_id": null
  },
  {
    "id": 7,
    "name": "Skivee",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
    "user_id": 12,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/7/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/7/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/7/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/7/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/7/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/7/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/7/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/7/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/7/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/7/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/7/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.090+02:00",
    "updated_at": "2016-06-10T12:16:57.090+02:00",
    "contribution_id": null
  },
  {
    "id": 6,
    "name": "Twitterbridge",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
    "user_id": 11,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/6/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/6/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/6/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/6/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/6/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/6/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/6/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/6/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/6/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/6/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/6/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:57.034+02:00",
    "updated_at": "2016-06-10T12:16:57.034+02:00",
    "contribution_id": null
  },
  {
    "id": 5,
    "name": "Mita",
    "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>",
    "user_id": 10,
    "imagable_id": 5,
    "imagable_type": "Design",
    "file": {
      "url": "/spec_uploads/image/file/5/example.jpg",
      "small": {
        "url": "/spec_uploads/image/file/5/small_example.jpg"
      },
      "medium": {
        "url": "/spec_uploads/image/file/5/medium_example.jpg"
      },
      "large": {
        "url": "/spec_uploads/image/file/5/large_example.jpg"
      },
      "span4": {
        "url": "/spec_uploads/image/file/5/span4_example.jpg"
      },
      "span2": {
        "url": "/spec_uploads/image/file/5/span2_example.jpg"
      },
      "span1": {
        "url": "/spec_uploads/image/file/5/span1_example.jpg"
      },
      "mini": {
        "url": "/spec_uploads/image/file/5/mini_example.jpg"
      },
      "grid": {
        "url": "/spec_uploads/image/file/5/grid_example.jpg"
      },
      "carousel": {
        "url": "/spec_uploads/image/file/5/carousel_example.jpg"
      },
      "carousel_thumb": {
        "url": "/spec_uploads/image/file/5/carousel_thumb_example.jpg"
      }
    },
    "created_at": "2016-06-10T12:16:56.975+02:00",
    "updated_at": "2016-06-10T12:16:56.975+02:00",
    "contribution_id": null
  }
]

GET /v1/designs/:design_id/images/:id Load a specific image of a design by ID

Supported Formats

json

Examples

Request

GET /v1/designs/avamba-3/images/3?auth_token=8poxXxsRxvv5v22cbQ4y

Response

200
{
  "id": 3,
  "name": "Meetz",
  "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
  "user_id": 6,
  "imagable_id": 3,
  "imagable_type": "Design",
  "file": {
    "url": "/spec_uploads/image/file/3/example.jpg",
    "small": {
      "url": "/spec_uploads/image/file/3/small_example.jpg"
    },
    "medium": {
      "url": "/spec_uploads/image/file/3/medium_example.jpg"
    },
    "large": {
      "url": "/spec_uploads/image/file/3/large_example.jpg"
    },
    "span4": {
      "url": "/spec_uploads/image/file/3/span4_example.jpg"
    },
    "span2": {
      "url": "/spec_uploads/image/file/3/span2_example.jpg"
    },
    "span1": {
      "url": "/spec_uploads/image/file/3/span1_example.jpg"
    },
    "mini": {
      "url": "/spec_uploads/image/file/3/mini_example.jpg"
    },
    "grid": {
      "url": "/spec_uploads/image/file/3/grid_example.jpg"
    },
    "carousel": {
      "url": "/spec_uploads/image/file/3/carousel_example.jpg"
    },
    "carousel_thumb": {
      "url": "/spec_uploads/image/file/3/carousel_thumb_example.jpg"
    }
  },
  "created_at": "2016-06-10T12:16:56.602+02:00",
  "updated_at": "2016-06-10T12:16:56.602+02:00",
  "contribution_id": null
}

POST /v1/designs/:design_id/images Add an image to a design

Params

Param nameDescription
image
required

Value:

Must be hash

image[name]
optional

name of the image (file name is used by default)


Value:

Must be string.

image[description]
optional

description of the image


Value:

Must be text/html.

image[file]
required

an image file (jpg, jpeg, tiff, bmp or png)


Value:

Must be file.

Supported Formats

json

Examples

Request

POST /v1/designs/gabvine-1/images?auth_token=vyM5hyDtgxSouaEL3Nym
Content-Type: multipart/form-data; boundary=APIPIE_RECORDER_EXAMPLE_BOUNDARY

--APIPIE_RECORDER_EXAMPLE_BOUNDARY
Content-Disposition: form-data; name="image[file]"; filename="example.jpg"
Content-Type: text/plain
Content-Length: 125

... contents of "image[file]" ...
--APIPIE_RECORDER_EXAMPLE_BOUNDARY--

Response

201
{
  "id": 1,
  "name": "Linktype",
  "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
  "user_id": 1,
  "imagable_id": 1,
  "imagable_type": "Design",
  "file": {
    "url": "/spec_uploads/image/file/1/example.jpg",
    "small": {
      "url": "/spec_uploads/image/file/1/small_example.jpg"
    },
    "medium": {
      "url": "/spec_uploads/image/file/1/medium_example.jpg"
    },
    "large": {
      "url": "/spec_uploads/image/file/1/large_example.jpg"
    },
    "span4": {
      "url": "/spec_uploads/image/file/1/span4_example.jpg"
    },
    "span2": {
      "url": "/spec_uploads/image/file/1/span2_example.jpg"
    },
    "span1": {
      "url": "/spec_uploads/image/file/1/span1_example.jpg"
    },
    "mini": {
      "url": "/spec_uploads/image/file/1/mini_example.jpg"
    },
    "grid": {
      "url": "/spec_uploads/image/file/1/grid_example.jpg"
    },
    "carousel": {
      "url": "/spec_uploads/image/file/1/carousel_example.jpg"
    },
    "carousel_thumb": {
      "url": "/spec_uploads/image/file/1/carousel_thumb_example.jpg"
    }
  },
  "created_at": "2016-06-10T12:16:56.240+02:00",
  "updated_at": "2016-06-10T12:16:56.240+02:00",
  "contribution_id": null
}

PATCH /v1/designs/:design_id/images/:id Update a design's image

PUT /v1/designs/:design_id/images/:id Update a design's image

Params

Param nameDescription
image
required

Value:

Must be hash

image[name]
optional

name of the image (file name is used by default)


Value:

Must be string.

image[description]
optional

description of the image


Value:

Must be text/html.

image[file]
required

an image file (jpg, jpeg, tiff, bmp or png)


Value:

Must be file.

Supported Formats

json

Examples

Request

PUT /v1/designs/fivespan-2/images/2?auth_token=ABVcZbeW6boQ9xvibr_8
  • image[name] = Foobar

Response

204

DELETE /v1/designs/:design_id/images/:id Delete a single image

Supported Formats

json

Examples

Request

DELETE /v1/designs/browsebug-4/images/4?auth_token=qBa8PBgFWYNysVxfq_Um

Response

204