<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.usnan.org/index.php?action=history&amp;feed=atom&amp;title=USNAN_Python_SDK%2FAPI_Reference</id>
	<title>USNAN Python SDK/API Reference - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.usnan.org/index.php?action=history&amp;feed=atom&amp;title=USNAN_Python_SDK%2FAPI_Reference"/>
	<link rel="alternate" type="text/html" href="https://wiki.usnan.org/index.php?title=USNAN_Python_SDK/API_Reference&amp;action=history"/>
	<updated>2026-05-06T14:12:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.usnan.org/index.php?title=USNAN_Python_SDK/API_Reference&amp;diff=1339&amp;oldid=prev</id>
		<title>Mmaciejewski at 17:41, 7 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.usnan.org/index.php?title=USNAN_Python_SDK/API_Reference&amp;diff=1339&amp;oldid=prev"/>
		<updated>2025-10-07T17:41:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:41, 7 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{SDK_navigation}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= &amp;#039;&amp;#039;&amp;#039;API Reference&amp;#039;&amp;#039;&amp;#039; =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= &amp;#039;&amp;#039;&amp;#039;API Reference&amp;#039;&amp;#039;&amp;#039; =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key nanwiki:diff:1.41:old-1330:rev-1339:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mmaciejewski</name></author>
	</entry>
	<entry>
		<id>https://wiki.usnan.org/index.php?title=USNAN_Python_SDK/API_Reference&amp;diff=1330&amp;oldid=prev</id>
		<title>Mmaciejewski: Created page with &quot;= &#039;&#039;&#039;API Reference&#039;&#039;&#039; =  This section summarizes the main classes and methods exposed by the SDK.  == &#039;&#039;&#039;usnan.USNANClient&#039;&#039;&#039; == The central interface to the API.  &#039;&#039;&#039;Constructor:&#039;&#039;&#039; &lt;syntaxhighlight lang=&quot;python&quot;&gt; client = usnan.USNANClient(base_url=None, timeout=30, num_retries=3) &lt;/syntaxhighlight&gt;  &#039;&#039;&#039;Attributes:&#039;&#039;&#039; * &#039;&#039;&#039;datasets&#039;&#039;&#039; – interface for dataset retrieval and search * &#039;&#039;&#039;facilities&#039;&#039;&#039; – interface for facility data * &#039;&#039;&#039;spectrometers&#039;&#039;&#039; – interface fo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.usnan.org/index.php?title=USNAN_Python_SDK/API_Reference&amp;diff=1330&amp;oldid=prev"/>
		<updated>2025-10-07T17:30:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= &amp;#039;&amp;#039;&amp;#039;API Reference&amp;#039;&amp;#039;&amp;#039; =  This section summarizes the main classes and methods exposed by the SDK.  == &amp;#039;&amp;#039;&amp;#039;usnan.USNANClient&amp;#039;&amp;#039;&amp;#039; == The central interface to the API.  &amp;#039;&amp;#039;&amp;#039;Constructor:&amp;#039;&amp;#039;&amp;#039; &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt; client = usnan.USNANClient(base_url=None, timeout=30, num_retries=3) &amp;lt;/syntaxhighlight&amp;gt;  &amp;#039;&amp;#039;&amp;#039;Attributes:&amp;#039;&amp;#039;&amp;#039; * &amp;#039;&amp;#039;&amp;#039;datasets&amp;#039;&amp;#039;&amp;#039; – interface for dataset retrieval and search * &amp;#039;&amp;#039;&amp;#039;facilities&amp;#039;&amp;#039;&amp;#039; – interface for facility data * &amp;#039;&amp;#039;&amp;#039;spectrometers&amp;#039;&amp;#039;&amp;#039; – interface fo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= &amp;#039;&amp;#039;&amp;#039;API Reference&amp;#039;&amp;#039;&amp;#039; =&lt;br /&gt;
&lt;br /&gt;
This section summarizes the main classes and methods exposed by the SDK.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;usnan.USNANClient&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
The central interface to the API.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Constructor:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
client = usnan.USNANClient(base_url=None, timeout=30, num_retries=3)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Attributes:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;datasets&amp;#039;&amp;#039;&amp;#039; – interface for dataset retrieval and search&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;facilities&amp;#039;&amp;#039;&amp;#039; – interface for facility data&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;spectrometers&amp;#039;&amp;#039;&amp;#039; – interface for spectrometer data&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;probes&amp;#039;&amp;#039;&amp;#039; – interface for probe metadata&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Datasets API&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ds = client.datasets.get(363067)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;get(id)&amp;#039;&amp;#039;&amp;#039; – retrieve dataset by ID&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;search(SearchConfig)&amp;#039;&amp;#039;&amp;#039; – iterate over search results&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;download(ids, location=&amp;quot;path&amp;quot;)&amp;#039;&amp;#039;&amp;#039; – download datasets to a local folder&lt;br /&gt;
&lt;br /&gt;
Dataset objects expose:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;title&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;experiment_name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;num_dimension&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;spectrometer_identifier&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;facility_identifier&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;public_time&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Facilities API&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fac = client.facilities.get(&amp;quot;UCHC-Mullen&amp;quot;)&lt;br /&gt;
fac.spectrometers&lt;br /&gt;
fac.probes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;SearchConfig&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
Defines dataset search criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cfg = usnan.models.SearchConfig(records=100)&lt;br /&gt;
cfg.add_filter(&amp;quot;is_knowledgebase&amp;quot;, value=True, match_mode=&amp;quot;equals&amp;quot;)&lt;br /&gt;
cfg.add_filter(&amp;quot;num_dimension&amp;quot;, value=3, match_mode=&amp;quot;equals&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;field&amp;#039;&amp;#039;&amp;#039; – name of dataset attribute&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;value&amp;#039;&amp;#039;&amp;#039; – filter value&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;match_mode&amp;#039;&amp;#039;&amp;#039; – comparison type (equals, contains, greater, less)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;&amp;#039; – logical combination (AND, OR)&lt;/div&gt;</summary>
		<author><name>Mmaciejewski</name></author>
	</entry>
</feed>