BranchAlias

BranchAlias

Methods

(static) update() → {Promise.<Branch.Branch>}

Source:
The Update BranchAlias call lets you update the name of an existing BranchAlias.
Example
import * as contentstack from '@contentstack/management'
const client = contentstack.client()

client.stack({ api_key: 'api_key'}).branchAlias('branch_alias_id').createOrUpdate('branch_uid')
.then((branch) => {
 branch.name = 'new_branch_name'
 return branch.update()
})
.then((branch) => console.log(branch))
Returns:
Promise for Branch instance
Type
Promise.<Branch.Branch>

(static) delete() → {Object}

Source:
The Delete BranchAlias call is used to delete an existing BranchAlias permanently from your Stack.
Example
import * as contentstack from '@contentstack/management'
const client = contentstack.client()

client.stack({ api_key: 'api_key'}).branchAlias('branch_alias_id').delete()
.then((response) => console.log(response.notice))
Returns:
Response Object.
Type
Object

(static) fetch() → {Promise.<Branch.Branch>}

Source:
The fetch BranchAlias call fetches BranchAlias details.
Example
import * as contentstack from '@contentstack/management'
const client = contentstack.client()

client.stack({ api_key: 'api_key'}).branchAlias('branch_alias_id').fetch()
.then((branch) => console.log(branch))
Returns:
Promise for Branch instance
Type
Promise.<Branch.Branch>

(static) fetchAll(limit, skip, include_count) → {ContentstackCollection}

Source:
The Get all BranchAlias request retrieves the details of all the Branch of a stack.
Example
import * as contentstack from '@contentstack/management'
const client = contentstack.client()

client.stack({ api_key: 'api_key'}).branchAlias().fetchAll()
.then((collection) => console.log(collection))
Parameters:
Name Type Description
limit Int The limit parameter will return a specific number of Branch in the output.
skip Int The skip parameter will skip a specific number of Branch in the output.
include_count Boolean To retrieve the count of Branch.
Returns:
Result collection of content of specified module.
Type
ContentstackCollection