forked from rsdoiel/archivesspace-api-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path48-ArchivesSpace-API-Workshop.html
More file actions
44 lines (37 loc) · 1.61 KB
/
48-ArchivesSpace-API-Workshop.html
File metadata and controls
44 lines (37 loc) · 1.61 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
<!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="47-ArchivesSpace-API-Workshop.html" title="Previous slide">Prev</a>
<a id="next-slide" rel="nav" href="49-ArchivesSpace-API-Workshop.html" title="Next slide">Next</a>
</nav>
<section><h1>4. Repositories</h1>
<h2>How do you update the repository definition?</h2>
<p>We use the update API call. Once again we need to check with the
API documentation but this time search for “Update a repository”.</p>
<p>On the right side the <em>curl</em> expression looks like</p>
<pre><code class="language-shell"> curl -H "X-ArchivesSpace-Session: $SESSION" \
-d {
"jsonmodel_type": "repository",
"name": "Description: 11",
"repo_code": "ASPACE REPO 2 -- 631024",
"org_code": "970UV228G",
"image_url": "http://www.example-3.com",
"url": "http://www.example-4.com"
} \
'http://localhost:8089/repositories/1'
</code></pre>
<p>Note the following</p>
<ol>
<li>The repo id is at the end of the path, just like it is when you list a specific repository</li>
<li>We have another JSON data structure to submit and we do so with a “POST”</li>
<li>We still need to maintain our token.</li>
</ol>
</section>
<script type="text/javascript" src="js/keyboard-nav.js"></script>
</body>
</html>