Hosting

View as Markdown

Hosting

The hosting class retrieves the details about the hosting configuration of an app.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid');

isEnable

The isEnable method retrieves the OAuth details of the app.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});


client.marketplace('organization_uid').app('manifest_uid').hosting().isEnable()

.then((data) => console.log(data));

enable

The enable method enables the hosting of an app.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid').hosting().enable()

.then((data) => {});

disable

The disable method disables the hosting of an app.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid').hosting().disable()

.then((data) => {});

createUploadUrl

The createUploadUrl method creates a signed url for file upload.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid').hosting().createUploadUrl()

.then((data) => {});

latestLiveDeployment

The latestLiveDeployment method retrieves the details of the latest deployment of the source file.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid').hosting().latestLiveDeployment()

.then((data) => {});

deployment

The deployment method creates an instance of Hosting deployment.

Example:

import * as contentstack from '@contentstack/marketplace-sdk'

const client = contentstack.client({ authtoken: 'TOKEN'});

client.marketplace('organization_uid').app('manifest_uid').hosting().deployment();