Skip to content

Add support to return the container data in a JSON‑formatted file - #141

Merged
khaledk2 merged 4 commits into
ome:mainfrom
khaledk2:return_a_json_for_container
May 14, 2026
Merged

Add support to return the container data in a JSON‑formatted file#141
khaledk2 merged 4 commits into
ome:mainfrom
khaledk2:return_a_json_for_container

Conversation

@khaledk2

@khaledk2 khaledk2 commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

This PR adds support for returning container data files in JSON format

It has a new endpoint container_data/ which is replacing container_bff_data/

It accepts container name, container type (project or screen) and the file type (now supports JSON, BFF file format, i.e. CSV and Parquet)

It has been deployed to idr-testing, for example, the following URL returns JSON for idr0050-springer-cytoskeletalsystems/experimentA

`https://idr-testing.openmicroscopy.org/searchengine//api/v1/resources/container_data/?container_name=idr0050-springer-cytoskeletalsystems%2FexperimentA%20&container_type=project&file_type=json

@will-moore, please update idr gallery to use the new container_data/ endpoint.

The container_bff_data/ endpoint has not been removed yet to avoid breaking the idr-testing BFF integration functionality until updating the idr gallery.

@will-moore

Copy link
Copy Markdown
Member

Looking at the JSON output, I see that both the first 2 key_values items in the list have the same "index": 0.0. Is this meant to be a float?

Full output of first image...

[
  {
    "image_webclient_url": "https://idr.openmicroscopy.org/webclient/?show=image-15160018",
    "image_url": "https://idr.openmicroscopy.org/webclient/img_detail/15160018/",
    "thumb_url": "https://idr.openmicroscopy.org/webclient/render_thumbnail/15160018/",
    "doc_type": "image_keyvalue_pair_metadata",
    "id": 15160018,
    "data_source": "idr",
    "owner_id": 2,
    "experiment": null,
    "group_id": 3,
    "name": "Figure1_Multichannel.ome.tif",
    "description": null,
    "project_name": "idr0165-duinkerken-hyperspectraledx/experimentA",
    "project_id": 3102.0,
    "dataset_name": "npod control",
    "dataset_id": 18504.0,
    "screen_id": null,
    "screen_name": null,
    "plate_id": null,
    "plate_name": null,
    "well_id": null,
    "wellsample_id": null,
    "image_size": null,
    "key_values": [
      { "name": "Organism", "value": "Homo sapiens", "index": 0.0 },
      { "name": "Organism Part", "value": "Pancreas", "index": 0.0 },
      { "name": "Description", "value": "npod control", "index": 1.0 },
      { "name": "Diagnosis", "value": "No diabetes", "index": 2.0 },
      { "name": "Sex", "value": "male", "index": 3.0 },
      { "name": "Age", "value": "25.2", "index": 4.0 },
      {
        "name": "Ethnic or Racial Group",
        "value": "Hispanic/Latino",
        "index": 5.0
      },
      { "name": "Sample ID", "value": "6126", "index": 6.0 },
      { "name": "nPOD ID", "value": "6126", "index": 7.0 },
      { "name": "BioSample ID", "value": "SAMN15879183", "index": 8.0 },
      {
        "name": "BioSample URL",
        "value": "https://www.ncbi.nlm.nih.gov/biosample/SAMN15879183",
        "index": 9.0
      },
      {
        "name": "Nanotomy URL",
        "value": "http://www.nanotomy.org/avivator/?image_url=http://www.nanotomy.org/OA/Duinkerken2024NPJI/figures/fig1/Figure1_Multichannel.ome.tif",
        "index": 10.0
      },
      { "name": "Sample reused from", "value": "idr0116", "index": 11.0 },
      {
        "name": "Original large-scale EM nanotomy",
        "value": "http://www.nanotomy.org/OA/nPOD/6126-368b/0.html",
        "index": 12.0
      },
      {
        "name": "Original large-scale EM IDR",
        "value": "https://idr.openmicroscopy.org/webclient/img_detail/13457650/?dataset=15186",
        "index": 13.0
      }
    ]
  },

@will-moore

Copy link
Copy Markdown
Member

Working fine in testing at IDR/idr-gallery#60

@khaledk2
khaledk2 merged commit 29e3d68 into ome:main May 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants