---
title: "get the contents of an hdf object"
method: GET
path: "/hdf/contents/{fpath}"
---

# get the contents of an hdf object

`GET /hdf/contents/{fpath}`

get the contents of an hdf object

## Response `200`

data representing an arbitrary hdf object, in the format required by the jupyterlab `Contents` stack. If object is a dataset, basic information (including metadata) about that dataset will be reutrned as a dict. If object is a group, then basic information (but not metadata) about that group's children will be returned as an array of dicts

- union
  - DatasetContents — a basic description of an hdf dataset, in the format required by the jupyterlab `Contents` stack
    - `content` DatasetMeta — metadata of an hdf dataset, as a dictionary
      - `attributes` AttrMeta[], required — metadata of the attributes of a dataset
        - `name` string, required — name of an attribute
        - `dtype` string, required — datatype of an attribute
        - `shape` number[], required — shape of an attribute
      - `dtype` string, required — datatype of an hdf dataset
      - `labels` Slice[], required — ranges that label the indices of an hdf dataset, given as an array of slices
        - `start` number, required — first index of the slice
        - `stop` number, required — one past the last index of the slice
        - `step` number, required — step of the slice
      - `name` string, required — name of hdf dataset
      - `ndim` number, required — count of dimensions of an hdf dataset
      - `shape` number[], required — shape of an hdf dataset
      - `size` number, required — count of entries of an hdf dataset
      - `type` 'dataset', required — the string literal `"dataset"`
    - `name` string, required — object name (ie last part of uri)
    - `type` 'dataset', required — the string literal `"dataset"`
    - `uri` string, required — full uri pointing to the object
  - Contents[]
    - union — data representing an arbitrary hdf object, in the format required by the jupyterlab `Contents` stack
      - DatasetContents — a basic description of an hdf dataset, in the format required by the jupyterlab `Contents` stack
        - `content` DatasetMeta — metadata of an hdf dataset, as a dictionary
          - `attributes` AttrMeta[], required — metadata of the attributes of a dataset
            - `name` string, required — name of an attribute
            - `dtype` string, required — datatype of an attribute
            - `shape` number[], required — shape of an attribute
          - `dtype` string, required — datatype of an hdf dataset
          - `labels` Slice[], required — ranges that label the indices of an hdf dataset, given as an array of slices
            - `start` number, required — first index of the slice
            - `stop` number, required — one past the last index of the slice
            - `step` number, required — step of the slice
          - `name` string, required — name of hdf dataset
          - `ndim` number, required — count of dimensions of an hdf dataset
          - `shape` number[], required — shape of an hdf dataset
          - `size` number, required — count of entries of an hdf dataset
          - `type` 'dataset', required — the string literal `"dataset"`
        - `name` string, required — object name (ie last part of uri)
        - `type` 'dataset', required — the string literal `"dataset"`
        - `uri` string, required — full uri pointing to the object
      - GroupContents — a basic description of an hdf group, in the format required by the jupyterlab `Contents` stack
        - `name` string, required — object name (ie last part of uri)
        - `type` 'group', required — the string literal `"group"`
        - `uri` string, required — full uri pointing to the object

## 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

---

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