# Use Cases

## 사용 사례

Use Case는 공통 목적과 사용자 지정 메타데이터 구조를 공유하는 Vision Events를 그룹화합니다. 모든 이벤트는 정확히 하나의 Use Case에 속합니다. 같은 Use Case의 이벤트는 일반적으로 동일한 메타데이터 필드를 공유하므로, 서로 다른 소스 전반의 데이터를 쉽게 필터링하고 비교할 수 있습니다.

### 하나의 Use Case를 사용할 때와 여러 Use Case를 사용할 때

**이벤트를 같은 Use Case에 넣으세요** 서로 다른 위치, 카메라 또는 장치에서 오더라도 유사한 사용자 지정 메타데이터 필드를 공유할 때입니다. 예를 들어, "Defect Detection" Use Case는 여러 공장에서 이벤트를 받을 수 있지만, 모든 이벤트에는 `line_id`, `shift`, 그리고 `part_number`.

**별도의 Use Case를 만드세요** 메타데이터 구조가 근본적으로 다를 때입니다. 예:

* **Assembly Line QA** — 추적합니다 `line_id`, `shift`, `part_number`
* **Warehouse Inventory** — 추적합니다 `통로`, `선반`, `item_type`
* **Construction Site Safety** — 추적합니다 `zone`, `alert_type`, `contractor`

### Use Case 만들기

#### Dashboard에서

1. 이동하세요 **Vision Events** workspace의 왼쪽 사이드바에서
2. 클릭하세요 **+ Create Use Case**
3. Use Case 이름을 입력하세요

<figure><img src="/files/058ef7e3dc122a0b87868780f2de5e9f8affa59d" alt="" width="375"><figcaption></figcaption></figure>

REST API를 통해서도 Use Case를 만들 수 있습니다. 자세한 내용은 [Use Cases를 프로그래밍 방식으로 관리하기](#manage-use-cases-programmatically).

### Use Cases 보기

#### Dashboard에서

Vision Events 페이지에는 모든 Use Case의 표가 표시되며, 다음이 포함됩니다:

* Use Case 이름
* 총 이벤트 수
* 마지막 이벤트 타임스탬프
* 사용 중인 이벤트 유형

#### API를 통해

workspace의 모든 Use Case를 가져옵니다:

```bash
curl -X GET "https://api.roboflow.com/vision-events/use-cases" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

다음을 참조하세요 [Vision Events API Reference](https://docs.roboflow.com/developer/rest-api/vision-events) 전체 응답 형식은.

### Use Cases를 프로그래밍 방식으로 관리하기

Dashboard 외에도 REST API를 통해 Use Case를 만들고, 이름을 변경하고, 보관하고, 보관 해제할 수 있습니다. 이러한 엔드포인트에는 `vision-events:manage` 범위가 있는 API 키가 필요합니다(제한 없는 workspace API 키는 기본적으로 접근 권한이 있습니다).

**Use Case 만들기**

```bash
curl -X POST "https://api.roboflow.com/vision-events/use-cases" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "name": "assembly-line-qa" }'
```

**Use Case 이름 변경**

```bash
curl -X PUT "https://api.roboflow.com/vision-events/use-cases/USE_CASE_ID" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "name": "assembly-line-qa-v2" }'
```

**Use Case 보관 또는 보관 해제**

```bash
curl -X POST "https://api.roboflow.com/vision-events/use-cases/USE_CASE_ID/archive" \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X POST "https://api.roboflow.com/vision-events/use-cases/USE_CASE_ID/unarchive" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Use Case 보관

Use Case가 더 이상 필요하지 않으면 Dashboard에서 보관할 수 있습니다. 보관된 Use Case와 해당 이벤트는 계속 접근 가능하지만 기본 보기에서는 숨겨집니다. 아래의 **보관된 use cases 보기** 를 클릭하면 확인할 수 있습니다.\ <br>

<figure><img src="/files/91314253e8b39652a59ffe9f5eef28a83326baa6" alt=""><figcaption></figcaption></figure>

### 사용자 지정 메타데이터 스키마

이벤트가 Use Case로 전송되면, 시스템은 관찰된 필드와 값 유형을 기반으로 메타데이터 스키마를 추론합니다. Use Case의 추론된 스키마를 가져와 어떤 키와 값 유형이 사용 중인지 확인할 수 있습니다:

```bash
curl -X GET "https://api.roboflow.com/vision-events/custom-metadata-schema/assembly-line-qa" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**예시 응답:**

```json
{
  "useCaseId": "assembly-line-qa",
  "fields": {
    "line_id": { "types": ["string"] },
    "shift": { "types": ["string"] },
    "temperature": { "types": ["number"] },
    "is_priority": { "types": ["boolean"] }
  }
}
```

다음을 참조하세요 [Vision Events API Reference](https://docs.roboflow.com/developer/rest-api/vision-events) 전체 세부 정보는


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/vision-events/use-cases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
