Alexandria User Service API (6.0.0)

Download OpenAPI specification:

License: MIT

User account management. Owns the users table; exposes internal fan-out endpoints consumed by knowledgebase-service and qa-service.

User Service

User account management

Update user preferences

Authorizations:
bearerAuth
Request Body schema: application/json
required
darkTheme
boolean
language
string [ 2 .. 5 ] characters

Responses

Request samples

Content type
application/json
{
  • "darkTheme": true,
  • "language": "strin"
}

Response samples

Content type
application/json
{
  • "darkTheme": true,
  • "language": "string"
}

Health check (user-service)

Returns 'Hello from user-service!' if service is running

Responses

Get user profile

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "oidcSubject": "string",
  • "username": "string",
  • "email": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "preferences": {
    }
}

Delete user account

Users can only delete their own account

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

KnowledgeBase Service

Document management and AI-powered knowledge operations

Add tag to document

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
label
string

Responses

Request samples

Content type
application/json
{
  • "label": "string"
}

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

Reprocess document tags

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

Reprocess document summary

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

Reprocess document entities

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

Upload a document file

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
file
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "ownerSubject": "string",
  • "fileName": "string",
  • "objectKey": "string",
  • "fileType": "string",
  • "fileSize": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "summary": {
    },
  • "extractedEntities": [
    ],
  • "tags": [
    ],
  • "entitiesStatus": "PENDING",
  • "tagsStatus": "PENDING"
}

Create a new document with text content

Authorizations:
bearerAuth
Request Body schema: application/json
required
fileName
string
objectKey
string
fileType
string
fileSize
integer <int64>
textContent
string

Responses

Request samples

Content type
application/json
{
  • "fileName": "string",
  • "objectKey": "string",
  • "fileType": "string",
  • "fileSize": 0,
  • "textContent": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "ownerSubject": "string",
  • "fileName": "string",
  • "objectKey": "string",
  • "fileType": "string",
  • "fileSize": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "summary": {
    },
  • "extractedEntities": [
    ],
  • "tags": [
    ],
  • "entitiesStatus": "PENDING",
  • "tagsStatus": "PENDING"
}

Get document by ID

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "ownerSubject": "string",
  • "fileName": "string",
  • "objectKey": "string",
  • "fileType": "string",
  • "fileSize": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "summary": {
    },
  • "extractedEntities": [
    ],
  • "tags": [
    ],
  • "entitiesStatus": "PENDING",
  • "tagsStatus": "PENDING"
}

Delete document

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

Update document metadata

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>
Request Body schema: application/json
required
fileName
string

Responses

Request samples

Content type
application/json
{
  • "fileName": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "ownerSubject": "string",
  • "fileName": "string",
  • "objectKey": "string",
  • "fileType": "string",
  • "fileSize": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "summary": {
    },
  • "extractedEntities": [
    ],
  • "tags": [
    ],
  • "entitiesStatus": "PENDING",
  • "tagsStatus": "PENDING"
}

Health check (knowledgebase-service)

Returns 'Hello from knowledgebase-service!' if service is running

Responses

Get all unique tags for user

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "tags": [
    ]
}

Keyword search over document filenames and content

Authorizations:
bearerAuth
query Parameters
q
required
string

Responses

Response samples

Content type
application/json
{
  • "results": [
    ]
}

Semantic search over document content, with keyword fallback

Authorizations:
bearerAuth
query Parameters
q
required
string
limit
integer <int32> [ 1 .. 50 ]
Default: 10

Responses

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "fallbackUsed": true
}

Get search history

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete search history

Authorizations:
bearerAuth

Responses

List all documents

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get document summary

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "summary": "string",
  • "modelUsed": "string",
  • "generatedAt": "2019-08-24T14:15:22Z",
  • "status": "PENDING",
  • "errorMessage": "string"
}

Get document entities

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  • "entities": [
    ]
}

Download document file

Authorizations:
bearerAuth
path Parameters
id
required
string <uuid>

Responses

Response samples

Content type
application/json
"string"

Remove tag from document

Authorizations:
bearerAuth
path Parameters
documentId
required
string <uuid>
tagId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "fieldErrors": [
    ],
  • "message": "string"
}

KnowledgeBase Service (Internal)

Service-to-service endpoints authenticated by an HMAC signature

Resolve object keys to document ids and file names (internal)

path Parameters
subject
required
string
Request Body schema: application/json
required
objectKeys
Array of strings

Responses

Request samples

