Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
Eric Newton edited this page Apr 14, 2017 · 2 revisions

Welcome

Welcome to the cp-accessapi-nodejs wiki!

Quick start

  1. You need to contact CrownPeak support to receive an API key for the CrownPeak instance we need to access.
  2. Install the nodejs library: npm install ericnewton76/cp-accessapi-nodejs
  3. Create an accessapi-config.json file: node node_modules/crownpeak-accessapi/bin/cli.js init
  4. Implement your code:
var accessapi = require('crownpeak-accessapi');

//create a config file using cpapi init
accessapi.loadConfig(); //by default loads config from ./accessapi-config.json. 

accessapi.auth().done(function() {
   accessapi.AssetExists('/Folder1/Asset2').then(function(resp) {
      //all responses from requestify
      console.log(resp.getBody());
   });
});
Clone this wiki locally