> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atomscale.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Finalize Metrology Stream

> Finalize a stream, marking it as complete

Ends an active metrology streaming session and marks it as complete. Changes the pipeline status from `stream_active` to `success`. Once finalized, a stream cannot accept additional data.

<ParamField path="data_id" type="string" required>
  The data entry UUID for the streaming session
</ParamField>

## Response

<ResponseField name="data_id" type="string">
  The data ID for the finalized stream
</ResponseField>

<ResponseField name="processed_data_id" type="string">
  UUID for the processed data entry
</ResponseField>

<RequestExample>
  ```python SDK theme={null}
  from atomscale.streaming import TimeseriesStreamer

  streamer = TimeseriesStreamer(api_key="YOUR_API_KEY")
  streamer.finalize("d290f1ee-6c54-4b01-90e6-d701748f0851")
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.atomscale.ai/metrology/stream/d290f1ee-6c54-4b01-90e6-d701748f0851/finalize",
      headers={"X-API-KEY": "YOUR_API_KEY"}
  )
  result = response.json()
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.atomscale.ai/metrology/stream/d290f1ee-6c54-4b01-90e6-d701748f0851/finalize" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "processed_data_id": "e3a1b2c3-4567-89ab-cdef-234567890abc"
  }
  ```
</ResponseExample>
