# Get Custom Metadata Schema

Retrieve the schema of custom metadata fields that have been used in events for a given use case. This is useful for discovering what metadata fields are available for filtering in [query requests](https://docs.roboflow.com/developer/rest-api/vision-events/query-vision-events).

**Required scope:** `vision-events:read` or `device:read`

{% openapi src="<https://1284666567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe5GEiPeDoFksvZv1vH3A%2Fuploads%2Fgit-blob-0e98238ab4157276fe00dee89f522ee5a021e711%2Fopenapi.yaml?alt=media>" path="/vision-events/custom-metadata-schema/{useCaseId}" method="get" %}
[openapi.yaml](https://1284666567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe5GEiPeDoFksvZv1vH3A%2Fuploads%2Fgit-blob-0e98238ab4157276fe00dee89f522ee5a021e711%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Path Parameters

* **`:useCaseId`** (string, required): The use case ID.

### Example Request

```bash
curl "https://api.roboflow.com/vision-events/custom-metadata-schema/a1b3c8e1" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Example Response

{% tabs %}
{% tab title="200" %}

```json
{
  "fields": {
    "production_line": {
      "types": ["string"]
    },
    "temperature": {
      "types": ["number"]
    },
    "is_overtime": {
      "types": ["boolean"]
    }
  }
}
```

Each field in the `fields` object includes:

* **`types`** (array of strings): The data types observed for this field, each one of `string`, `number`, or `boolean`. A field may have multiple types if different events used different types for the same key.
  {% endtab %}

{% tab title="403" %}

```json
{
  "error": "Insufficient permissions for this resource."
}
```

{% endtab %}
{% endtabs %}
