Skip to content

Media Album

Media albums contain audio, video, and images with captions and tagging. Below are the fields and endpoints for working with media albums in the API.

Field Name Description Type
Title* title The album title. string
Description description The album description. string
Comments setting setting_comments Whether or not comments are enabled for media album content (0 or 1). {0,1}
Member post setting setting_member_post Whether or not non-admins can add content to the media album (0 or 1). {0,1}
Published published Whether or not the media album is published (0 or 1). {0,1}
Photo count photo_count The number of images in the album. integer
Video count video_count The number of video files in the album. integer
Audio count audio_count The number of audio files in the album. integer
Cover image URL cover_image_url The full URL of the cover image. string
Created timestamp created The unix timestamp when the media album was created. integer

* = Required

View a list of albums for the given realm. Optional query parameter:

  • withcontent=1: include the contents of the album in the response

Return A list of album objects

{
"album": [
{
"id": 5692169,
"title": "My media album",
"description": "",
"setting_comments": 1,
"setting_member_post": 0,
"photo_count": 0,
"video_count": 0,
"audio_count": 0,
"created": 1388170669,
"available": 1,
"completed": 0,
"completion_status": "",
"links": {
"self": "http:\/\/...\/v1\/album\/5692169"
}
}
],
"total": 1,
"links": {
"self": "http:\/\/...\/albums?start=0&limit=20"
}
}

View a specified album

Return An album

{
"album": [
{
"id": 5692169,
"title": "My media album",
"description": "",
"setting_comments": 1,
"setting_member_post": 0,
"photo_count": 0,
"video_count": 0,
"audio_count": 0,
"created": 1388170669,
"available": 1,
"completed": 0,
"completion_status": "",
"links": {
"self": "http:\/\/...\/v1\/album\/5692169"
}
}
],
"total": 1,
"links": {
"self": "http:\/\/...\/albums?start=0&limit=20"
}
}

View specified album content

Return An album

{
"album": [
{
"id": 5692169,
"title": "My media album",
"description": "",
"setting_comments": 1,
"setting_member_post": 0,
"photo_count": 1,
"video_count": 0,
"audio_count": 0,
"created": 1388170669,
"available": 1,
"completed": 0,
"cover_image_url": "http:\/\/...\/52bdcf1fa3119.jpg",
"completion_status": "",
"links": {
"self": "http:\/\/...\/v1\/album\/5692169"
}
}
],
"total": 1,
"links": {
"self": "http:\/\/...\/albums?start=0&limit=20"
}
}

Create an album

Content An object containing album fields

{
"title": "This album was created through api",
"description": "this is new api media album",
"setting_comments": "1",
"setting_member_post": "1",
"published": "1"
}

Return The created album object

{
"id": 5692169,
"title": "My media album",
"description": "This is a media album",
"setting_comments": 1,
"setting_member_post": 0,
"photo_count": 0,
"video_count": 0,
"audio_count": 0,
"created": 1388170669,
"available": 1,
"completed": 0,
"links": {
"self": "http:\/\/...\/v1\/album\/5692169"
}
}

Create album content. For file uploading details see File Uploading.

Content Example request with file-attachment and extras

{
"file-attachment": {
"id": [213123234, 213123235]
},
"extras": [
{
"fid": 213123234,
"caption": "A beautiful view",
"display_order": 1
},
{
"fid": 213123235,
"caption": "A beautiful view again",
"display_order": 2
}
]
}

Return Created content objects

{
"content": [
{
"id": 17861,
"album_id": 5692169,
"type": "image",
"caption": "A beautiful view",
"display_order": 2,
"created": 1388171561,
"album_cover": 0,
"converted_url": null,
"converted_filesize": null,
"converted_md5_checksum": null,
"content_url": "http:\/\/...\/5692169\/52bdd12925164.jpg",
"content_filesize": "3825",
"content_md5_checksum": "69392e30b6",
"thumbnail_url": "http:\/\/...\/5692169\/52bdd12925164.jpg",
"thumbnail_dimensions": "172x172",
"content_dimensions": "600x600"
}
]
}

Update a specified album

Content An object containing album fields to update

{
"description": "this new album does not allow comments",
"setting_comments": "0"
}

Update specified album content

Content An object containing album content fields

{
"caption": "See my caption text"
}

Delete an album (cannot be undone)

Delete album content (cannot be undone)