REST Client
This is the typed version of the REST client that’s using the auto-generated rest-schema.ts to provide rich typing and autocompletes.
The fetch-based client has 0 dependencies itself and works both in Node.js and browsers, but if you’d like to leverage self-signed JWTs, please add the jsonwebtoken module to your project.
If you are not passing in a baseUrl option, be sure to add it as an environment variable, e.g.:
CC_SATELLITE_BASE_URL=https://abc-def.live.cloud.content-sync.io/latest/restYou can copy the URL from the REST explorer.
Part of the URL is the API service, like
preview,liveorcdn.
Update your local project using the Content Cloud CLI:
The following files will be generated for the client:
content-cloud-system-rest-client.ts
content-cloud-rest-client.ts