Skip to content

Commit b9e8795

Browse files
committed
Adjusting API for how a couple things work right now.
1 parent a54c715 commit b9e8795

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

public/API.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,36 +1056,31 @@ <h3 id="rerum-released">RERUM released</h3>
10561056
</thead>
10571057
<tbody>
10581058
<tr>
1059-
<td><code class="language-plaintext highlighter-rouge">/release</code></td>
1060-
<td><code class="language-plaintext highlighter-rouge">{JSON}</code></td>
1059+
<td><code class="language-plaintext highlighter-rouge">/release/:_id</code></td>
1060+
<td><code class="language-plaintext highlighter-rouge">No payload. This will use the _id hash from the PATCH request url.</code></td>
10611061
<td>200 <code class="language-plaintext highlighter-rouge">Location: https://devstore.rerum.io/v1/id/11111</code>
1062-
<code class="language-plaintext highlighter-rouge">{JSON}</code></td>
1062+
<code class="language-plaintext highlighter-rouge">{JSON}</code></td>
10631063
</tr>
10641064
</tbody>
10651065
</table>
1066-
<ul>
1067-
<li><strong><code class="language-plaintext highlighter-rouge">{JSON}</code></strong>—The record. Must
1068-
contain <code class="language-plaintext highlighter-rouge">@id</code>.</li>
1069-
</ul>
10701066
<p>
10711067
RERUM allows for the Generator of a version of a record to assign a <code class="language-plaintext highlighter-rouge">released</code> state.
10721068
Records in released states are locked such that further changes are refused.
10731069
Calling any update or delete action on a released record will result in an error response.
10741070
The release action will alter the <code class="language-plaintext highlighter-rouge">__rerum.isReleased</code> of the version identified
10751071
and alter <code class="language-plaintext highlighter-rouge">__rerum.releases</code> properties throughout
10761072
the record's history without making a
1077-
new history state for the resulting record (the <code class="language-plaintext highlighter-rouge">@id</code> does not change).
1073+
new history state for the resulting record (the <code class="language-plaintext highlighter-rouge">@id</code> or <code class="language-plaintext highlighter-rouge">id</code> does not change).
10781074
</p>
10791075
<p>
10801076
<div class="exHeading">Javascript Example</div>
10811077
<pre><code class="jsExample">
1082-
<span>const releasedObj = await fetch("https://devstore.rerum.io/v1/api/release", {</span>
1078+
<span>const releasedObj = await fetch("https://devstore.rerum.io/v1/api/release/abcdef1234567890", {</span>
10831079
<span class="ind1">method: "PATCH",</span>
10841080
<span class="ind1">headers:{</span>
10851081
<span class="ind2">"Authorization": "Bearer eyJz93a...k4laUWw",</span>
10861082
<span class="ind2">"Content-Type": "application/json; charset=utf-8"</span>
1087-
<span class="ind1">},</span>
1088-
<span class="ind1">body: JSON.stringify({"@id": "https://devstore.rerum.io/v1/id/abcdef1234567890"})</span>
1083+
<span class="ind1">}</span>
10891084
<span>})</span>
10901085
<span>.then(resp => resp.json())</span>
10911086
<span>.catch(err => {throw err})</span>
@@ -1336,6 +1331,13 @@ <h2 id="context">@context</h2>
13361331
provides this <code class="language-plaintext highlighter-rouge">@context</code> in the <code class="language-plaintext highlighter-rouge">Link</code> header and also provides a <code class="language-plaintext highlighter-rouge">@context</code> for the <code class="language-plaintext highlighter-rouge">__rerum</code> terms mentioned above.
13371332
</p>
13381333
<p>http://store.rerum.io/v1/context.json</p>
1334+
<p>The following @contexts map '@id' to 'id' as well as '@type' to 'type'.</p>
1335+
<ul>
1336+
<li>store.rerum.io/v1/context.json</li>
1337+
<li>iiif.io/api/presentation/3/context.json</li>
1338+
<li>www.w3.org/ns/anno.jsonld</li>
1339+
<li>www.w3.org/ns/oa.jsonld</li>
1340+
</ul>
13391341
<h2 id="iiif">IIIF</h2>
13401342
<p>RERUM fully supports the <a target="_blank" href="https://iiif.io/api/presentation/3.0/">IIIF Presentation API</a>.</p>
13411343
<h2 id="web-annotation">Web Annotation</h2>

0 commit comments

Comments
 (0)