Awesome Documentation by Brewhouse!


This file was automatically generated, and can be found at doc/api.md.

Read the blog post at

View the code at

Post

Post a photo

Endpoint

POST /api/posts

Request

Route

POST /api/posts

Headers

Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Host: example.org
Cookie: 

Body

{
  "data": {
    "type": "posts",
    "attributes": {
      "image": "data:image/png;base64,validbase64"
    }
  }
}

Response

Simulated Response

Status

201

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/vnd.api+json
Vary: Accept-Encoding
ETag: W/"bc059bb1f3252bd1f9c4d5234c7c98b9"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: request_method=POST; path=/
X-Request-Id: 584f83d3-3c78-4c10-a3e9-5d7992f8da2f
X-Runtime: 0.139584
Content-Length: 195

Body

{
  "data": {
    "id": "30",
    "type": "posts",
    "links": {
      "self": "http://example.org/api/posts/30"
    },
    "attributes": {
      "image": {
        "image": {
          "url": "https://res.cloudinary.com//image/upload/fptvxlthwcw6nfrut06e.png"
        }
      }
    }
  }
}