Socket
Book a DemoInstallSign in
Socket

@remkoj/optimizely-cms-api

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remkoj/optimizely-cms-api

A Javascript client for the Integration API provided by the Optimizely CMS.

5.1.3
latest
npmnpm
Version published
Weekly downloads
1.4K
19.81%
Maintainers
1
Weekly downloads
 
Created
Source

License Static Badge

Optimizely CMS - Integration API Client

A Javascript client for the Integration API provided by the Optimizely CMS. It wraps the Optimizely CMS SaaS Core REST API.

Installation

This package is provides as part of one of the mono-repo style demo sites. Install this package by using a mono-repo style structure for your project and copying this package into your mono-repo.

Requirements

This package works across browser and modern Node.JS environments, which provide an implementation for the Fetch API. The library has been tested with the Fetch API implementation in Node.JS v18 and above.

Usage

// Import the Client
import createClient, { ContentRoots } from '@remkoj/optimizely-cms-integration-api'

// Create an instance of the client
const client = createClient({
    base: "https://example.com",
    clientId: "apiClientID",
    clientSecret: "apiClientSecret"
});

// Start using client
client.content.contentListItems(ContentRoots.SystemRoot).then(response => {
    const items = response.items
    items?.map(item => {
        // Do something with the item
    })
})

Alternative configuration for Node.JS

The configuration object for the createClient() method is optional, if it is omitted, the configuration will be read from the environment variables.

Configuration options

The following configuration options are available for

Environment variableConfiguration keyRequiredUsage
OPTIMIZELY_CMS_URLbaseyesThe URL where the CMS is available
OPTIMIZELY_CMS_CLIENT_IDclientIdyesThe API Client ID, as configured within the CMS
OPTIMIZELY_CMS_CLIENT_SECRETclientSecretyesThe API Client Secret as generated by the CMS when creating the client
OPTIMIZELY_CMS_USER_IDactAsnoThe username of the CMS user to impersonate
OPTIMIZELY_CMS_SCHEMAcmsVersionnoOverride the target Optimizely CMS Version:

OPTI-CMS-12: Optimizely CMS 12, With CMS Service Preview 1 installed and working.

OPTI-CMS-13: Optimizely SaaS CMS / CMS 13

Default: SaaS CMS / CMS 13

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.