Home Page > Integration > REST API > Albums

Albums

Albums - /REST/1/Albums/:id

This endpoint is used for manipulating the Album resource. Objects are always returned in a JSON format within an array. Empty results return an empty array.

 

Object

The Album object takes on the following JSON object:

[
    {  
        "all_users_can_modify" : "<bool>",
        "can_modify" : "<bool>",
        "code" : "<hash>",
        "company_album" : "<bool>",
        "created" : "<datetime>",
        "description" : "<string>",
        "id" : "<int>",
        "locked" : "<bool>",
        "my_album" : "<bool>",
        "name" : "<string>",
        "private_image_count" : "<int>,<int>,<int>,<int>",
        "public_image_count" : "<int>,<int>,<int>,<int>",
        "share_with_all_users" : "<bool>",
        "shared_album" : "<bool>",
        "unapproved_image_count" : "<int>,<int>,<int>,<int>",
        "updated" : "<bool>",
        "user_id" : "<int>"
    }
]

 

GET

This verb is used for retrieving resources, it is subject to the parameters mentioned in the overview and all fields mentioned above are searchable.

 

PUT

This endpoint takes an entire Album Object, or a partial and updates the Object to reflect the provided attributes. The following are editable attributes:

{
    "all_users_can_modify": "<bool>",
    "approved_company_album" : "<bool>",
    "company_album" : "<bool>",
    "description" : "<string>",
    "locked" : "<bool>",
    "name" : "<string>",
    "share_with_all_users" : "<bool>",
    "files": "[int:file_ids]"
}    

 

POST

This endpoint is used for creating a new Album Object. The following are required fields:

{
    "name": "<string>"
}

 

All the fields mentioned in the PUT section can also be supplied on creation.

 

DELETE

This endpoint is used for deleting an Album, below is an example using curl:

curl -u admin:admin http://192.168.1.139/REST/1/Albums/1574 -D - -X DELETE
Last modified
07:16, 20 Mar 2015

Tags

This page has no custom tags.

Classifications

This page has no classifications.