forked from rsdoiel/archivesspace-api-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path60-ArchivesSpace-API-Workshop.html
49 lines (40 loc) · 1.53 KB
/
60-ArchivesSpace-API-Workshop.html
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
<!DOCTYPE html>
<html>
<head>
<link href="css/slides.css" rel="stylesheet" />
</head>
<body>
<nav>
<a id="start-slide" rel="nav" href="00-ArchivesSpace-API-Workshop.html" title="Return to start of presentation">Start</a>
<a id="prev-slide" rel="nav" href="59-ArchivesSpace-API-Workshop.html" title="Previous slide">Prev</a>
<a id="next-slide" rel="nav" href="61-ArchivesSpace-API-Workshop.html" title="Next slide">Next</a>
</nav>
<section><h1>5. Working with Agents</h1>
<h2>create_agent schema</h2>
<p>I want to digress here. When the API docs are thin (say after a new
ArchivesSpace release) you’ll really benefit from experimenting.</p>
<h3>Debugging the API docs</h3>
<p>Read what’s there and guess at the next step.</p>
<pre><code class="language-shell"> curl -H "X-ArchivesSpace-Session: $SESSION" \
http://localhost:8089/agents/people
</code></pre>
<p>I get back an error</p>
<pre><code class="language-json"> {
"error":{
"page":[
"Parameter required but no value provided"
],
"id_set":[
"Parameter required but no value provided"
],
"all_ids":[
"Parameter required but no value provided"
]
}
}
</code></pre>
<p>And it lets us know the options expected. We will use “all_ids=true” next.</p>
</section>
<script type="text/javascript" src="js/keyboard-nav.js"></script>
</body>
</html>