Skip to content

API Doc: Image Access

Carson McLean edited this page Nov 30, 2016 · 2 revisions

GET /api/images/{IMAGE_ID}

Used to get an image stored on our DB. Used with HTTP GET, {IMAGE_ID} is the UUID of the image, which is required.
A post has a reference to the image, and vice versa.

It returns a JSON which is an object and contains the Base64 data of the image which is ready to be put into an img.src of an html element.

Here is an example:
GET /api/images/bee310fc-6067-459b-8c6a-d943515a39fb HTTP/1.1
Header: Value

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "imagedata": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/7QCcUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAIAcAmcAFEhNTG1XdlgxSlVfV056R25xZWxKHAIoAGJGQk1EMDEwMDBhOWEwZDAwMDBmZDI3MDAwMG/RP6r7J8VD4rHDWJVIpUYkQAeVlJYhisfsr/jv6r/jv6r/jv6r/AI7+q/47+q/47+q/47+q+sfFOwoAuYP4n/5r/N//2Q=="
}

Clone this wiki locally