Release

View as Markdown

Release

You can define a “Release” as a set of entries and assets that needs to be deployed (published or unpublished) all at once to a particular environment.

clone

The clone method allows you to make a copy of a specific release in the stack.

NameTypeDescription
data (required)data = {

Data you want to send in the request body

data = {

       "release": {

           "name": "New Release Name",

           "description": "2018-12-12"

       }

   }

import contentstack_management

client = contentstack_management.Client(authtoken='your_authtoken')

result = client.stack('api_key').releases('release_uid').clone(data).json()

create

The create method allows you to create a new release in your stack. To add entries/assets to a release, you need to provide the UIDs of the entries/assets in items in the request body.

NameTypeDescription
data (required)Dict

Data you want to send in the request body

data = {

       "release": {

           "name": "Release Name",

           "description": "2018-12-12",

           "locked": false,

           "archived": false

       }

   }

import contentstack_management

client = contentstack_management.Client(authtoken='your_authtoken')

result = client.stack('api_key').releases().create(data).json()

delete

The delete method removes a specific release from your stack.

NameTypeDescription
release_uid (required)str

UID of the release

import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack('api_key').releases('release_uid').delete().json()

deploy

The deploy method will publish/unpublish all the items of the release to the specified environment.

NameTypeDescription
data (required)Dict

Data you want to send in the request body

data = {

          "release": {

           "environments": [

               "development"

           ]

       }

   }

import contentstack_management

client = contentstack_management.Client(authtoken='your_authtoken')

result = client.stack('api_key').releases('release_uid').deploy(data).json()

fetch

The fetch method retrieves the details of a specific release from the stack.

NameTypeDescription
release_uid (required)str

UID of the release

import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack('api_key').releases('release_uid').fetch().json()

find

The find method retrieves the details of all the releases in the stack.

import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack("api_key").releases().find().json()

update

The update method allows you to update the details of a Release.

NameTypeDescription
data (required)Dict

The updated information for the Release

release_uid (required)str

UID of the release

data = {
       "release": {
           "name": "Release Name",
           "description": "2018-12-22"
       }
   }
import contentstack_management
client = contentstack_management.Client(authtoken='your_authtoken')
result = client.stack('api_key').releases("release_uid").update(data).json()