basePath: /api/v1
definitions:
dto.CommitAttributes:
properties:
author:
type: string
commit_sha:
type: string
date:
type: string
message:
type: string
parent_commit_sha:
type: string
type: object
dto.CommitData:
properties:
attributes:
$ref: '#/definitions/dto.CommitAttributes'
id:
type: string
type:
type: string
type: object
dto.CommitJSONAPIListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.CommitData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.CommitJSONAPIResponse:
properties:
data:
$ref: '#/definitions/dto.CommitData'
type: object
dto.EnrichmentAttributes:
properties:
content:
type: string
created_at:
type: string
subtype:
type: string
type:
type: string
updated_at:
type: string
type: object
dto.EnrichmentData:
properties:
attributes:
$ref: '#/definitions/dto.EnrichmentAttributes'
id:
type: string
type:
type: string
type: object
dto.EnrichmentJSONAPIListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.EnrichmentData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.EnrichmentJSONAPIResponse:
properties:
data:
$ref: '#/definitions/dto.EnrichmentData'
type: object
dto.EnrichmentSchema:
properties:
content:
type: string
type:
type: string
type: object
dto.EnrichmentUpdateAttributes:
properties:
content:
type: string
type: object
dto.EnrichmentUpdateData:
properties:
attributes:
$ref: '#/definitions/dto.EnrichmentUpdateAttributes'
type:
type: string
type: object
dto.EnrichmentUpdateRequest:
properties:
data:
$ref: '#/definitions/dto.EnrichmentUpdateData'
type: object
dto.FileAttributes:
properties:
blob_sha:
type: string
extension:
type: string
mime_type:
type: string
path:
type: string
size:
type: integer
type: object
dto.FileData:
properties:
attributes:
$ref: '#/definitions/dto.FileAttributes'
id:
type: string
type:
type: string
type: object
dto.FileJSONAPIListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.FileData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.FileJSONAPIResponse:
properties:
data:
$ref: '#/definitions/dto.FileData'
type: object
dto.GitFileSchema:
properties:
blob_sha:
type: string
mime_type:
type: string
path:
type: string
size:
type: integer
type: object
dto.RepositoryAttributes:
properties:
cloned_path:
type: string
created_at:
type: string
last_scanned_at:
type: string
num_branches:
type: integer
num_commits:
type: integer
num_tags:
type: integer
remote_uri:
type: string
tracking_branch:
type: string
updated_at:
type: string
type: object
dto.RepositoryBranchData:
properties:
commit_count:
type: integer
is_default:
type: boolean
name:
type: string
type: object
dto.RepositoryCommitData:
properties:
author:
type: string
message:
type: string
sha:
type: string
timestamp:
type: string
type: object
dto.RepositoryCreateAttributes:
properties:
remote_uri:
type: string
type: object
dto.RepositoryCreateData:
properties:
attributes:
$ref: '#/definitions/dto.RepositoryCreateAttributes'
type:
type: string
type: object
dto.RepositoryCreateRequest:
properties:
data:
$ref: '#/definitions/dto.RepositoryCreateData'
type: object
dto.RepositoryData:
properties:
attributes:
$ref: '#/definitions/dto.RepositoryAttributes'
id:
type: string
type:
type: string
type: object
dto.RepositoryDetailsResponse:
properties:
branches:
items:
$ref: '#/definitions/dto.RepositoryBranchData'
type: array
data:
$ref: '#/definitions/dto.RepositoryData'
recent_commits:
items:
$ref: '#/definitions/dto.RepositoryCommitData'
type: array
type: object
dto.RepositoryListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.RepositoryData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.RepositoryResponse:
properties:
data:
$ref: '#/definitions/dto.RepositoryData'
type: object
dto.RepositoryStatusSummaryAttributes:
properties:
message:
type: string
status:
type: string
updated_at:
type: string
type: object
dto.RepositoryStatusSummaryData:
properties:
attributes:
$ref: '#/definitions/dto.RepositoryStatusSummaryAttributes'
id:
type: string
type:
type: string
type: object
dto.RepositoryStatusSummaryResponse:
properties:
data:
$ref: '#/definitions/dto.RepositoryStatusSummaryData'
type: object
dto.SearchAttributes:
properties:
code:
type: string
filters:
$ref: '#/definitions/dto.SearchFilters'
keywords:
items:
type: string
type: array
limit:
type: integer
text:
type: string
type: object
dto.SearchData:
properties:
attributes:
$ref: '#/definitions/dto.SearchAttributes'
type:
type: string
type: object
dto.SearchFilters:
properties:
authors:
items:
type: string
type: array
commit_sha:
items:
type: string
type: array
end_date:
type: string
enrichment_subtypes:
items:
type: string
type: array
enrichment_types:
items:
type: string
type: array
file_patterns:
items:
type: string
type: array
languages:
items:
type: string
type: array
sources:
items:
type: string
type: array
start_date:
type: string
type: object
dto.SearchRequest:
properties:
data:
$ref: '#/definitions/dto.SearchData'
type: object
dto.SearchResponse:
properties:
data:
items:
$ref: '#/definitions/dto.SnippetData'
type: array
type: object
dto.SnippetAttributes:
properties:
content:
$ref: '#/definitions/dto.SnippetContentSchema'
created_at:
type: string
derives_from:
items:
$ref: '#/definitions/dto.GitFileSchema'
type: array
enrichments:
items:
$ref: '#/definitions/dto.EnrichmentSchema'
type: array
original_scores:
items:
type: number
type: array
updated_at:
type: string
type: object
dto.SnippetContentSchema:
properties:
language:
type: string
value:
type: string
type: object
dto.SnippetData:
properties:
attributes:
$ref: '#/definitions/dto.SnippetAttributes'
id:
type: string
links:
$ref: '#/definitions/dto.SnippetLinks'
type:
type: string
type: object
dto.SnippetLinks:
properties:
commit:
type: string
file:
type: string
repository:
type: string
type: object
dto.SnippetListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.SnippetData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.TagAttributes:
properties:
is_version_tag:
type: boolean
name:
type: string
target_commit_sha:
type: string
type: object
dto.TagData:
properties:
attributes:
$ref: '#/definitions/dto.TagAttributes'
id:
type: string
type:
type: string
type: object
dto.TagJSONAPIListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.TagData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.TagJSONAPIResponse:
properties:
data:
$ref: '#/definitions/dto.TagData'
type: object
dto.TaskAttributes:
properties:
created_at:
type: string
payload: {}
priority:
type: integer
type:
type: string
updated_at:
type: string
type: object
dto.TaskData:
properties:
attributes:
$ref: '#/definitions/dto.TaskAttributes'
id:
type: string
type:
type: string
type: object
dto.TaskListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.TaskData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.TaskResponse:
properties:
data:
$ref: '#/definitions/dto.TaskData'
type: object
dto.TaskStatusAttributes:
properties:
created_at:
type: string
current:
type: integer
error:
type: string
message:
type: string
progress:
type: number
state:
type: string
step:
type: string
total:
type: integer
updated_at:
type: string
type: object
dto.TaskStatusData:
properties:
attributes:
$ref: '#/definitions/dto.TaskStatusAttributes'
id:
type: string
type:
type: string
type: object
dto.TaskStatusListResponse:
properties:
data:
items:
$ref: '#/definitions/dto.TaskStatusData'
type: array
links:
$ref: '#/definitions/jsonapi.Links'
meta:
$ref: '#/definitions/jsonapi.Meta'
type: object
dto.TrackingConfigAttributes:
properties:
mode:
$ref: '#/definitions/dto.TrackingMode'
value:
type: string
type: object
dto.TrackingConfigData:
properties:
attributes:
$ref: '#/definitions/dto.TrackingConfigAttributes'
type:
type: string
type: object
dto.TrackingConfigResponse:
properties:
data:
$ref: '#/definitions/dto.TrackingConfigData'
type: object
dto.TrackingConfigUpdateAttributes:
properties:
mode:
$ref: '#/definitions/dto.TrackingMode'
value:
type: string
type: object
dto.TrackingConfigUpdateData:
properties:
attributes:
$ref: '#/definitions/dto.TrackingConfigUpdateAttributes'
type:
type: string
type: object
dto.TrackingConfigUpdateRequest:
properties:
data:
$ref: '#/definitions/dto.TrackingConfigUpdateData'
type: object
dto.TrackingMode:
enum:
- branch
- tag
type: string
x-enum-varnames:
- TrackingModeBranch
- TrackingModeTag
jsonapi.Links:
properties:
first:
type: string
last:
type: string
next:
type: string
prev:
type: string
self:
type: string
type: object
jsonapi.Meta:
additionalProperties: {}
type: object
middleware.JSONAPIError:
properties:
detail:
type: string
id:
type: string
status:
type: string
title:
type: string
type: object
middleware.JSONAPIErrorResponse:
properties:
errors:
items:
$ref: '#/definitions/middleware.JSONAPIError'
type: array
type: object
host: localhost:8080
info:
contact: {}
description: Code understanding platform with hybrid search and LLM-powered enrichments
title: Kodit API
version: "1.0"
paths:
/enrichments:
get:
consumes:
- application/json
description: List enrichments with optional filters
parameters:
- description: Filter by enrichment type
in: query
name: enrichment_type
type: string
- description: Filter by enrichment subtype
in: query
name: enrichment_subtype
type: string
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIListResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List enrichments
tags:
- enrichments
/enrichments/{id}:
delete:
consumes:
- application/json
description: Delete an enrichment by ID
parameters:
- description: Enrichment ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Delete enrichment
tags:
- enrichments
get:
consumes:
- application/json
description: Get an enrichment by ID
parameters:
- description: Enrichment ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get enrichment
tags:
- enrichments
patch:
consumes:
- application/json
description: Update an enrichment's content
parameters:
- description: Enrichment ID
in: path
name: id
required: true
type: integer
- description: Update request
in: body
name: body
required: true
schema:
$ref: '#/definitions/dto.EnrichmentUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Update enrichment
tags:
- enrichments
/queue:
get:
consumes:
- application/json
description: List tasks in the queue
parameters:
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
- description: Filter by task type
in: query
name: task_type
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TaskListResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List tasks
tags:
- queue
/queue/{task_id}:
get:
consumes:
- application/json
description: Get a task by ID
parameters:
- description: Task ID
in: path
name: task_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TaskResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get task
tags:
- queue
/repositories:
get:
consumes:
- application/json
description: Get all tracked Git repositories
parameters:
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.RepositoryListResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List repositories
tags:
- repositories
post:
consumes:
- application/json
description: Add a new Git repository to track
parameters:
- description: Repository request
in: body
name: body
required: true
schema:
$ref: '#/definitions/dto.RepositoryCreateRequest'
produces:
- application/json
responses:
"200":
description: Repository already exists
schema:
$ref: '#/definitions/dto.RepositoryResponse'
"201":
description: Repository created
schema:
$ref: '#/definitions/dto.RepositoryResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Add repository
tags:
- repositories
/repositories/{id}:
delete:
consumes:
- application/json
description: Delete a repository by ID
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Delete repository
tags:
- repositories
get:
consumes:
- application/json
description: Get a repository by ID
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.RepositoryDetailsResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get repository
tags:
- repositories
/repositories/{id}/commits:
get:
consumes:
- application/json
description: List commits for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.CommitJSONAPIListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List commits
tags:
- repositories
/repositories/{id}/commits/{commit_sha}:
get:
consumes:
- application/json
description: Get a commit by SHA
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.CommitJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get commit
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/embeddings:
get:
deprecated: true
description: This endpoint has been removed. Embeddings are an internal detail
of snippets and enrichments.
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
produces:
- application/json
responses:
"410":
description: Gone
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List commit embeddings (deprecated)
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/enrichments:
delete:
consumes:
- application/json
description: Delete all enrichments for a commit
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
produces:
- application/json
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Delete commit enrichments
tags:
- repositories
get:
consumes:
- application/json
description: List enrichments for a commit
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: Filter by enrichment type
in: query
name: enrichment_type
type: string
- description: Filter by enrichment subtype
in: query
name: enrichment_subtype
type: string
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List commit enrichments
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/enrichments/{enrichment_id}:
delete:
consumes:
- application/json
description: Delete a specific enrichment from a commit
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: Enrichment ID
in: path
name: enrichment_id
required: true
type: integer
produces:
- application/json
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Delete commit enrichment
tags:
- repositories
get:
consumes:
- application/json
description: Get an enrichment by ID within commit context
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: Enrichment ID
in: path
name: enrichment_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get commit enrichment
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/files:
get:
consumes:
- application/json
description: List files for a commit
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.FileJSONAPIListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List commit files
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/files/{blob_sha}:
get:
consumes:
- application/json
description: Get a file by blob SHA
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: Blob SHA
in: path
name: blob_sha
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.FileJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get commit file
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/rescan:
post:
consumes:
- application/json
description: Trigger a rescan of a specific commit
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
produces:
- application/json
responses:
"202":
description: Accepted
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Rescan commit
tags:
- repositories
/repositories/{id}/commits/{commit_sha}/snippets:
get:
consumes:
- application/json
description: List code snippets for a commit (backed by enrichments)
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Commit SHA
in: path
name: commit_sha
required: true
type: string
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SnippetListResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List commit snippets
tags:
- repositories
/repositories/{id}/enrichments:
get:
consumes:
- application/json
description: List recent enrichments across commits for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Filter by enrichment type
in: query
name: enrichment_type
type: string
- description: 'Max commits to check (default: 100)'
in: query
name: max_commits_to_check
type: integer
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.EnrichmentJSONAPIListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List repository enrichments
tags:
- repositories
/repositories/{id}/status:
get:
consumes:
- application/json
description: Get indexing task status for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TaskStatusListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get repository status
tags:
- repositories
/repositories/{id}/status/summary:
get:
consumes:
- application/json
description: Get aggregated indexing status summary for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.RepositoryStatusSummaryResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get repository status summary
tags:
- repositories
/repositories/{id}/sync:
post:
consumes:
- application/json
description: Trigger a sync (git fetch + branch scan + commit indexing) for
a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"202":
description: Accepted
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Sync repository
tags:
- repositories
/repositories/{id}/tags:
get:
consumes:
- application/json
description: List tags for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: 'Page number (default: 1)'
in: query
name: page
type: integer
- description: 'Results per page (default: 20, max: 100)'
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TagJSONAPIListResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: List tags
tags:
- repositories
/repositories/{id}/tags/{tag_name}:
get:
consumes:
- application/json
description: Get a tag by name
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Tag name
in: path
name: tag_name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TagJSONAPIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get tag
tags:
- repositories
/repositories/{id}/tracking-config:
get:
consumes:
- application/json
description: Get current tracking configuration for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TrackingConfigResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Get tracking config
tags:
- repositories
put:
consumes:
- application/json
description: Update tracking configuration for a repository
parameters:
- description: Repository ID
in: path
name: id
required: true
type: integer
- description: Tracking config
in: body
name: body
required: true
schema:
$ref: '#/definitions/dto.TrackingConfigUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.TrackingConfigResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Update tracking config
tags:
- repositories
/search:
post:
consumes:
- application/json
description: Hybrid search across code snippets and enrichments
parameters:
- description: Search request
in: body
name: body
required: true
schema:
$ref: '#/definitions/dto.SearchRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.SearchResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/middleware.JSONAPIErrorResponse'
security:
- APIKeyAuth: []
summary: Search code
tags:
- search
securityDefinitions:
APIKeyAuth:
in: header
name: X-API-KEY
type: apiKey
swagger: "2.0"