Available methods:
See also:
Required API scope: public:read
Optional API scope: private:read
GET /api/v1/photos
[
{
"guid": "0a992a10b9db0133e40e406c8f31e210",
"post": "b50abae085ff0134029244b301d53d2d",
"created_at": "2016-11-06T03:43:03.382Z",
"dimensions": {
"height": 1200,
"width": 1600
},
"sizes": {
"raw": "http://example.com/uploads/images/6ce0597695a878c4663.jpg",
"large": "http://example.com/uploads/images/scaled_full_f6ce0597695a878c4663.jpg",
"medium": "http://example.com/uploads/images/thumb_medium_f6ce0597695a878c4663.jpg",
"small": "http://example.com/uploads/images/thumb_small_f6ce0597695a878c4663.jpg"
}
},
{
"guid": "114999c0b9db0133e40e406c8f31e210",
"post": "c32c73a085ff0134029244b301d53d2d",
"created_at": "2016-11-06T03:42:27.807Z",
"dimensions": {
"height": 1200,
"width": 1600
},
"sizes": {
"raw": "http://example.com/uploads/images/c384f99eda7f19dfe78c.jpg",
"large": "http://example.com/uploads/images/scaled_full_c384f99eda7f19dfe78c.jpg",
"medium": "http://example.com/uploads/images/thumb_medium_c384f99eda7f19dfe78c.jpg",
"small": "http://example.com/uploads/images/thumb_small_c384f99eda7f19dfe78c.jpg"
}
}
]
Required API scope: public:read
or private:read
depending on the photo visibility
GET /api/v1/photos/:photo_guid
{
"guid": "114999c0b9db0133e40e406c8f31e210",
"post": "c32c73a085ff0134029244b301d53d2d",
"created_at": "2016-11-06T03:42:27.807Z",
"dimensions": {
"height": 1200,
"width": 1600
},
"sizes": {
"raw": "http://example.com/uploads/images/c384f99eda7f19dfe78c.jpg",
"large": "http://example.com/uploads/images/scaled_full_c384f99eda7f19dfe78c.jpg",
"medium": "http://example.com/uploads/images/thumb_medium_c384f99eda7f19dfe78c.jpg",
"small": "http://example.com/uploads/images/thumb_small_c384f99eda7f19dfe78c.jpg"
}
}
pending
might get used if the uploaded photo is intended to get used as a post attachment. Do not upload unused images since pending uploads might get deleted after some timeout without further warnings.
Required API scope: public:modify
or private:modify
depending on the photo visibility
POST /api/v1/photos
Photo file as POST multipart payload with a matching mime-type (use application/octet-stream
if in doubt).
Name | Type | Description |
---|---|---|
pending | boolean | Set true if the photo should not be published but stored for later. |
set_profile_picture | boolean | Set true if the uploaded photo should be used as the new profile picture. |
{
"guid": "114999c0b9db0133e40e406c8f31e210",
"post": "c32c73a085ff0134029244b301d53d2d",
"created_at": "2016-11-06T03:42:27.807Z",
"dimensions": {
"height": 1200,
"width": 1600
},
"sizes": {
"raw": "http://example.com/uploads/images/c384f99eda7f19dfe78c.jpg",
"large": "http://example.com/uploads/images/scaled_full_c384f99eda7f19dfe78c.jpg",
"medium": "http://example.com/uploads/images/thumb_medium_c384f99eda7f19dfe78c.jpg",
"small": "http://example.com/uploads/images/thumb_small_c384f99eda7f19dfe78c.jpg"
}
}
Note that deleting a photo will not remove items where it was attached to, like posts.
Required API scope: public:modify
or private:modify
depending on the photo visibility
DELETE /api/v1/photos/:photo_guid
Status: 204 No Content