Guides, code examples, and best practices for integrating with the Serviceware Knowledge REST API.
The Serviceware Knowledge REST API provides programmatic access to content management, search, export, and administration features. This repository contains practical guides and working code examples to help you get started quickly.
Before diving into specific use cases, review these foundational guides:
| Guide | Description |
|---|---|
| Generating an API Client | Generate a typed API client from the OpenAPI specification using Swagger Codegen |
| Authentication | Authenticate API requests using session tokens, API keys, or OAuth2 bearer tokens |
Step-by-step walkthroughs for common integration scenarios:
| Guide | Description |
|---|---|
| Export Content View as HTML | Automate the export of a content view as a self-contained HTML/ZIP archive |
| Searching the Knowledge Base | Run full-text searches with filters, facets, sorting, and pagination via POST /search |
| Resolving File References in Text Content | Resolve data-sabio-file-id HTML attributes to file metadata via GET /fm/{id} and to pre-signed download URLs via GET /fm/url/{id} |
| Downloading Files with Access Tokens | Issue short-lived JWT access tokens with POST /fm/resource/{id} and redeem them via GET /fm/resource/{token} for downloads on your Knowledge host |
| Working with Entity Relations | Retrieve attached, linked, and embedded relations between entities via GET /relation/{type}/{id} |
| Generating AI Answers | Generate grounded LLM answers via blocking POST /ai/answer or streaming POST /ai/answer/sse |
Working code examples organized by use case and language:
| Use Case | Language | Path |
|---|---|---|
| Content View Export | Java | examples/content-view-export/java/ |
| Content View Export | curl | examples/content-view-export/curl/ |
| Search | Python | examples/search/python/ |
| Search | curl | examples/search/curl/ |
| File Management | Python | examples/file-management/python/ |
| File Management | curl | examples/file-management/curl/ |
| Relations | Python | examples/relations/python/ |
| Relations | curl | examples/relations/curl/ |
| Answer | Python | examples/answer/python/ |
| Answer | curl | examples/answer/curl/ |
- A running Serviceware Knowledge instance
- A user account with the required permissions (varies by use case)
- The base URL of your Knowledge instance (e.g.
https://knowledge.example.com/sabio-web/services)
The full public API specification is available as an interactive Swagger UI at:
https://<your-instance>/sabio-web/services/api-docs
You can also download the OpenAPI specification YAML from that endpoint for use with code generators and other tools.
Copyright Serviceware SE. All rights reserved.