---
title: "get metadata of a dataset"
method: GET
path: "/metadata"
---

# get metadata of a dataset

`GET /metadata`

Starts a metadata extraction task on the ingestor side, with live updates about the progress using Server Side Events (SSE).
It will close the connection with the final message containing the metadata json.

## Query parameters

- `filePath` string, required — The file path of the selected data record.
- `methodName` string, required — The selected methodName for data extraction.

## Response `200`

A continuous stream of server-sent events. Each event will contain two elements: an `event` tag and a `data` tag.
The `event` tag describes the type of event that was sent by the server. The `data`` tag will contain the actual data
of the response. The data itself will be always encoded in base64, and its format depends on the the event type.
Here's a list of possible event types and the corresponding data formats:
 - event: message
   data: a string of the message sent by the server. It's most often used for communicating server status (not 
   related to the extractor itself)
 - event: error
   data: a string that describes the error encountered. This event also normally means that the stream will be closed as
     it describes a fatal error.
 - event: progress
   data: a json that contains the following fields: "std_out", "std_err", "result" (optional), "err" (optional)
      - std_out and std_err are the extractor executable's standard out and standard error streams respectively.
      - result and err are added when the extractor finishes, where result should contain the metadata json, and
        err should contain any fatal errors returned by the extractor (if there was any). If these two fields are
        included, then that means the extractor finished and this will be the last event of the stream.

## Other responses

- `default` — Unexpected error

## Changes

> 50 revisions in range; 3 not diffed.

- **2025-02-10** `9782fadb8c8d` — 1 info
  - the endpoint scheme security `cookieAuth` was added to the API
- **2025-01-28** `428c85eceb74` — 3 breaking
  - added the new required `query` request parameter `filePath`
  - added the new required `query` request parameter `methodName`
  - removed the request body
- **2024-12-13** `541ca29e2640` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/changes/metadata/get.md)

---

[API](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api.md) · [All operations](https://skmtc.dev/swissopenem/apis/scicat-ingestor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swissopenem/scicat-ingestor-api/revisions/f35bb454d121/schema)
