---
title: "get a Python snippet that fetches an hdf dataset or group"
method: GET
path: "/hdf/snippet/{fpath}"
---

# get a Python snippet that fetches an hdf dataset or group

`GET /hdf/snippet/{fpath}`

get a Python snippet that fetches the hdf dataset or group pointed to by the path and uri

## Response `200`

python code snippet

- string — python code snippet

## Other responses

- `400` — the request was malformed; url should be of the format `"fpath?uri=uri"`
- `401` — the request did not specify a file that `h5py` could understand
- `403` — the request specified a file that does not exist
- `500` — found and opened file, error getting contents from object specified by the uri

## Changes

- **2020-12-16** `b1378ccddf8a` — 1 info
  - endpoint added
- **2019-07-25** `99123c1740e3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/jupyter-server/apis/jupyterlab-hdf5-proxy/changes/hdf/snippet/:fpath/get.md)

---

[API](https://skmtc.dev/jupyter-server/apis/jupyterlab-hdf5-proxy.md) · [All operations](https://skmtc.dev/jupyter-server/apis/jupyterlab-hdf5-proxy/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jupyter-server/jupyterlab-hdf5-proxy/revisions/4cb4fe162160/schema)
