Codag Capsule API
The Capsule API from Codag — 1 operation(s) for capsule.
The Capsule API from Codag — 1 operation(s) for capsule.
openapi: 3.1.0
info:
title: infra-logs templater Activate Capsule API
description: Token compression for log streams. POST raw logs, get back templates or capsules.
version: 0.1.0
tags:
- name: Capsule
paths:
/v1/capsule:
post:
summary: Capsule Endpoint
operationId: capsule_endpoint_v1_capsule_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CapsuleRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/CapsuleResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
deprecated: true
tags:
- Capsule
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ParseStats:
properties:
llm_calls:
type: integer
title: Llm Calls
cache_hits:
type: integer
title: Cache Hits
unmatched:
type: integer
title: Unmatched
elapsed_ms:
type: integer
title: Elapsed Ms
incident_family_hits:
type: integer
title: Incident Family Hits
default: 0
incident_induced_templates:
type: integer
title: Incident Induced Templates
default: 0
global_cache_hits:
type: integer
title: Global Cache Hits
default: 0
global_shadow_hits:
type: integer
title: Global Shadow Hits
default: 0
global_shadow_agreements:
type: integer
title: Global Shadow Agreements
default: 0
global_shadow_disagreements:
type: integer
title: Global Shadow Disagreements
default: 0
total_patterns:
type: integer
title: Total Patterns
default: 0
candidate_patterns:
type: integer
title: Candidate Patterns
default: 0
dropped_patterns:
type: integer
title: Dropped Patterns
default: 0
cache_pattern_hits:
type: integer
title: Cache Pattern Hits
default: 0
global_cache_pattern_hits:
type: integer
title: Global Cache Pattern Hits
default: 0
type: object
required:
- llm_calls
- cache_hits
- unmatched
- elapsed_ms
title: ParseStats
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
LineRecord:
properties:
line_id:
type: integer
title: Line Id
message:
type: string
maxLength: 262144
title: Message
level:
anyOf:
- type: string
maxLength: 32
- type: 'null'
title: Level
timestamp:
anyOf:
- type: string
maxLength: 128
- type: 'null'
title: Timestamp
service:
anyOf:
- type: string
maxLength: 256
- type: 'null'
title: Service
type: object
required:
- line_id
- message
title: LineRecord
description: One log record with metadata for capsule construction.
CapsuleResponse:
properties:
capsule:
additionalProperties: true
type: object
title: Capsule
stats:
$ref: '#/components/schemas/ParseStats'
type: object
required:
- capsule
- stats
title: CapsuleResponse
CapsuleRequest:
properties:
lines:
items:
$ref: '#/components/schemas/LineRecord'
type: array
maxItems: 1000000
title: Lines
metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Metadata
engine:
anyOf:
- type: string
enum:
- auto
- inference
- deterministic
- type: 'null'
title: Engine
type: object
required:
- lines
title: CapsuleRequest