# Create a parser

Launch stage: Beta

`POST /api/2.0/lakewatch/parsers`

Creates a parser and its first version in one call.

API scopes: lakewatch

## Request body

The parser to create. `spec` and `description` become version 1.
- `name` (string, optional, ID, Immutable)
  Resource name. Format: `parsers/{parser_id}`, where the leaf is the
   immutable server-assigned UUID. Create-time placement names are stored
   separately and do not affect the resource name.
  Example: `parsers/550e8400-e29b-41d4-a716-446655440000`
- `catalog_name` (string, required, Immutable)
  Name of the parent UC catalog, set on create. Reads return the value as
   supplied; the current UC catalog name is reported in
   `effective_catalog_name`.
- `schema_name` (string, required, Immutable)
  Name of the parent UC schema, set on create. Reads return the value as
   supplied; the current UC schema name is reported in `effective_schema_name`.
- `parser_name` (string, required, Immutable)
  Client-supplied parser name, stored as supplied and fixed at create time.
   Must be a valid UC identifier. A custom parser is not currently a UC securable
   and this field has no rename path.
- `spec` (string, required, Input only, Immutable)
  Spec of version 1, as a YAML document. Accepted only by `CreateParser`; read
   a version's spec with `GetParserVersion`.
- `description` (string, optional, Input only, Immutable)
  Description of version 1. Accepted only by `CreateParser`; read a version's
   description with `GetParserVersion`.

## Returns

Returns the Parser object.

## Response

```json
{
  "name": "parsers/550e8400-e29b-41d4-a716-446655440000",
  "parser_id": "string",
  "catalog_name": "string",
  "schema_name": "string",
  "parser_name": "string",
  "latest_version": 0,
  "create_time": "string",
  "created_by": {
    "id": "string",
    "principal_type": "REGULAR_USER",
    "email": "string",
    "display_name": "string"
  },
  "owner": {
    "id": "string",
    "principal_type": "REGULAR_USER",
    "email": "string",
    "display_name": "string"
  },
  "effective_catalog_name": "string",
  "effective_schema_name": "string"
}
```