Content type
application/json
{
  • "objectKeys": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

List object keys for a user's documents (internal)

path Parameters
subject
required
string

Responses

Response samples

Content type
application/json
[
  • "string"
]

Purge all knowledgebase data for a user (internal)

path Parameters
subject
required
string

Responses

QA Service

Question answering over the user's knowledge base

Ask a question about your documents

Authorizations:
bearerAuth
Request Body schema: application/json
required
question
required
string [ 1 .. 1500 ] characters

Responses

Request samples

Content type
application/json
{
  • "question": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userSubject": "string",
  • "question": "string",
  • "answer": "string",
  • "citations": [
    ],
  • "timestamp": "2019-08-24T14:15:22Z",
  • "modelUsed": "string"
}

Health check (qa-service)

Returns 'Hello from qa-service!' if service is running

Responses

Get Q&A history

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Q&A history

Authorizations:
bearerAuth

Responses

QA Service (Internal)

Service-to-service endpoints, reachable only inside the cluster network

Purge all QA data for a user (internal)

path Parameters
subject
required
string

Responses

health

Health check endpoints

Health

Health check endpoint.

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

hello

Hello endpoints

Hello

Hello endpoint.

Responses

ai

AI-powered document processing

Ask

Answer a question from chunks retrieved for the given documents.

The question is embedded and matched against the indexed chunks scoped to the requested object keys; the answer cites the documents its chunks came from.

Request Body schema: application/json
required
objectKeys
required
Array of strings (Objectkeys)
question
required
string (Question)

Responses

Request samples

Content type
application/json
{
  • "objectKeys": [
    ],
  • "question": "string"
}

Response samples

Content type
application/json
{
  • "answer": "string",
  • "citations": [
    ],
  • "modelUsed": "string"
}

Extract

Extract named entities from the document stored under the given object key.

Request Body schema: application/json
required
maxEntities
integer (Maxentities) [ 1 .. 100 ]
Default: 20
objectKey
required
string (Objectkey)

Responses

Request samples

Content type
application/json
{
  • "maxEntities": 20,
  • "objectKey": "string"
}

Response samples

Content type
application/json
{
  • "entities": [
    ],
  • "modelUsed": "string",
  • "truncated": false
}

Index

Chunk, embed, and index the document at the given object key into Weaviate.

Re-indexing the same key replaces its existing chunks, so the call is safe to repeat (e.g. when Spring re-processes a document).

Request Body schema: application/json
required
objectKey
required
string (Objectkey)

Responses

Request samples

Content type
application/json
{
  • "objectKey": "string"
}

Response samples

Content type
application/json
{
  • "chunksIndexed": 0,
  • "embeddingModel": "string",
  • "objectKey": "string"
}

Delete Index

Remove all indexed chunks for the document at the given object key.

Idempotent: deleting a document that was never indexed removes nothing and still returns 200. The :path converter keeps object keys that contain slashes intact.

path Parameters
object_key
required
string (Object Key)

Responses

Response samples

Content type
application/json
{
  • "chunksDeleted": 0,
  • "objectKey": "string"
}

Search

Rank indexed documents by semantic similarity to the query.

The query is embedded and matched against the indexed chunks scoped to the requested object keys; chunk hits are rolled up to one entry per document, each carrying the closest chunk's snippet and a relevance score.

Request Body schema: application/json
required
limit
integer (Limit) [ 1 .. 50 ]
Default: 10
objectKeys
required
Array of strings (Objectkeys)
query
required
string (Query) <= 1500 characters

Responses

Request samples

Content type
application/json
{
  • "limit": 10,
  • "objectKeys": [
    ],
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "embeddingModel": "string",
  • "results": [
    ]
}

Summarize Document

Summarize the document stored under the given object key.

Request Body schema: application/json
required
objectKey
required
string (Objectkey)

Responses

Request samples

Content type
application/json
{
  • "objectKey": "string"
}

Response samples

Content type
application/json
{
  • "modelUsed": "string",
  • "summary": "string",
  • "truncated": false
}

Tag

Assign content-based topical tags to the document stored under the given object key.

Request Body schema: application/json
required
knownTags
Array of strings (Knowntags)
Default: []
objectKey
required
string (Objectkey)

Responses

Request samples

Content type
application/json
{
  • "knownTags": [ ],
  • "objectKey": "string"
}

Response samples

Content type
application/json
{
  • "modelUsed": "string",
  • "tags": [
    ],
  • "truncated": false
}