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>",
        "approved_company_album" : "<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>"
    }
]

Last updated: July 5th, 2018

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

Examples

OpenAsset C# REST Wrapper

Additional general examples using the OpenAsset C-sharp REST Wrapper are found below. The Wrapper itself can be found at the following github location: https://github.com/axomic/openasset-rest-cs

 

 

Ruby

Ruby code example with Albums Noun.

  //Get a collection of Albums from the REST API. 
 //The Rest Library will serialize the results automatically.

require 'openasset-rest-client'

client = OpenAsset::RestClient.new("url","username","password")

--Get all albums
options = RestOptions.new
options.add_option('limit',0) => ?limit=0
albums  = client.get_albums(options)

--Create album(s)
my_new_album = Albums.new("cool_name")
client.create_albums(my_new_album)

--Update albums
// edit albums
client.update_albums(albums)

--Delete albums
client.delete_albums(albums)


 

 

Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.