Skip to content

Commit 31eadea

Browse files
authored
Merge pull request #1183 from tisnik/lcore-1346-list-of-rest-api-endpoints
LCORE-1346: list of REST API endpoints
2 parents 435155d + 068a7df commit 31eadea

4 files changed

Lines changed: 52 additions & 9 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ The service includes comprehensive user data collection capabilities for various
7373
* [OpenAPI specification](#openapi-specification)
7474
* [Readiness Endpoint](#readiness-endpoint)
7575
* [Liveness Endpoint](#liveness-endpoint)
76+
* [Models endpoint](#models-endpoint)
7677
* [Database structure](#database-structure)
7778
* [Publish the service as Python package on PyPI](#publish-the-service-as-python-package-on-pypi)
7879
* [Generate distribution archives to be uploaded into Python registry](#generate-distribution-archives-to-be-uploaded-into-python-registry)
@@ -1054,7 +1055,9 @@ Stack service. It is possible to specify "model_type" query parameter that is
10541055
used as a filter. For example, if model type is set to "llm", only LLM models
10551056
will be returned:
10561057

1058+
```bash
10571059
curl http://localhost:8080/v1/models?model_type=llm
1060+
```
10581061

10591062
The "model_type" query parameter is optional. When not specified, all models
10601063
will be returned.

docs/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"models"
246246
],
247247
"summary": "Models Endpoint Handler",
248-
"description": "Handle requests to the /models endpoint.\n\nProcess GET requests to the /models endpoint, returning a list of available\nmodels from the Llama Stack service. It is possible to specify \"model_type\"\nquery parameter that is used as a filter. For example, if model type is set\nto \"llm\", only LLM models will be returned:\n\n curl http://localhost:8080/v1/models?model_type=llm\n\nThe \"model_type\" query parameter is optional. When not specified, all models\nwill be returned.\n\n## Parameters:\n request: The incoming HTTP request.\n auth: Authentication tuple from the auth dependency.\n model_type: Optional filter to return only models matching this type.\n\n## Raises:\n HTTPException: If unable to connect to the Llama Stack server or if\n model retrieval fails for any reason.\n\n## Returns:\n ModelsResponse: An object containing the list of available models.",
248+
"description": "Handle requests to the /models endpoint.\n\nProcess GET requests to the /models endpoint, returning a list of available\nmodels from the Llama Stack service. It is possible to specify \"model_type\"\nquery parameter that is used as a filter. For example, if model type is set\nto \"llm\", only LLM models will be returned:\n\n curl http://localhost:8080/v1/models?model_type=llm\n\nThe \"model_type\" query parameter is optional. When not specified, all models\nwill be returned.\n\n### Parameters:\n request: The incoming HTTP request.\n auth: Authentication tuple from the auth dependency.\n model_type: Optional filter to return only models matching this type.\n\n### Raises:\n HTTPException: If unable to connect to the Llama Stack server or if\n model retrieval fails for any reason.\n\n### Returns:\n ModelsResponse: An object containing the list of available models.",
249249
"operationId": "models_endpoint_handler_v1_models_get",
250250
"parameters": [
251251
{

docs/openapi.md

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,46 @@ Lightspeed Core Service (LCS) service API specification.
1212

1313
# 🛠️ APIs
1414

15+
## List of REST API endpoints
16+
17+
| Method | Path | Description |
18+
|--------|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
19+
| GET | `/` | Returns the static HTML index page |
20+
| GET | `/v1/info` | Returns the service name, version and Llama-stack version |
21+
| GET | `/v1/models` | List of available models |
22+
| GET | `/v1/tools` | Consolidated list of available tools from all configured MCP servers |
23+
| GET | `/v1/mcp-auth/client-options` | List of MCP servers configured to accept client-provided authorization tokens, along with the header names where clients should provide these tokens |
24+
| GET | `/v1/shields` | List of available shields from the Llama Stack service |
25+
| GET | `/v1/providers` | List all available providers grouped by API type |
26+
| GET | `/v1/providers/{provider_id}` | Retrieve a single provider identified by its unique ID |
27+
| GET | `/v1/rags` | List all available RAGs |
28+
| GET | `/v1/rags/{rag_id}` | Retrieve a single RAG identified by its unique ID |
29+
| POST | `/v1/query` | Processes a POST request to a query endpoint, forwarding the user's query to a selected Llama Stack LLM and returning the generated response |
30+
| POST | `/v1/streaming_query` | Streaming response using Server-Sent Events (SSE) format with content type text/event-stream |
31+
| GET | `/v1/config` | Returns the current service configuration |
32+
| POST | `/v1/feedback` | Processes a user feedback submission, storing the feedback and returning a confirmation response |
33+
| GET | `/v1/feedback/status` | Return the current enabled status of the feedback functionality |
34+
| PUT | `/v1/feedback/status` | Change the feedback status: enables or disables it |
35+
| GET | `/v1/conversations` | Retrieve all conversations for the authenticated user |
36+
| GET | `/v1/conversations/{conversation_id}` | Retrieve a conversation by ID using Conversations API |
37+
| DELETE | `/v1/conversations/{conversation_id}` | Delete a conversation by ID using Conversations API |
38+
| PUT | `/v1/conversations/{conversation_id}` | Update a conversation metadata using Conversations API |
39+
| GET | `/v2/conversations` | Retrieve all conversations for the authenticated user |
40+
| GET | `/v2/conversations/{conversation_id}` | Retrieve a conversation identified by its ID |
41+
| DELETE | `/v2/conversations/{conversation_id}` | Delete a conversation identified by its ID |
42+
| PUT | `/v2/conversations/{conversation_id}` | Update a conversation topic summary by ID |
43+
| POST | `/v1/infer` | Serves requests from the RHEL Lightspeed Command Line Assistant (CLA) |
44+
| GET | `/readiness` | Returns service readiness state |
45+
| GET | `/liveness` | Returns liveness status of the service |
46+
| POST | `/authorized` | Returns the authenticated user's ID and username |
47+
| GET | `/metrics` | Returns the latest Prometheus metrics in a form of plain text |
48+
| GET | `/.well-known/agent-card.json` | Serve the A2A Agent Card at the well-known location |
49+
| GET | `/.well-known/agent.json` | Handle A2A JSON-RPC requests following the A2A protocol specification |
50+
| GET | `/a2a` | Handle A2A JSON-RPC requests following the A2A protocol specification |
51+
| POST | `/a2a` | Handle A2A JSON-RPC requests following the A2A protocol specification |
52+
| GET | `/a2a/health` | Handle A2A JSON-RPC requests following the A2A protocol specification |
53+
54+
1555
## GET `/`
1656

1757
> **Root Endpoint Handler**
@@ -70,8 +110,8 @@ Examples
70110
71111
Handle request to the /info endpoint.
72112

73-
Process GET requests to the /info endpoint, returning the
74-
service name, version and Llama-stack version.
113+
Process GET requests to the /info endpoint, returning the service name, version
114+
and Llama-stack version.
75115

76116
Raises:
77117
HTTPException: with status 500 and a detail object
@@ -203,16 +243,16 @@ to "llm", only LLM models will be returned:
203243
The "model_type" query parameter is optional. When not specified, all models
204244
will be returned.
205245

206-
## Parameters:
246+
### Parameters:
207247
request: The incoming HTTP request.
208248
auth: Authentication tuple from the auth dependency.
209249
model_type: Optional filter to return only models matching this type.
210250

211-
## Raises:
251+
### Raises:
212252
HTTPException: If unable to connect to the Llama Stack server or if
213253
model retrieval fails for any reason.
214254

215-
## Returns:
255+
### Returns:
216256
ModelsResponse: An object containing the list of available models.
217257

218258

src/app/endpoints/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ async def models_endpoint_handler(
9292
The "model_type" query parameter is optional. When not specified, all models
9393
will be returned.
9494
95-
## Parameters:
95+
### Parameters:
9696
request: The incoming HTTP request.
9797
auth: Authentication tuple from the auth dependency.
9898
model_type: Optional filter to return only models matching this type.
9999
100-
## Raises:
100+
### Raises:
101101
HTTPException: If unable to connect to the Llama Stack server or if
102102
model retrieval fails for any reason.
103103
104-
## Returns:
104+
### Returns:
105105
ModelsResponse: An object containing the list of available models.
106106
"""
107107
# Used only by the middleware

0 commit comments

Comments
 (0)