Base URL: http://localhost:8080
Search across all providers for entities matching the query.
Request body:
{
"query": "vacation photos",
"filters": {},
"type": "",
"limit": 20,
"offset": 0,
"type_weights": {},
"include_related": false,
"max_depth": 1
}| Field | Type | Description |
|---|---|---|
query |
string | Search query text |
filters |
object | Attribute filters (e.g., {"extension": "jpg"}) |
type |
string | Filter by entity type |
limit |
int | Max results (default: 20) |
offset |
int | Results to skip |
type_weights |
object | Boost weights by type |
include_related |
bool | Include related entities |
max_depth |
int | Max depth for related entities |
Response:
{
"entities": [
{
"id": "filesystem:myfs:abc123",
"type": "file.media.image",
"provider": "filesystem",
"title": "vacation.jpg",
"description": "",
"attributes": {
"path": "/home/user/Pictures/vacation.jpg",
"extension": "jpg",
"mime_type": "image/jpeg",
"size": 2458624,
"modified": 1703847600
},
"relationships": [],
"search_tokens": [],
"timestamp": "2024-01-01T00:00:00Z"
}
],
"total_count": 42,
"type_counts": {"file.media.image": 15, "file.document": 10},
"duration_ms": 23.5
}Search with per-provider results (useful for debugging or multi-source views).
Request body: Same as /search
Response:
{
"results": [
{
"provider": "filesystem",
"entities": [...],
"error": "",
"duration_ms": 12.3,
"type_counts": {"file.media.image": 15}
}
],
"total_count": 42,
"type_counts": {"file.media.image": 15, "file.document": 10},
"has_errors": false,
"duration_ms": 23.5
}Retrieve a single entity by ID.
Response:
{
"id": "filesystem:myfs:abc123",
"type": "file.media.image",
"provider": "filesystem",
"title": "vacation.jpg",
"attributes": {...},
"relationships": [...]
}Retrieve an entity with its relationships expanded.
Query params:
depth(int): Max depth for expansion (default: 1)
Response:
{
"entity": {...},
"related": [
{
"relationship": "folder",
"entities": [...]
}
]
}Get entities related to the given entity.
Query params:
type(string): Relationship type filterlimit(int): Max results
Response:
{
"entities": [...],
"count": 5
}List all registered entity types.
Response:
{
"types": [
{
"name": "file.media.image",
"parent": "file.media",
"description": "Image files"
}
],
"count": 25
}Get details for a specific type.
Response:
{
"name": "file.media.image",
"parent": "file.media",
"ancestors": ["item", "file", "file.media"],
"description": "Image files",
"attributes": {...},
"filters": {...}
}Get available filters for search results.
Query params:
search(string): Search query to extract filters fromtype(string): Entity type filter
Response:
{
"capabilities": {...},
"filters": {
"extensions": ["jpg", "png", "gif"],
"mime_types": ["image/jpeg", "image/png"]
}
}List all registered providers.
Response:
{
"providers": [
{
"name": "filesystem",
"connected": true,
"supports_incremental": true
}
],
"count": 2
}Get detailed status of all providers.
Response:
{
"providers": [
{
"name": "filesystem",
"connected": true,
"last_discovery": "2024-01-01T00:00:00Z",
"last_error": "",
"entity_count": 1234,
"supports_incremental": true
}
],
"count": 2
}Health check endpoint.
Response:
{
"status": "ok",
"providers": {
"total": 2,
"connected": 2
},
"timestamp": 1703847600
}API index.
Response:
{
"name": "mifind API",
"version": "0.1.0",
"description": "Unified personal search API",
"endpoints": {
"/search": "POST - Search across all providers",
"/search/federated": "POST - Search with per-provider results",
"/entity/{id}": "GET - Get entity by ID",
"/entity/{id}/expand": "GET - Get entity with relationships",
"/entity/{id}/related": "GET - Get related entities",
"/types": "GET - List all types",
"/types/{name}": "GET - Get type details",
"/filters": "GET - Get available filters",
"/providers": "GET - List providers",
"/providers/status": "GET - Provider status",
"/health": "GET - Health check"
}
}Entity IDs follow the format: providerType:instanceID:entityID
Examples:
filesystem:myfs:abc123- File from filesystem providerimmich:photos:xyz789- Photo from Immich providermock:default:test123- Entity from mock provider
| Attribute | Type | Description |
|---|---|---|
path |
string | Filesystem path (files) |
extension |
string | File extension without dot |
mime_type |
string | MIME type |
size |
int | File size in bytes |
modified |
int | Modification time (unix timestamp) |
created |
int | Creation time (unix timestamp) |
width |
int | Image/video width |
height |
int | Image/video height |
duration |
int | Video/audio duration (seconds) |