Giter Club home page Giter Club logo

cuc24-cascadecms-restapi-workshop's Introduction

CUC24 Cascade CMS Rest API Workshop

We'll be using this repository for our CUC24 Cascade CMS Rest API Workshop!

The original repository was created by Philip Kukla. His repository included a JS library that primarily uses NodeJS and Google Scripts but also had a vanilla JS fetch option. Although the library itself was great, the standout piece for me was the Rest API operations documentation! I had been working on my own library on and off for a couple of years now, it focuses on client side JS you can run without a lot of setup but useful enough for a few small client facing scripts. I just never had time to polish and finish it. Until now, kind of! With Philip's permission, I forked his repository, updated a few things here and there and fully replaced the library itself. If you prefer to use NodeJS and/or Google Scripts, I highly suggest you check out his library!

Cascade Documentation

You can find an openAPI representation of Cascade CMS's WSDL operations here:

https://nandoblanco.github.io/cuc24-cascadecms-restapi-workshop/swagger-ui/

All information originates from Cascade CMS's WSDL operations page. In order to access this you will need to use your organization as a subdomain followed by this url: cascadecms.com/ws/services/AssetOperationService?wsdl

Example: yourOrg.cascadecms.com/ws/services/AssetOperationService?wsdl

General Usage

To use the library you will need to define your Cascade CMS URL and Cascade CMS API Key (v8.16 and later). The apiKey is generated in your Cascade dashboard. The url is yourOrg.cascadecms.com/api/v1/ (this is the current version as of 1/9/2023).

//Example
const cmsUrl = "https://xxxx.cascadecms.com/";
const cmsAPI = "xxxxx-xxx-xxxx-xxx-xxxxxx";

Example Operations

// read asset
readAsset({
    type: "page",
    id: "page ID",
}).then(function(result) {
    console.log(result);
}).catch(function(error) {
    console.log(error);
});

// edit asset
readAsset({
    type: "page",
    id: "page ID", 
}).then(function(result) {
    result.apiReturn.asset.page.metadata.title = "NEW TITLE";
    editAsset({
        asset: result.apiReturn,
    }).then(function(result) {
        console.log(result);
    }).catch(function(error) {
        console.log(error);
    });
}).catch(function(error) {
    console.log(error);
});

More examples in the the example folder.

cuc24-cascadecms-restapi-workshop's People

Contributors

kuklaph avatar nandoblanco avatar

Stargazers

John David Garza avatar

Forkers

utsa-asc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.