Published / Draft
Published / Draft feature
The Published / Draft feature is a mechanism that allows a draft data set to exist in parallel with the published one which is used by default.
This allows work to be done on a data set without affecting the data used on the final application. Once done you can publish the draft data on the Studio.
For more details please check the Studio documentation
By default the entityManager will load the Publish state, if you want to play with the Draft data set you can specify the state on the EntityManager options.
import { EntityManager, STATES } from '@adactive/adsum-client-api';
// Create an entityManager using the API credentials
const entityManager = new EntityManager({
"endpoint": "https://api.adsum.io",
"site": 322,
"username": "323-device",
"key": "343169bf805f8abd5fa71a4f529594a654de6afbac70a2d867a8b458c526fb7d",
"state": STATES.DRAFT,
});
// Load the data
entityManager.load().then(() => {
// Retrieve the DRAFT data set
});