Skip to content

Retrieve table

Retrieve single table

GET https://sciglass.uni-jena.de/api/table/{table_id}

API for retrieving single table.

Path parameters

table_id  string  Required

The ID of the table to retrieve.


Example request

import asyncio  # (1)!

import httpx
import pandas as pd  # (2)!

# API endpoint
table_id = 44923
endpoint_url = f"https://sciglass.uni-jena.de/api/table/{table_id}"

headers = {
    "Accept": "application/json",
    "Content-type": "application/json",
    "Authorization": "Bearer $SCIGLASS_NEXT_API_KEY"
}


async def example():
    async with httpx.AsyncClient(timeout=None) as client:
        r = await client.get(endpoint_url, headers=headers)
        if r.status_code == 200:
            data = r.json()
            print(data)

            # Define the column names
            columns = [item['title'] for item in data['head']]

            # Convert the rows to DataFrame
            df = pd.DataFrame(data['rows'], columns=columns)

            # Description
            print(f"Description:\n{data['description']}")

            # Reference
            print(f"\nReference:")
            for ref in data['reference']:
                print(f"• {ref}")

            # if contains glass formation ternary diagram data
            print(f"\nglass formation ternary diagram data: {data['gf']}")

            # if contains spectral data
            print(f"spectral data: {data['spectra']}")

            # Unit of the compositions
            comp_units = {
                'm': 'Mol.%', 'af': 'At. fraction', 'mf': 'Mol. fraction',
                'w': 'Wt.%', 'wf': 'Wt. fraction', 'am': 'At.%'
            }
            comp_unit = comp_units.get(data['kind'], 'Unknown unit')
            comp_unit += " by batch" if data['analysis'] == 'b' else " by analysis"
            print(comp_unit)

            # Display the DataFrame
            print(df)

            # Export the result to CSV
            df.to_csv('out.csv', index=False)

        else:
            print(f"Request failed with status code: {r.status_code}")
            print("Response text:", r.text)


asyncio.run(example())
  1. AsyncIO is Python's built-in library for writing concurrent code with the async/await syntax.
  2. This is optional and is imported in this example to show how to export the result to a CSV file using pandas.
1
2
3
4
curl https://sciglass.uni-jena.de/api/table/44923 \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SCIGLASS_NEXT_API_KEY"

{
  "table_id": 44923,
  "description": "Melting in a platinum crucible at 950 &deg;C for 2 h. Pouring into an aluminum mold. <br>Annealing at 317 &deg;C for 3 h. <br>Measurements of density by Archimedes method using toluene. Note. Numerical values were taken from a figure. <br>Measurements of refractive index by Abbe refractometer. <br>Measurements of transmission by spectrometer at room temperature. Note: Numerical values were taken from curves having no experimental points. <br>Determination of T<sub>g</sub> by DTA method. <br>Determination of temperature of exothermal maximum T<sub>c</sub> by DTA method. <br>Determination of melting temperature T<sub>m</sub> by DTA method. ",
  "head": [
    {
      "title": "GNo"
    },
    {
      "title": "Li<sub>2</sub>O"
    },
    {
      "title": "Al<sub>2</sub>O<sub>3</sub>"
    },
    {
      "title": "B<sub>2</sub>O<sub>3</sub>"
    },
    {
      "title": "Sm<sub>2</sub>O<sub>3</sub>"
    },
    {
      "title": "d,g/cm3"
    },
    {
      "title": "n"
    },
    {
      "title": "T<sub>g</sub>,°C"
    },
    {
      "title": "T<sub>c</sub>, oC"
    },
    {
      "title": "T<sub>m</sub>,°C"
    },
    {
      "title": "Sample thickness,mm"
    },
    {
      "title": "Spectral curve in range,nm"
    }
  ],
  "tooltip": [
    "Glass No",
    "",
    "",
    "",
    "",
    "Density",
    "Refractive index",
    "Glass transition temperature",
    "Crystallization temperature",
    "Melting temperature",
    "",
    ""
  ],
  "rows": [
    [
      "611531",
      "27",
      "3",
      "70",
      "-",
      "2.240",
      "1.5408",
      "480",
      "627",
      "891",
      "5",
      "300-2000"
    ],
    [
      "611532",
      "27",
      "3",
      "69.9",
      "0.1",
      "2.259",
      "1.5458",
      "487",
      "635",
      "879",
      "5",
      "300-2000"
    ],
    [
      "611533",
      "27",
      "3",
      "69.7",
      "0.3",
      "2.283",
      "1.5471",
      "492",
      "641",
      "868",
      "5",
      "300-2000"
    ],
    [
      "611534",
      "27",
      "3",
      "69.5",
      "0.5",
      "2.306",
      "1.5496",
      "500",
      "650",
      "857",
      "5",
      "300-2000"
    ],
    [
      "611535",
      "27",
      "3",
      "69.3",
      "0.7",
      "2.328",
      "1.5541",
      "510",
      "661",
      "851",
      "5",
      "300-2000"
    ]
  ],
  "kind": "m",  # (1)!
  "analysis": "b",  # (2)!
  "spectra": true,  # (3)!
  "gf": false,  # (4)!
  "reference": [
    "Pawar P.P., Munishwar S.R., Ramteke D.D. and Gedam R.S., J.Luminescence, 2019, vol. 208, p. 443.<br><br>"
  ]
}
  1. Composition unit:
    m means Mol.%, af means At. fraction, mf means Mol. fraction, w means Wt.%, wf means Wt. fraction, am means At.%
  2. a means composition by analysis, b means composition by batch
  3. If true, spectral data available
  4. If true, glass formation ternary diagram data available

