IDB API Reference

The IDB Application Programming Interface (API) extends the capabilities of the user interface (UI) to retrieve and access the data.

Spectrum Details by REST API

To view the spectrum details through the UI, identify it with a unique integer (id) at URL:

https://nds.iaea.org/idb/spectra/<int:id>

To access the spectrum via the REST API, add api before spectra in the above URL:

https://nds.iaea.org/idb/api/spectra/<int:id>

By default, the API endpoint returns the response in JSON format, which can also be specified explicitly by adding format suffixes like format=json in the above URL.

Example:

https://nds.iaea.org/idb/api/spectra/12?format=json

Response consists of the spectrum id along the spectral information and its associated metadata stored as key/value pairs, as described below:

  • id: A unique integer value identifying this spectrum.
  • metadata: A JSON object contains information about the source material used for the measurement, including its composition at the time of acquisition (decay-corrected mass fractions from certificate values) and measurement configuration, e.g., detector setup, analyzer, and other electronics used, etc. It also includes metadata on spectrum such as spectrum acquisition date, live time, real time, count rate, etc., which are unique to each spectrum.
  • data: A JSON array consisting of counts per channel for this spectrum.
  • Example:

    {
            "id": 918,
            "metadata": {
                    : "Pu",
                    : "Pellet",
                    : "PuO2",
                    : [
                               {
                                 : 0.114
                               },
                               {
                                 : 77.004
                               },
                                  ...
                    ],
                    : "HPGe",
                    : "Planar",
                    : "ORTEC SGD",
                    : 0.8,
                    : "0-1260",
                    : "Unknown",
                    : "DSPEC Plus",
                    : 0.075,
                    : 16384,
                    : [
                               {
                                 : "Cd",
                                 : 1.524
                               }
                    ],
                    : "DSPEC Plus",
                    : "No collimation with open face lead-shielded detector",
                    : "2008-06-20 10:27:23",
                    : 677.12,
                    : 600,
                    : 0.1139,
                    : 4499.98,
                    : 2699985,
                    : {
                               : "1988-01-01 00:00:00",
                               : [
                                        {
                                          : {
                                                : 0.132077,
                                                : 0.0006
                                          }
                                        },
                                        {
                                          : {
                                                : 75.9729,
                                                : 0.0073
                                          }
                                        },
                                          ....
                               ],
                               : {
                                        :22.6509,
                                        :0.0136 
                               },
                               : {
                                        : "Unknown",
                                        : "Unknown"
                               },
                               : {
                                        : "Unknown",
                                        : "Unknown"
                               },
                               : "https://nds.iaea.org/media-idb/certificates/PIDIE.pdf#page=100"
                    },
                    : "United States Support Program",
                    : "2024-01-16"
            },
            "data": [
                    0,
                    0,
                    ....
            ]
        }

    The API also offers the spectrum data in CSV and SPE format, which can be retrieved by specifying format=csv and format=spe, respectively at the API endpoint.

    https://nds.iaea.org/idb/api/spectra/<int:id>?format=spe

    Search and Access IDB by REST API

    Spectra can be queried and retrieved from the UI by selecting a set of metadata attributes at the URL:

    https://nds.iaea.org/idb/search

    To query and access the spectra via the REST API, simply add api before search followed by ? and a list of parameters given as key=value pairs, each separated by &:

    https://nds.iaea.org/idb/api/search?parameter1=value1&parameter2=value2&...

    The default response to the API endpoint is in JSON format, which returns the same output as in the UI search form results table. The API also provides access to the archive consisting of SPE files by specifying format=spe.

    Acceptable parameters along with data format or current values ​​are described below. Default values, where applicable, are in bold.

    Parameter keyDescriptionData type/Current values
    materialtype_u Material measured: U; For example, to retrieve all spectra for U samples set materialtype_u=on& , else materialtype_u=& or simply delete the parameter key. on/empty string
    materialtype_puMaterial measured: Puon/empty string
    materialtype_moxMaterial measured: MOX on/empty string
    u_pu_ratio_minIf MOX, minimum value for the U/Pu ratio rangeNumber
    u_pu_ratio_maxIf MOX, maximum value for the U/Pu ratio rangeNumber
    u_pu_ratio_unknown Either "on" or "empty string" to include or exclude MOX samples with unknown U/Pu ratio. The default value is set to "on". on/empty string
    isotope{id} To search for a specific material composition, the parameter key "isotope" can be used with a unique identifier. Currently, IDB contains data on the following isotopes:
  • isotope1: 238Pu
  • isotope2: 239Pu
  • isotope3: 240Pu
  • isotope4: 241Pu
  • isotope5: 242Pu
  • isotope6: 234U
  • isotope7: 235U
  • isotope8: 236U
  • isotope9: 238U
  • isotope10: 241Am
  • on/empty string
    mass_fraction{id}_min Minimum of the mass fraction range of isotope{id} Number
    mass_fraction{id}_maxMaximum of the mass fraction range of isotope{id}Number
    mass_fraction{id}_unknown isotope{id} with unknown mass fractionson/empty string
    material_form Physical form of the material Multiple choices*
    chemical_compound_of_material Chemical compound of the material Multiple choices*
    certificate_of_analysis Whether a spectrum has a certificate of analysis or not Multiple choices*
    detector_type_material Detector material Multiple choices*
    detector_type_geometry Shape of the detector Multiple choices*
    detector_gain Energy gain of analyzer Multiple choices*
    detector_number_of_channelsNumber of channelsMultiple choices*
    attenuator_materialAttenuator MaterialMultiple choices*
    attenuator_thickness_minMinimum thickness of attenuator materialNumber
    attenuator_thickness_maxMaximum thickness of attenuator materialNumber
    attenuator_thickness_unknownAttenuators with unknown thicknesson/empty string
    sample_live_time_minMinimum value of spectrum live timeNumber
    sample_live_time_maxMaximum value of spectrum live timeNumber
    dead_time_minMinimum value of spectrum dead timeNumber
    dead_time_maxMaximum value of spectrum dead timeNumber
    total_counts_minMinimum value of total counts in spectrumNumber
    total_counts_maxMaximum value of total counts in spectrumNumber
    data_providerData providerMultiple choices*
    *For multiple choices, please see the current values from the UI drop-down menu.