Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Albums: Release or Discard an album

Natasa Bulatovic edited this page Jun 3, 2016 · 4 revisions

##PUT /albums/:id/release

  • Releases an album with this album _:id

##PUT /albums/:id/discard

  • Discard an album with this album _:id

###Parameters (discard only)

  • discardComment - text representing the discard comment

####Response status codes #####200 OK Successful release/discard of the album with provided :id

#####404 Not found The album with provided :id is not found (does not exist)

#####401 Unauthorized Authentication is necessary to release/discard this album

#####403 Forbidden Wrong credentials provided to release/discard this album

#####422 Unprocessable Entity

  • For released Albums: Album can not be released due to validation errors such as: album has been already released or withdrawn; album has not items;
  • For discarded Albums: Album can not be discarded due to validation errors such as: album has been already discarded;

#####405 Method not supported (private mode only) If the imeji Instance runs in a private mode, no release or discard of objects is allowed.

####Example request: release

curl --user admin:admin \ --request PUT \ https://<baseurl>/albums/YgzeK4cLp5LTpA_9/release

####Example request: discard

curl --user admin:admin \ --request PUT \ --data '{"This is a discard comment"}' \ https://<baseurl>/albums/YgzeK4cLp5LTpA_9/discard

####Example response By successful release/discard, this method should return 200 OK as response code + JSON representation of the updated album.

See Albums: Get a single album example

Clone this wiki locally