canonical: https://jentic.com/apis/swaggerhub.hmcts-dts/rag-service-api

# Hmcts Dts RAG Service API

API for RAG service for document ingestion and answer retrieval. The API exposes 6 endpoints.

## For AI agents

Programmatically initiate upload process by submitting document metadata, get status for given document reference. Covers 6 operations.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Initiate upload process by submitting document metadata
- Get status for given document reference
- Generate response for user query synchronously
- Check status of asynchronous request to provide summarised answer for user query
- Monitor RAG Service API operational status and events

## Use cases

### Developer Tools Operations

Use the RAG Service API to perform developer tools operations programmatically. The API provides 6 endpoints covering core functionality including initiate upload process by submitting document metadata, get status for given document reference, get document status.

Example prompt: Call POST /document-upload to initiate upload process by submitting document metadata

### Automated Document information summarised asynchronously Management

Automate document information summarised asynchronously operations by combining multiple RAG Service API endpoints. Agents can get status for given document reference and then get document status in a single workflow.

Example prompt: Call GET /document-upload/{documentReference} to get status for given document reference, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call RAG Service API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle none tokens manually.

Example prompt: Search Jentic for 'initiate upload process by submitting document metadata', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /document-upload | Initiate upload process by submitting document metadata |
| GET | /document-upload/{documentReference} | Get status for given document reference |
| GET | /document-status | Get document status |
| POST | /answer-user-query | Generate response for user query synchronously |
| POST | /answer-user-query-async | Generate response for user query asynchronously |
| GET | /answer-user-query-async-status/{transactionId} | Check status of asynchronous request to provide summarised answer for user query |

## Key resources

- **Document information summarised asynchronously** — Operations related to Document information summarised asynchronously
- **Document information summarised synchronously** — Operations related to Document information summarised synchronously
- **Document ingestion initiation** — Operations related to Document ingestion initiation
- **Document ingestion status** — Operations related to Document ingestion status

## Why Jentic

- **Setup:** Wiring the RAG Service API by hand means coding its document upload, status, and query calls against the service host and handling the async query polling and retries yourself, even though it declares no auth scheme. Through Jentic you install once, import the RAG Service API from the API Directory, and your agent calls it.
- **Permission scoping:** This API puts the document reference and transaction id in the URL path (/document-upload/{documentReference}, /answer-user-query-async-status/{transactionId}), so a rule can pin your agent to one document or query transaction: it can check that item's status and nothing else. You choose the operations it may call, so writes like uploading a document are not included unless you add them.
- **Credential handling:** This RAG Service API declares no credential, so there is nothing to store. If your deployment later requires one, your own Jentic One instance stores it encrypted and injects it at execution time so it never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'answer a user query from documents' or 'check document upload status', and Jentic returns the matching RAG Service API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the RAG Service API use?

The RAG Service API uses no authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I initiate upload process by submitting document metadata with the RAG Service API?

Yes. Use the POST /document-upload endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the RAG Service API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I initiate upload process by submitting document metadata through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'initiate upload process by submitting document metadata'. Jentic returns the matching RAG Service API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the RAG Service API have?

The RAG Service API exposes 6 endpoints covering document information summarised asynchronously, document information summarised synchronously, document ingestion initiation operations.

### Can I limit what my agent is allowed to do with the RAG Service API?

Yes. Jentic One is self-hosted, so your own rules decide which of the RAG Service API operations your agent may call and which credentials it may use. Because this API carries the document reference and transaction id in the URL path (GET /document-upload/{documentReference}, GET /answer-user-query-async-status/{transactionId}), a rule can pin the agent to one document or query transaction and let it only check that item's status. You choose the operations it may call, so writes like POST /document-upload or POST /answer-user-query stay off unless you add them.
