Creates a Dynamic Content API client instance. You must provide credentials that will be used to authenticate with the API.
Optional configuration settings for Dynamic Content
Optional request settings, can be used to provide proxy settings, add interceptors etc
Content Item Resources
Retrieve a content item resource by id
content item id, previously generated on creation
Content Repository Resources
Retrieve a content repository resource by id
content repository id, previously generated on creation
Gets a content type schemas
ContentTypeSchema id
Gets a content type schemas
ContentTypeSchema id
Version
Content Type Resources
Retrieve a content type resource by id
content type id, previously generated on creation
Edition Resources
Retrieve an edition resource by id
edition id, previously generated on creation
Event Resources
Retrieve an event resource by id
event id, previously generated on creation
Extension Resources
Retrieve an extension resource by id
extension id, previously generated on creation
Retrieve a folder resource by id
folder id, previously generated on creation
Hierarchy Resources
Retrieve children of the associated content item
content item id accociated content item
Retrieve parents of the associated content item
content item id accociated content item
Hub Resources
Retrieve a hub resource by id
hub id, previously generated on creation
Snapshot Resources
Retrieve a snapshot resource by id
snapshot id, previously generated on creation
Workflow States
Retrieve a Workflow State by id
of Workflow State, previously generated on creation
Generated using TypeDoc
Amplience Dynamic Content API client.
Your application should avoid where possible creating a new client for each request. Authentication tokens are cached by the client and only re-requested when they expire, allowing performance to be improved by reusing the client across requests.
If multiple sets of credentials are required your application should create one client per credential set.
Example:
const client = new DynamicContent({ client_id: process.env.CLIENT_ID, client_secret: process.env.CLIENT_SECRET }); const repository = await client.contentRepositories.get('<REPO-ID>'); const contentItem = new ContentItem(); contentItem.label = 'Homepage Article'; contentItem.body = { _meta: { schema: "https://github.com/techiedarren/dc-examples/blob/master/content-types/blocks/text-block.json" }, paragraphs: [ "Example article text..." ] }; await repository.related.contentItems.create(contentItem);