No results
4
Home
ulyxie edited this page 2026-10-16 15:15:13 +00:00
Table of contents
cs-rest
@ulyxie/cs-rest is a TypeScript client for the OpenText Content Server REST API, for Node, Bun and the browser. It handles authentication and OTCSTicket renewal, sends request bodies the multipart way Content Server requires, and wraps every documented operation - and every core route a live server registers - in a typed method. It has no runtime dependencies.
This wiki documents 4.0.0, currently on the
4.0.0-developbranch and not yet released. 3.x is documented in the README onmaster.
What 4.0.0 brings
- A method for every operation in the Content Server 26.2 spec (336 of 349, the remaining 13 being documented duplicates), and for every route the core
restapimodule of a live 26.1 server registers. - Small in the browser. Optional handlers are separate imports, and requests use the platform's
fetch: the core is 13.4 KB gzipped. See Modules. - One API generation per method, named for it. Unsuffixed methods call v2; methods ending in
V1call v1. - Version gating. Tell the client which release it talks to, or let it ask, and calls to endpoints that release lacks fail before they are sent, naming the release they arrived in.
- Normalised results.
response.resultreads nodes, versions, members, volumes, permissions and categories identically from v1 and v2. - Shipped types. The full OpenAPI schema, with
TOk<"operationId">to look up any response body. - Uploads that work from a path, a
File/Blobor a Buffer, and Large File Upload for files too big for one request. - Streams files of any size in Node, Bun and the browser.
- Pluggable transport. Node's
httpin Node,fetchelsewhere; anagentfor a proxy or private CA, your ownfetch, or axios as an opt-in. See Transports.
Pages
| Page | Read it for |
|---|---|
| Getting Started | Installing, creating a Session, making calls |
| Migrating from 3.x | What breaks, what still works with a warning |
| Handlers | Every handler and its methods |
| Modules | The core, the optional modules, and adding a handler of your own |
| Transports | fetch, proxies and certificates, axios, errors |
| Version Gating | Targeting a Content Server release |
| Normalised Results | response.result and the entity types |
| Uploads | Files, Buffers and Large File Upload |
| Development | Working on the library: specs, generators, tests, CI |
| Handoff | Where 4.0.0 stands and what comes next |
Requirements
- Node 20.19 or newer, Bun, or a current browser. ES modules only.
- Content Server 20.3 or newer for version gating. Older servers work, ungated.
cs-rest 4.0.0
Using it
Working on it