Retrieve multiple tables

POST https://sciglass.uni-jena.de/api/tables

API for retrieving multiple tables.

This API is currently not used in the Web UI and is a specially designed endpoint for API key users.

Request body

table_ids  array  Required

The IDs of the tables to retrieve.


Example request

import asyncio  # (1)!

import httpx
import pandas as pd  # (2)!


# API endpoint
endpoint_url = "https://sciglass.uni-jena.de/api/tables"

# Create the request body
body = {
    "table_ids": [5, 6, 44778, 44803]  # list of table IDs
    # Table ID=5, 6 does not exist (in this case an error message is displayed in the response body at the top)
}

headers = {
    "Accept": "application/json",
    "Content-type": "application/json",
    "Authorization": "Bearer $SCIGLASS_NEXT_API_KEY"
}


async def example():
    async with httpx.AsyncClient(timeout=None) as client:
        r = await client.post(endpoint_url, json=body, headers=headers)
        if r.status_code == 200:
            tables = r.json()
            # print(tables)

            for table in tables:
                if table.get("error"):
                    print(table['error']['message'])
                    continue

                # Define the column names
                columns = [item['title'] for item in table['head']]

                # Convert the rows to DataFrame
                df = pd.DataFrame(table['rows'], columns=columns)

                # Table ID
                print(f"Table ID:{table['table_id']}")

                # Description
                print(f"Description:\n{table['description']}")

                # Reference
                print(f"\nReference:")
                for ref in table['reference']:
                    print(f"• {ref}")

                # if contains glass formation ternary diagram data
                print(f"\nglass formation ternary diagram data: {table['gf']}")

                # if contains spectral data
                print(f"spectral data: {table['spectra']}")

                # Unit of the compositions
                comp_units = {
                    'm': 'Mol.%', 'af': 'At. fraction', 'mf': 'Mol. fraction',
                    'w': 'Wt.%', 'wf': 'Wt. fraction', 'am': 'At.%'
                }
                comp_unit = comp_units.get(table['kind'], 'Unknown unit')
                comp_unit += " by batch" if table['analysis'] == 'b' else " by analysis"
                print(comp_unit)

                # Display the DataFrame
                print(df)

                # Export the result to CSV
                df.to_csv(f'{table["table_id"]}.csv', index=False)

        else:
            print(f"Request failed with status code: {r.status_code}")
            print("Response text:", r.text)


asyncio.run(example())
  1. AsyncIO is Python's built-in library for writing concurrent code with the async/await syntax.
  2. This is optional and is imported in this example to show how to export the result to a CSV file using pandas.
