API Reference

Protocol Documentation

Table of Contents

Top

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.

FieldTypeLabelDescription
uuidstring
resource_uuidstring
resource_typestring
namespacestringNamespace groups related keys (e.g. "content", "technical", "access").
keystringKey of the label (e.g. "language", "topic", "sentiment").
valuestringValue of the label (e.g. "en", "legal", "neutral").
confidencefloatConfidence score in [0.0, 1.0].
sourcestringIdentifies the pipeline and model: "system:<pipeline>:<model_version>"
created_atgoogle.protobuf.Timestamp

Top

schemas/magpie/v1/resource.proto

Resource

Core resource structure (based on greyseal Resource)

FieldTypeLabelDescription
uuidstring
created_atgoogle.protobuf.Timestamp
servicestring
entitystring
sourceSource
pathstring
namestring

Source

NameNumberDescription
SOURCE_UNSPECIFIED0
SOURCE_WEBSITE1
SOURCE_PDF2
SOURCE_TEXT3

Top

schemas/magpie/v1/resource_label.proto

ResourceLabel

FieldTypeLabelDescription
uuidstring
label_uuidstring
resource_uuidstring
label_namestring
resource_namestring
created_atgoogle.protobuf.Timestamp

Top

schemas/magpie/v1/resource_tag.proto

ResourceTag

FieldTypeLabelDescription
uuidstring
tag_uuidstring
resource_uuidstring
tag_namestring
resource_namestring
created_atgoogle.protobuf.Timestamp

Top

schemas/magpie/v1/services/label.proto

CreateLabelRequest

FieldTypeLabelDescription
dataschemas.magpie.v1.Label

CreateLabelResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Label

GetLabelRequest

FieldTypeLabelDescription
uuidstring

GetLabelResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Label

ListLabelsRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional
resource_uuidstringoptional
namespacestringoptional

ListLabelsResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Labelrepeated
cursorstring
countint32

LabelService

Method NameRequest TypeResponse TypeDescription
ListLabelsListLabelsRequestListLabelsResponse
GetLabelGetLabelRequestGetLabelResponse
CreateLabelCreateLabelRequestCreateLabelResponse

Top

schemas/magpie/v1/services/resource.proto

CreateResourceRequest

FieldTypeLabelDescription
dataschemas.magpie.v1.Resource

CreateResourceResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Resource

GetResourceRequest

FieldTypeLabelDescription
uuidstring

GetResourceResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Resource

ListResourcesRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListResourcesResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Resourcerepeated
cursorstring
countint32

ResourceService

Method NameRequest TypeResponse TypeDescription
ListResourcesListResourcesRequestListResourcesResponse
GetResourceGetResourceRequestGetResourceResponse
CreateResourceCreateResourceRequestCreateResourceResponse

Top

schemas/magpie/v1/services/resource_label.proto

CreateResourceLabelRequest

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceLabel

CreateResourceLabelResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceLabel

GetResourceLabelRequest

FieldTypeLabelDescription
uuidstring

GetResourceLabelResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceLabel

ListResourceLabelsRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListResourceLabelsResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceLabelrepeated
cursorstring
countint32

ResourceLabelService

Method NameRequest TypeResponse TypeDescription
ListResourceLabelsListResourceLabelsRequestListResourceLabelsResponse
GetResourceLabelGetResourceLabelRequestGetResourceLabelResponse
CreateResourceLabelCreateResourceLabelRequestCreateResourceLabelResponse

Top

schemas/magpie/v1/services/resource_tag.proto

CreateResourceTagRequest

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceTag

CreateResourceTagResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceTag

GetResourceTagRequest

FieldTypeLabelDescription
uuidstring

GetResourceTagResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceTag

ListResourceTagsRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListResourceTagsResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.ResourceTagrepeated
cursorstring
countint32

ResourceTagService

Method NameRequest TypeResponse TypeDescription
ListResourceTagsListResourceTagsRequestListResourceTagsResponse
GetResourceTagGetResourceTagRequestGetResourceTagResponse
CreateResourceTagCreateResourceTagRequestCreateResourceTagResponse

Top

schemas/magpie/v1/tag.proto

Tag

FieldTypeLabelDescription
uuidstring
namestring
colorstring
created_atgoogle.protobuf.Timestamp

Top

schemas/magpie/v1/services/tag.proto

CreateTagRequest

FieldTypeLabelDescription
dataschemas.magpie.v1.Tag

CreateTagResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Tag

GetTagRequest

FieldTypeLabelDescription
uuidstring

GetTagResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Tag

ListTagsRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListTagsResponse

FieldTypeLabelDescription
dataschemas.magpie.v1.Tagrepeated
cursorstring
countint32

TagService

Method NameRequest TypeResponse TypeDescription
ListTagsListTagsRequestListTagsResponse
GetTagGetTagRequestGetTagResponse
CreateTagCreateTagRequestCreateTagResponse

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers โ€“ if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers โ€“ if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)