REST Resource: projects.schemas

Resource: Schema

A schema resource.

JSON representation
{"name":string,"type":enum (Type),"definition":string,"revisionId":string,"revisionCreateTime":string}
Fields
name

string

Required. Name of the schema. Format isprojects/{project}/schemas/{schema}.

type

enum (Type)

The type of the schema definition.

definition

string

The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified intype.

revisionId

string

Output only. Immutable. The revision ID of the schema.

revisionCreateTime

string (Timestamp format)

Output only. The timestamp that the revision was created.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:"2014-10-02T15:01:23Z","2014-10-02T15:01:23.045123456Z" or"2014-10-02T15:01:23+05:30".

Type

Possible schema definition types.

Enums
TYPE_UNSPECIFIEDDefault value. This value is unused.
PROTOCOL_BUFFERA Protocol Buffer schema definition.
AVROAn Avro schema definition.

Methods

commit

Commits a new schema revision to an existing schema.

create

Creates a schema.

delete

Deletes a schema.

deleteRevision

Deletes a specific schema revision.

get

Gets a schema.

list

Lists schemas in a project.

listRevisions

Lists all schema revisions for the named schema.

rollback

Creates a new schema revision that is a copy of the provided revision_id.

validate

Validates a schema.

validateMessage

Validates a message against a schema.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-22 UTC.