โ Shrike
API Reference
Protocol Documentation
Table of Contents
schemas/shrike/v1/envelope.proto
EntityEnvelope
| Field | Type | Label | Description |
|---|---|---|---|
| entity_uuid | string | ||
| app | string | ||
| entity_type | string | ||
| topic | string | ||
| event_type | string | "created" | |
| occurred_at | google.protobuf.Timestamp | ||
| payload | bytes |
schemas/shrike/v1/import_request.proto
ImportRequest
ImportRequest is published to the shrike Kafka topic by upstream services when a new resource is ready to be ingested. It carries the entity identity, the upstream domain, and a pointer to the pre-extracted text file stored in S3/MinIO.
| Field | Type | Label | Description |
|---|---|---|---|
| entity_uuid | string | ||
| entity_type | string | e.g. "Book", "Site" | |
| app | string | upstream service / domain e.g. "weevil", "lynx" | |
| bucket | string | S3/MinIO bucket name | |
| key | string | S3/MinIO object key (path to the text file) | |
| title | string | ||
| tags | string | repeated | |
| metadata | ImportRequest.MetadataEntry | repeated | author, isbn, source_url, etc. |
ImportRequest.MetadataEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
schemas/shrike/v1/index_record.proto
IndexRecord
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| app | string | ||
| entity_type | string | ||
| title | string | ||
| source_url | string | ||
| tags | string | repeated | |
| indexed_at | google.protobuf.Timestamp |
schemas/shrike/v1/services/index_record.proto
CreateIndexRecordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.shrike.v1.IndexRecord |
CreateIndexRecordResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.shrike.v1.IndexRecord |
DeleteIndexRecordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
DeleteIndexRecordResponse
| Field | Type | Label | Description |
|---|---|---|---|
| success | bool |
GetIndexRecordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetIndexRecordResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.shrike.v1.IndexRecord |
ListIndexRecordsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListIndexRecordsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.shrike.v1.IndexRecord | repeated | |
| cursor | string | ||
| count | int32 |
UpdateIndexRecordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| data | schemas.shrike.v1.IndexRecord |
UpdateIndexRecordResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.shrike.v1.IndexRecord |
IndexRecordService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListIndexRecords | ListIndexRecordsRequest | ListIndexRecordsResponse | |
| GetIndexRecord | GetIndexRecordRequest | GetIndexRecordResponse | |
| CreateIndexRecord | CreateIndexRecordRequest | CreateIndexRecordResponse | |
| UpdateIndexRecord | UpdateIndexRecordRequest | UpdateIndexRecordResponse | |
| DeleteIndexRecord | DeleteIndexRecordRequest | DeleteIndexRecordResponse |
schemas/shrike/v1/services/search.proto
Facet
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | ||
| values | FacetValue | repeated |
FacetValue
| Field | Type | Label | Description |
|---|---|---|---|
| value | string | ||
| count | int64 |
GetEntityRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetEntityResponse
| Field | Type | Label | Description |
|---|---|---|---|
| entity_uuid | string | ||
| app | string | ||
| entity_type | string | ||
| title | string | ||
| full_text | string | ||
| source_url | string | ||
| tags | string | repeated | |
| indexed_at | string |
GetIndexStatsRequest
GetIndexStatsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| total_documents | int64 | ||
| qdrant_vectors | int64 | ||
| postgres_rows | int64 | ||
| last_updated | google.protobuf.Timestamp |
Highlight
| Field | Type | Label | Description |
|---|---|---|---|
| field | string | ||
| fragment | string |
ReindexRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
ReindexResponse
| Field | Type | Label | Description |
|---|---|---|---|
| success | bool | ||
| message | string |
SearchFilter
| Field | Type | Label | Description |
|---|---|---|---|
| apps | string | repeated | |
| entity_types | string | repeated | |
| tags | string | repeated | |
| after_date | string | ||
| before_date | string | ||
| entity_uuids | string | repeated | restrict results to these entity UUIDs |
SearchOptions
| Field | Type | Label | Description |
|---|---|---|---|
| fuzzy | bool | ||
| fuzziness | int32 | ||
| highlight | bool |
SearchRequest
| Field | Type | Label | Description |
|---|---|---|---|
| query | string | ||
| mode | string | "semantic" | |
| limit | int32 | ||
| min_score | float | ||
| filter | SearchFilter | ||
| options | SearchOptions | ||
| page_size | int32 | ||
| page_number | int32 |
SearchResponse
| Field | Type | Label | Description |
|---|---|---|---|
| results | SearchResult | repeated | |
| total | int32 | ||
| mode_used | string | ||
| facets | Facet | repeated | |
| page_number | int32 | ||
| total_pages | int32 | ||
| took_ms | int64 |
SearchResult
| Field | Type | Label | Description |
|---|---|---|---|
| entity_uuid | string | ||
| app | string | ||
| entity_type | string | ||
| title | string | ||
| snippet | string | ||
| preview | string | ||
| source_url | string | ||
| score | float | ||
| tags | string | repeated | |
| highlights | Highlight | repeated |
SuggestRequest
| Field | Type | Label | Description |
|---|---|---|---|
| query | string | ||
| field | string | ||
| max_suggestions | int32 |
SuggestResponse
| Field | Type | Label | Description |
|---|---|---|---|
| suggestions | string | repeated |
SearchService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Search | SearchRequest | SearchResponse | |
| GetEntity | GetEntityRequest | GetEntityResponse | |
| Suggest | SuggestRequest | SuggestResponse | |
| GetIndexStats | GetIndexStatsRequest | GetIndexStatsResponse | |
| Reindex | ReindexRequest | ReindexResponse |
schemas/shrike/v1/text_extracted.proto
TextExtractedEvent
| Field | Type | Label | Description |
|---|---|---|---|
| entity_uuid | string | ||
| app | string | ||
| entity_type | string | ||
| full_text | string | ||
| title | string | ||
| source_url | string | ||
| tags | string | repeated |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers โ if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers โ if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |