โ Magpie
API Reference
Protocol Documentation
Table of Contents
schemas/magpie/v1/label.proto
Label
A single system-generated label on a resource. Labels are machine-authored, key=value structured, confidence-scored, and attached directly to a resource. They are immutable after creation.
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| resource_uuid | string | ||
| resource_type | string | ||
| namespace | string | Namespace groups related keys (e.g. "content", "technical", "access"). | |
| key | string | Key of the label (e.g. "language", "topic", "sentiment"). | |
| value | string | Value of the label (e.g. "en", "legal", "neutral"). | |
| confidence | float | Confidence score in [0.0, 1.0]. | |
| source | string | Identifies the pipeline and model: "system:<pipeline>:<model_version>" | |
| created_at | google.protobuf.Timestamp |
schemas/magpie/v1/resource.proto
Resource
Core resource structure (based on greyseal Resource)
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| created_at | google.protobuf.Timestamp | ||
| service | string | ||
| entity | string | ||
| source | Source | ||
| path | string | ||
| name | string |
Source
| Name | Number | Description |
|---|---|---|
| SOURCE_UNSPECIFIED | 0 | |
| SOURCE_WEBSITE | 1 | |
| SOURCE_PDF | 2 | |
| SOURCE_TEXT | 3 |
schemas/magpie/v1/resource_label.proto
ResourceLabel
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| label_uuid | string | ||
| resource_uuid | string | ||
| label_name | string | ||
| resource_name | string | ||
| created_at | google.protobuf.Timestamp |
schemas/magpie/v1/resource_tag.proto
ResourceTag
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| tag_uuid | string | ||
| resource_uuid | string | ||
| tag_name | string | ||
| resource_name | string | ||
| created_at | google.protobuf.Timestamp |
schemas/magpie/v1/services/label.proto
CreateLabelRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Label |
CreateLabelResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Label |
GetLabelRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetLabelResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Label |
ListLabelsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional | |
| resource_uuid | string | optional | |
| namespace | string | optional |
ListLabelsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Label | repeated | |
| cursor | string | ||
| count | int32 |
LabelService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListLabels | ListLabelsRequest | ListLabelsResponse | |
| GetLabel | GetLabelRequest | GetLabelResponse | |
| CreateLabel | CreateLabelRequest | CreateLabelResponse |
schemas/magpie/v1/services/resource.proto
CreateResourceRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Resource |
CreateResourceResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Resource |
GetResourceRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetResourceResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Resource |
ListResourcesRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListResourcesResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Resource | repeated | |
| cursor | string | ||
| count | int32 |
ResourceService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListResources | ListResourcesRequest | ListResourcesResponse | |
| GetResource | GetResourceRequest | GetResourceResponse | |
| CreateResource | CreateResourceRequest | CreateResourceResponse |
schemas/magpie/v1/services/resource_label.proto
CreateResourceLabelRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceLabel |
CreateResourceLabelResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceLabel |
GetResourceLabelRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetResourceLabelResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceLabel |
ListResourceLabelsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListResourceLabelsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceLabel | repeated | |
| cursor | string | ||
| count | int32 |
ResourceLabelService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListResourceLabels | ListResourceLabelsRequest | ListResourceLabelsResponse | |
| GetResourceLabel | GetResourceLabelRequest | GetResourceLabelResponse | |
| CreateResourceLabel | CreateResourceLabelRequest | CreateResourceLabelResponse |
schemas/magpie/v1/services/resource_tag.proto
CreateResourceTagRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceTag |
CreateResourceTagResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceTag |
GetResourceTagRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetResourceTagResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceTag |
ListResourceTagsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListResourceTagsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.ResourceTag | repeated | |
| cursor | string | ||
| count | int32 |
ResourceTagService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListResourceTags | ListResourceTagsRequest | ListResourceTagsResponse | |
| GetResourceTag | GetResourceTagRequest | GetResourceTagResponse | |
| CreateResourceTag | CreateResourceTagRequest | CreateResourceTagResponse |
schemas/magpie/v1/tag.proto
Tag
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| name | string | ||
| color | string | ||
| created_at | google.protobuf.Timestamp |
schemas/magpie/v1/services/tag.proto
CreateTagRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Tag |
CreateTagResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Tag |
GetTagRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetTagResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Tag |
ListTagsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListTagsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.magpie.v1.Tag | repeated | |
| cursor | string | ||
| count | int32 |
TagService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListTags | ListTagsRequest | ListTagsResponse | |
| GetTag | GetTagRequest | GetTagResponse | |
| CreateTag | CreateTagRequest | CreateTagResponse |
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) |