# Create a parser version

Launch stage: 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

## Path parameters

- `parent` (string, required)
  Resource name of the parser to append a version to. Format:
   `parsers/{parser_id}`.

## Request body

The version to append.
- `name` (string, optional, ID, Immutable)
  Resource name. Format:
   `parsers/{parser_id}/versions/{version}`.
  Example: `parsers/550e8400-e29b-41d4-a716-446655440000/versions/2`
- `spec` (string, required, Immutable)
  The field definitions for this log source, as a YAML document. Validated on
   write, so an invalid spec is never stored.
- `description` (string, optional, Immutable)
  Free-form description of this version, set when the version is created.

## Returns

Returns the ParserVersion object.

## Response

```json
{
  "name": "parsers/550e8400-e29b-41d4-a716-446655440000/versions/2",
  "version": 0,
  "spec": "string",
  "create_time": "string",
  "created_by": {
    "id": "string",
    "principal_type": "REGULAR_USER",
    "email": "string",
    "display_name": "string"
  },
  "description": "string",
  "parser_name": "string"
}
```

