Skip to main content

Parser Version

View as Markdown

One immutable version of a parser, carrying the spec.

Immutable: an edit creates a new version rather than mutating an existing one, so a data source that pins a version is never affected. Version numbers are never reused, including after a delete.

ParserVersion object​

One immutable version of a parser, carrying the spec.

Immutable: an edit creates a new version rather than mutating an existing one, so a data source that pins a version is never affected. Version numbers are never reused, including after a delete.

namestringBetaIDImmutable

Resource name. Format: parsers/{parser_id}/versions/{version}.

Example: parsers/550e8400-e29b-41d4-a716-446655440000/versions/2

versionint64BetaOutput only

Version number, assigned by the server when the version is appended.

specstringBetaImmutable

The field definitions for this log source, as a YAML document. Validated on write, so an invalid spec is never stored.

create_timestringBetaOutput only

When this version was appended.

created_byobjectBetaOutput only

The principal that appended this version.

Show child attributesHide child attributes
idstringBeta

User / service-principal ID.

principal_typestringBeta

Whether this principal is a regular user, service principal, or system principal.

Values:

  • REGULAR_USER
  • SERVICE_PRINCIPAL
  • SYSTEM_USER
emailstringBeta

Email (regular users only).

display_namestringBeta

Display name (user or SP name).

descriptionstringBetaImmutable

Free-form description of this version, set when the version is created.

parser_namestringBetaOutput only

The parent parser's name, copied from the container on read. Denormalized so a caller that needs identity alongside the spec reads the version alone rather than the container as well. Populated by GetParserVersion; List omits it, as List omits spec.

Get a parser version Beta​

GET /api/2.0/lakewatch/{name=parsers/*/versions/*}

Returns one version of a parser, including its spec.

API scopes: lakewatch

Parameters​

namestringRequiredpath

Resource name of the version. Format: parsers/{parser_id}/versions/{version}, where {version} is either a version number or the alias latest. latest is NOT_FOUND when every version of the parser has been deleted.

Response​

Returns the ParserVersion object.

List parser versions Beta​

GET /api/2.0/lakewatch/{parent=parsers/*}/versions

Lists a parser's versions, oldest first, without their specs.

API scopes: lakewatch

Parameters​

parentstringRequiredpath

Resource name of the parser whose versions are listed. Format: parsers/{parser_id}.

page_sizeint32query

Maximum number of results to return in one page. This is a best-effort upper bound, not a guarantee: the server may return fewer items than requested (even zero) while more results still exist. If unset or 0, the server picks a default.

page_tokenstringquery

Page token from a previous ListParserVersions response, used to fetch the next page of results. Send the same parent when requesting later pages; a token from a request for a different parser is rejected.

Response​

Returns a list of ParserVersion objects.

Create a parser version Beta​

POST /api/2.0/lakewatch/{parent=parsers/*}/versions

Appends a new immutable version, advancing the parser's latest-version pointer. This is how a parser is edited; versions are never changed in place.

API scopes: lakewatch

Parameters​

parentstringRequiredpath

Resource name of the parser to append a version to. Format: parsers/{parser_id}.

Request body​

The version to append.

namestringIDImmutable

Resource name. Format: parsers/{parser_id}/versions/{version}.

Example: parsers/550e8400-e29b-41d4-a716-446655440000/versions/2

specstringRequiredImmutable

The field definitions for this log source, as a YAML document. Validated on write, so an invalid spec is never stored.

descriptionstringImmutable

Free-form description of this version, set when the version is created.

Response​

Returns the ParserVersion object.

Delete a parser version Beta​

DELETE /api/2.0/lakewatch/{name=parsers/*/versions/*}

Deletes one version of a parser. Returns NOT_FOUND when the parser or the version does not exist, and a conflict (HTTP 409) only while a data source references the version. Deleting the last version leaves the parser in place with no versions.

API scopes: lakewatch

Parameters​

namestringRequiredpath

Resource name of the version. Format: parsers/{parser_id}/versions/{version}, where {version} is a version number written without sign or leading zeros, such as 3. Unlike GetParserVersion, the alias latest and forms such as 007 or +3 are rejected, so a delete always names one fixed version.