-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcollections-endpoint.html
More file actions
56 lines (54 loc) · 2.72 KB
/
Copy pathcollections-endpoint.html
File metadata and controls
56 lines (54 loc) · 2.72 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Dataset Project</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu" title="link to Caltech Library Homepage"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="../">README</a></li>
<li><a href="../LICENSE">LICENSE</a></li>
<li><a href="../INSTALL.html">INSTALL</a></li>
<li><a href="../user_manual.html">User Manual</a></li>
<li><a href="../about.html">About</a></li>
<li><a href="../search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/dataset">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="collections-end-point">Collections (end point)</h1>
<p>Interacting with the <strong>datasetd</strong> web service can be
done with any web client. For documentation purposes I am assuming you
are using <a href="https://curl.se/">curl</a>. This command line program
is available on most POSIX systems including Linux, macOS and
Windows.</p>
<p>This provides a JSON list of collections available from the running
<strong>datasetd</strong> service.</p>
<h1 id="example">Example</h1>
<p>The assumption is that we have <strong>datasetd</strong> running on
port “8485” of “localhost” and a set of collections, “t1” and “t2”,
defined in the “settings.json” used at launch.</p>
<p>Use curl to fetch the collections array.</p>
<pre class="shell"><code> curl http://localhost:8485/collections</code></pre>
<p>In my local setup I have two collections defined, “t1” and “t2” so
the array returned looks like</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ot">[</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"t1"</span><span class="ot">,</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"t2"</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span></code></pre></div>
</section>
<footer>
<span>© 2022 <a href="https://www.library.caltech.edu/copyright">Caltech Library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span><a href="mailto:library@caltech.edu">Email Us</a></span>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
</footer>
</body>
</html>