Calling the Content Management API using the JavaScript SDK

Follow

Managing content from outside of the CMS has never been easier. The Content Management JS SDK allows developers to create/update, or apply workflow actions to content using our Content Management API.

Common use cases for using the Content Management JS SDK include:

  • Importing Content
  • Implementing custom Approval Workflows
  • Keeping content in-sync with other systems

Check it out on GitHub

Using the SDK with NPM (Node Package Manager)

When using the Content Management REST API you'll need to know a few things about your instance in order to authenticate your requests and setup your API client.

To create an instance of an an API client for the Agility Content Management REST API you will need the following:

Location - The geo-location of the API you wish to connect to (*USA/Canada*)

Website Name - The Website Name that identifies your Agility Instance [Settings | Global Security].

Security Key - The Security Key used to authenticate your API requests [Settings | Global Security].

Don't know your Website Name or Security Key? See Retrieving your Website Name and Security Key

  1. Install the Agility Content Management JS SDK package into your project:
    > npm install @agility/content-management
  2. Import the SDK when you need to use it in your JavaScript file(s):
    import agilityMgmt from '@agility/content-management'
  3. Now you can create a API client to retrieve content from your Agility instance:
    import agilityMgmt from '@agility/content-management'
    
    const mgmtApi = agilityMgmt.getApi({
      location: 'USA',
      websiteName: 'MyWebsiteName',
      securityKey: 'xyz123'
    });

Full Documentation

Full documentation for this SDK can be found in our Agility Management JS SDK Reference Doc
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.