get_schema
Read the active schema document, or a specific version of it.
async fn get_schema(&self, query: &SchemaGetQuery) -> Result<Schema, BrainHttpError>async fn get_schema(&self, request: &SchemaGetRequest) -> Result<SchemaGetResponse>Parameters
ParameterTypeRequired
namespacestringoptionalWhich schema namespace. Defaults to the caller's.
versionintegeroptionalA specific version. Omit for the current one.
Returns
FieldTypePresence
namespacestringalwaysThe namespace.
schema_versionintegeralwaysIts version number.
schema_documentstringalwaysThe document itself.
uploaded_at_unix_nanos64-bit integeralwaysWhen it landed.
validator_versionintegeralwaysWhich validator accepted it. A document that passed under an older validator is not guaranteed to pass under a newer one.
See also
Was this page helpful?