# Retrieve component variant metadata by ID

Fetches component variant metadata.

Endpoint: GET /api/v1/components/{componentId}/variant/{componentVariantId}/metadata
Version: v1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http Bearer

## Path parameters:

  - `componentId` (string, required)
    The component identifier.

  - `componentVariantId` (string, required)
    The component variant identifier.

## Query parameters:

  - `siteId` (string, required)
    The site identifier.

  - `environmentId` (string)
    The environment identifier. Defaults to "main". Currently only "main" is supported.

## Response 200:

  - `200` (unknown)
    Successful operation

## Response 200 fields (application/json):

  - `id` (string)
    The component variant identifier.
    Example: 2492bac4-da07-4c86-87f0-9873d40e2276

  - `componentId` (string)
    The component identifier.
    Example: 2492bac4-da07-4c86-87f0-9873d40e2276

  - `name` (string)
    The component variant name.
    Example: Promo Ba

  - `displayName` (string)
    The component variant display name.
    Example: Promo

  - `codeId` (string)
    The component variant code identifier.
    Example: 2492bac4-da07-4c86-87f0-9873d40e2276

  - `code` (string)
    The component variant code.
    Example: const Greeting = () => <h1>Hello!</h1>;

  - `parsedCode` (string)
    The parsed representation of the component variant code.
    Example: {"type":"nextjs-pages","code":{"type":"tsx","content":"Hi"},"styles":{"type":"css-module","content":""}}

## Response 400:

  - `400` (unknown)
    One or more validation errors occurred

## Response 400 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 404:

  - `404` (unknown)
    Invalid component or site ID

## Response 404 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

