Object returned from the server with updated metadata.
Creates a new task for an entry
Object representation of the Task to be created
Promise for the newly created Task
Deletes this object on the server.
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Gets a snapshot of an entry
Id of the snapshot
Gets all snapshots of an entry
Gets a task of an entry
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '
client.getSpace('<task-id>
))
.then((task) => console.log(task))
.catch(console.error)
Gets all tasks of an entry
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '
client.getSpace('
Checks if entry is archived. This means it's not exposed to the Delivery/Preview APIs.
Checks if the entry is in draft mode. This means it is not published.
Checks if the entry is published. A published entry might have unpublished changes
Checks if the entry is updated. This means the entry was previously published but has unpublished changes.
Sends an JSON patch to the server with any changes made to the object's properties
Object returned from the server with updated changes.
Publishes the object
Object returned from the server with updated metadata.
Recursively collects references of an entry and their descendants
Unarchives the object
Object returned from the server with updated metadata.
Unpublishes the object
Object returned from the server with updated metadata.
Sends an update to the server with any changes made to the object's properties
Object returned from the server with updated changes.
Archives the object
const contentful = require('contentful-management') const client = contentful.createClient({ accessToken: '<content_management_api_key>' }) client.getSpace('<space_id>') .then((space) => space.getEnvironment('<environment_id>')) .then((environment) => environment.getEntry('<entry_id>')) .then((entry) => entry.archive()) .then((entry) => console.log(`Entry ${entry.sys.id} archived.`)) .catch(console.error)