curl -X 'POST' \
  https://sciglass.uni-jena.de/api/tables \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SCIGLASS_NEXT_API_KEY"
  -d '{
  "table_ids": [
    5, 6, 44778, 44803
  ]
}'

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
[
  {
    "error": {
      "message": "Table not found with Table ID(s)=5, 6"
    }
  },
  {
    "table_id": 44778,
    "description": "Melting in a platinum-rhodium crucible at 1200 &deg;C for 1 h. Quenching in water. Remelting at 1200 &deg;C for 1 h and  quenching in water. <br>Measurements of density according to ASTM C693. <br>Measurements of viscosity by viscometer Orton. Note. Numerical values were taken from a figure. <br>Determination of T<sub>g</sub> by DSC method at a heating rate of 20 K/min with error &plusmn; 1.5 K. Measurements in argon atmosphere. <br>Determination of temperature of exothermal maximum T<sub>c</sub> by DSC method at a heating rate of 20 K/min. Measurements in argon atmosphere. Numerical values were taken from DSC curves. <br>Measurements of maximum crystal growth rate by DSC method at a heating rate of 20 K/min with error &plusmn; 1.5 K. Measurements in argon atmosphere. <br>Measurements of liquidus temperature by DSC method at a heating rate of 20 K/min with error &plusmn; 1.5 K. Measurements in argon atmosphere. ",
    "head": [
      {
        "title": "GNo"
      },
      {
        "title": "Al<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "B<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "Bi<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "CaO"
      },
      {
        "title": "Cr<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "Fe<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "Li<sub>2</sub>O"
      },
      {
        "title": "MgO"
      },
      {
        "title": "MnO"
      },
      {
        "title": "Na<sub>2</sub>O"
      },
      {
        "title": "NiO"
      },
      {
        "title": "P<sub>2</sub>O<sub>5</sub>"
      },
      {
        "title": "RuO<sub>2</sub>"
      },
      {
        "title": "SiO<sub>2</sub>"
      },
      {
        "title": "SO<sub>3</sub>"
      },
      {
        "title": "TiO<sub>2</sub>"
      },
      {
        "title": "ZrO<sub>2</sub>"
      },
      {
        "title": "d,g/cm<sup>3</sup>"
      },
      {
        "title": "Error, g/cm<sup>3</sup>"
      },
      {
        "title": "T,°C"
      },
      {
        "title": "log(&eta;,P)"
      },
      {
        "title": "T<sub>g</sub>,°C"
      },
      {
        "title": "T<sub>c</sub>, oC"
      },
      {
        "title": "T<sub>m</sub><sub>a</sub><sub>x</sub> <sub>g</sub><sub>r</sub><sub>o</sub><sub>w</sub><sub>t</sub><sub>h</sub> <sub>r</sub><sub>a</sub><sub>t</sub><sub>e</sub>,°C"
      },
      {
        "title": "T<sub>l</sub><sub>i</sub><sub>q</sub>,°C"
      }
    ],
    "tooltip": [
      "Glass No",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "",
      "Density",
      "",
      "Temperature",
      "&eta;: Viscosity",
      "Glass transition temperature",
      "Crystallization temperature",
      "Maximum crystal growth temperature",
      "Liquidus temperature"
    ],
    "rows": [
      [
        "610292",
        "12.11",
        "4.62",
        "<0.11",
        "4.39",
        "0.19",
        "7.15",
        "3.53",
        "1.33",
        "1.15",
        "18.26",
        "0.15",
        "<0.23",
        "<0.13",
        "47.55",
        "<0.13",
        "1.80",
        "<0.14",
        "2.66",
        "0.002",
        "556<br>589<br>764<br>815<br>917<br>1018<br>1117<br>1216<br>1313",
        "8.0<br>6.9<br>4.0<br>3.4<br>2.6<br>2.1<br>1.7<br>1.3<br>1.0",
        "458",
        "720",
        "645",
        "913"
      ],
      [
        "610293",
        "27.97",
        "17.31",
        "0.64",
        "0.71",
        "1.03",
        "2.52",
        "3.53",
        "<0.17",
        "0.95",
        "12.43",
        "<0.13",
        "0.73",
        "<0.13",
        "30.43",
        "0.22",
        "<0.17",
        "0.23",
        "2.45",
        "0.016",
        "474<br>593<br>628<br>806<br>914<br>1019<br>1121<br>1223<br>1325",
        "12.3<br>8.1<br>7.0<br>4.2<br>3.3<br>2.6<br>2.1<br>1.7<br>1.3",
        "472",
        "736",
        "674",
        "867"
      ],
      [
        "610294",
        "27.43",
        "14.07",
        "0.65",
        "0.73",
        "1.02",
        "2.58",
        "4.35",
        "<0.17",
        "0.98",
        "15.67",
        "<0.13",
        "0.56",
        "<0.13",
        "30.40",
        "0.27",
        "<0.17",
        "0.24",
        "2.51",
        "0.004",
        "447<br>566<br>602<br>916<br>1018<br>1118<br>1219<br>1319",
        "12.3<br>8.2<br>7.0<br>2.9<br>2.3<br>1.9<br>1.5<br>1.1",
        "446",
        "645",
        "615",
        "939"
      ]
    ],
    "kind": "w",
    "analysis": "a",
    "spectra": false,
    "gf": false,
    "reference": [
      "Nepheline crystallization behavior in simulated high-level waste glasses",
      "McClane D.L., Amoroso J.W., Fox K.M. and Kruger A.A., J.Non-Cryst.Solids, 2019, vol. 505, p. 215.<br><br>"
    ]
  },
  {
    "table_id": 44803,
    "description": "Melting at 1450 &deg;C for 3 h. Casting onto a graphite plate. <br>Annealing near T<sub>g</sub> for 1 h. <br>Measurements of density by Archimedes method using distilled water at room temperature. <br>Determination of T<sub>g</sub> by DTA method at a heating rate of 10 K/min with error &plusmn; 1 K. <br>Measurements of dielectric properties by impedance analyzer at frequency 1 MHz at room temperature with error &plusmn; 0.2&middot;10<sup>-</sup><sup>4</sup> for Tan&delta;. Note. Numerical values were taken from a figure. <br>Determination of onset crystallization temperature T<sub>x</sub> and temperature of exothermal maximum T<sub>c</sub> by DTA method at a heating rate of 10 K/min with error &plusmn; 1 K. ",
    "head": [
      {
        "title": "GNo"
      },
      {
        "title": "SiO<sub>2</sub>"
      },
      {
        "title": "Al<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "B<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "Na<sub>2</sub>O"
      },
      {
        "title": "CaO"
      },
      {
        "title": "Y<sub>2</sub>O<sub>3</sub>"
      },
      {
        "title": "d,g/cm<sup>3</sup>"
      },
      {
        "title": "T<sub>g</sub>,°C"
      },
      {
        "title": "&epsilon;&apos;"
      },
      {
        "title": "Error"
      },
      {
        "title": "Tan&delta;*1E4"
      },
      {
        "title": "T<sub>x</sub>,°C"
      },
      {
        "title": "T<sub>c</sub>, oC"
      },
      {
        "title": "&epsilon;&apos;"
      }
    ],
    "tooltip": [
      "Glass No",
      "",
      "",
      "",
      "",
      "",
      "",
      "Density",
      "Glass transition temperature",
      "Dielectric constant",
      "",
      "Tangent of loss angle",
      "Onset crystallization temperature",
      "Crystallization temperature",
      "Dielectric constant"
    ],
    "rows": [
      [
        "610339",
        "59",
        "10",
        "21",
        "1",
        "8",
        "-",
        "2.27",
        "647",
        "4.99",
        "0.02",
        "14.9",
        "781",
        "831",
        "4.99"
      ],
      [
        "610340",
        "59",
        "10",
        "21",
        "1",
        "8",
        "0.5",
        "2.32",
        "662",
        "4.83",
        "0.03",
        "8.3",
        "783",
        "846",
        "4.83"
      ],
      [
        "610341",
        "59",
        "10",
        "21",
        "1",
        "8",
        "1",
        "2.36",
        "670",
        "4.63",
        "0.03",
        "7.2",
        "802",
        "850",
        "4.63"
      ],
      [
        "610342",
        "59",
        "10",
        "21",
        "1",
        "8",
        "1.5",
        "2.39",
        "681",
        "4.55",
        "0.03",
        "4.1",
        "841",
        "907",
        "4.55"
      ],
      [
        "610343",
        "59",
        "10",
        "21",
        "1",
        "8",
        "2",
        "2.42",
        "682",
        "4.66",
        "0.03",
        "3.8",
        "843",
        "909",
        "4.66"
      ],
      [
        "610344",
        "59",
        "10",
        "21",
        "1",
        "8",
        "2.5",
        "2.45",
        "689",
        "4.84",
        "0.03",
        "6.5",
        "836",
        "907",
        "4.84"
      ],
      [
        "610345",
        "59",
        "10",
        "21",
        "1",
        "8",
        "3",
        "2.46",
        "690",
        "5.28",
        "0.02",
        "12.9",
        "844",
        "907",
        "5.28"
      ]
    ],
    "kind": "mf",
    "analysis": "b",
    "spectra": false,
    "gf": false,
    "reference": [
      "Effects of Y2O3 on structure and dielectric properties of aluminoborosilicate glasses",
      "Zhang Lulu, Kang Junfeng, Wang Jing, Khater G.A., Shi Qingshun, Li Sheng, Zhao Jiling, Teng Jinhua and Yue Yunlong, J.Non-Cryst.Solids, 2019, vol. 503-504, p. 110.<br><br>"
    ]
  }
]