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

Profiles: Release or discard a Metadata Profile

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

##PUT /profiles/:id/release

  • Release a profile with this _:id

##PUT /profiles/:id/discard

  • Discard a profile with this _:id

###Parameters (discard only)

  • discardComment - text representing the discard comment

####Response status codes

#####200 OK Successful release/discard of the profile with provided :id

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

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

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

#####422 Unprocessable Entity

  • For released profiles: Profile can not be released due to validation errors such as: profile has been already released or withdrawn
  • For discarded profiles: Profile can not be discarded due to validation errors such as: profile has been already discarded or is not released.

#####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>/profiles/YgzeK4cLp5LTpA_9/release

####Example request: discard

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

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

See Profiles: Get a single profile example

Clone this wiki locally