Contentstack

View as Markdown

Contentstack

Contentstack class that exposes Stack instance

stack

The stack method provides access to the stack of your site, allowing users to retrieve and manage content within a single space.

NameTypeDescription
context (required)ApplicationContext

The application context

apiKey (required)String

API Key of your application on Contentstack

deliveryToken (required)String

Delivery Tokens retrieves only the published entries of the environment with which it is associated

environment (required)String

A publishing environment refers to one or more deployment servers or a content delivery destination (Webpage’s address) where you will publish your content (entries or assets).

configConfig

Config instance to set environment and other configuration details.

import com.contentstack.sdk.*;

 

Stack stack = Contentstack.stack(context, "apiKey", "deliveryToken", "environment");

Example with Config:

import com.contentstack.sdk.*; 


Config config = new Config().setHost("api.contentstack.io");

Stack stack = Contentstack.stack(context, "apiKey", "deliveryToken", "environment");