Skip to content

Commit

Permalink
#53 add additional OTU endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jrflood committed Apr 29, 2022
1 parent f039b11 commit 54feded
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@ traits:
is: [secured, project_tokenized]
get:
description: Returns OTU instance data.
/{id}/inventory/descendants:
is: [secured, project_tokenized]
get:
description: Returns OTU descendants
/{otu_id}/inventory/images:
is: [secured, project_tokenized]
get:
description: Returns OTU images.

/people:
is: [secured, user_tokenized]
Expand Down
4 changes: 4 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6305,6 +6305,10 @@
-H &quot;Authorization: Token eUUB4dQCCWlLGzksimEqNQ&quot;</code></pre></div><blockquote><h3 class="toc-ignore">REQUEST HEADERS</h3></blockquote><div class="languagebox"><pre><code>Authorization: Token eUUB4dQCCWlLGzksimEqNQ
</code></pre></div></div></div><p></p><div class="set"><div class="set-description"><hr><h2 id="/{id}-get">/{id} get</h2><p><code>GET: /otus/{id}</code></p><p>Returns OTU instance data.</p><br><p><strong><em><big>URI Parameters</big></em></strong></p><p><strong>id</strong><br></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><br><p><strong><em><big>Header Parameters</big></em></strong></p><p><strong>Authorization</strong><br></p><p>API access token. Do not use with &quot;token&quot; query string parameter.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>Token eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><br><p><strong><em><big>Query Parameters</big></em></strong></p><p><strong>token</strong><br></p><p>API access token. Do not use together with the &quot;Authorization&quot; header.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><p><strong>project_token</strong><br></p><p>A project (not User) token indicating the target project. Don&#39;t use together with a user token.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>rIO2oWS603c5W5laQ8ornn</code></td></tr></tbody></table></div><div class="set-examples"><hr><h2 class="toc-ignore" id="/{id}-get">/{id} get</h2><blockquote><h3 class="toc-ignore">CURL EXAMPLE</h3></blockquote><div class="languagebox bash"><pre><code>curl -X GET &quot;https://{host}/api/{version}/otus/{id}?token=eUUB4dQCCWlLGzksimEqNQ&amp;project_token=rIO2oWS603c5W5laQ8ornn&quot; \
-H &quot;Authorization: Token eUUB4dQCCWlLGzksimEqNQ&quot;</code></pre></div><blockquote><h3 class="toc-ignore">REQUEST HEADERS</h3></blockquote><div class="languagebox"><pre><code>Authorization: Token eUUB4dQCCWlLGzksimEqNQ
</code></pre></div></div></div><p></p><div class="set"><div class="set-description"><hr><h2 id="/{id}/inventory/descendants-get">/{id}/inventory/descendants get</h2><p><code>GET: /otus/{id}/inventory/descendants</code></p><p>Returns OTU descendants</p><br><p><strong><em><big>URI Parameters</big></em></strong></p><p><strong>id</strong><br></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><br><p><strong><em><big>Header Parameters</big></em></strong></p><p><strong>Authorization</strong><br></p><p>API access token. Do not use with &quot;token&quot; query string parameter.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>Token eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><br><p><strong><em><big>Query Parameters</big></em></strong></p><p><strong>token</strong><br></p><p>API access token. Do not use together with the &quot;Authorization&quot; header.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><p><strong>project_token</strong><br></p><p>A project (not User) token indicating the target project. Don&#39;t use together with a user token.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>rIO2oWS603c5W5laQ8ornn</code></td></tr></tbody></table></div><div class="set-examples"><hr><h2 class="toc-ignore" id="/{id}/inventory/descendants-get">/{id}/inventory/descendants get</h2><blockquote><h3 class="toc-ignore">CURL EXAMPLE</h3></blockquote><div class="languagebox bash"><pre><code>curl -X GET &quot;https://{host}/api/{version}/otus/{id}/inventory/descendants?token=eUUB4dQCCWlLGzksimEqNQ&amp;project_token=rIO2oWS603c5W5laQ8ornn&quot; \
-H &quot;Authorization: Token eUUB4dQCCWlLGzksimEqNQ&quot;</code></pre></div><blockquote><h3 class="toc-ignore">REQUEST HEADERS</h3></blockquote><div class="languagebox"><pre><code>Authorization: Token eUUB4dQCCWlLGzksimEqNQ
</code></pre></div></div></div><p></p><div class="set"><div class="set-description"><hr><h2 id="/{otu_id}/inventory/images-get">/{otu_id}/inventory/images get</h2><p><code>GET: /otus/{otu_id}/inventory/images</code></p><p>Returns OTU images.</p><br><p><strong><em><big>URI Parameters</big></em></strong></p><p><strong>otu_id</strong><br></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><br><p><strong><em><big>Header Parameters</big></em></strong></p><p><strong>Authorization</strong><br></p><p>API access token. Do not use with &quot;token&quot; query string parameter.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>Token eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><br><p><strong><em><big>Query Parameters</big></em></strong></p><p><strong>token</strong><br></p><p>API access token. Do not use together with the &quot;Authorization&quot; header.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><p><strong>project_token</strong><br></p><p>A project (not User) token indicating the target project. Don&#39;t use together with a user token.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>rIO2oWS603c5W5laQ8ornn</code></td></tr></tbody></table></div><div class="set-examples"><hr><h2 class="toc-ignore" id="/{otu_id}/inventory/images-get">/{otu_id}/inventory/images get</h2><blockquote><h3 class="toc-ignore">CURL EXAMPLE</h3></blockquote><div class="languagebox bash"><pre><code>curl -X GET &quot;https://{host}/api/{version}/otus/{otu_id}/inventory/images?token=eUUB4dQCCWlLGzksimEqNQ&amp;project_token=rIO2oWS603c5W5laQ8ornn&quot; \
-H &quot;Authorization: Token eUUB4dQCCWlLGzksimEqNQ&quot;</code></pre></div><blockquote><h3 class="toc-ignore">REQUEST HEADERS</h3></blockquote><div class="languagebox"><pre><code>Authorization: Token eUUB4dQCCWlLGzksimEqNQ
</code></pre></div></div></div><h1 id="/people">/people</h1><p></p><p>See Overview at <a href="http://rdoc.taxonworks.org/Person.html">http://rdoc.taxonworks.org/Person.html</a></p><p></p><div class="set"><div class="set-description"><hr><h2 id="/people-get">/people get</h2><p><code>GET: /people</code></p><p>Get all people, optionally filtered</p><br><p><strong><em><big>Header Parameters</big></em></strong></p><p><strong>Authorization</strong><br></p><p>API access token. Do not use with &quot;token&quot; query string parameter.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>Token eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><br><p><strong><em><big>Query Parameters</big></em></strong></p><p><strong>active_after_year</strong><br></p><p>Restrict search to persons active after this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>active_before_year</strong><br></p><p>Restrict search to persons active before this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>born_after_year</strong><br></p><p>Restrict search to persons who were born after this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><p><strong>born_before_year</strong><br></p><p>Restrict search to persons who were born before this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>died_after_year</strong><br></p><p>Restrict search to persons who died after this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>died_before_year</strong><br></p><p>Restrict search to persons who died before this year date</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>first_name</strong><br></p><p>Filter by person first name or fragment. Matching is case insensitive. Use &quot; &quot; for &quot;and&quot;. See also <code>exact</code>.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><p><strong>last_name</strong><br></p><p>Filter by person last name or fragment. Matching is case insensitive. Use &quot; &quot; for &quot;and&quot;. See also <code>exact</code>.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><p><strong>last_name_starts_with</strong><br></p><p>Filter by person last name fragment (from beginning). Matching is case insensitive. Use &quot; &quot; for &quot;and&quot;. See also <code>exact</code>.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>Murp</code></td></tr></tbody></table><p><strong>levenshtein_cuttoff</strong><br></p><p>The maximum Levenshtein distance to be used in the fuzzy match for name searches.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>person_wildcard[]</strong><br></p><p>Wildcard parameter(s)</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr></tbody></table><p><strong>role[]</strong><br></p><p>Filter by person role(s), e.g., SourceAuthor, SourceEditor, SourceSource, TaxonNameAuthor. Matching is case insensitive. Use &quot; &quot; for &quot;and&quot;. See also <code>exact</code>.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string array</td></tr><tr><td><em>examples</em></td><td><code>SourceAuthor</code></td></tr></tbody></table><p><strong>project_id</strong><br></p><p>The project for the source search</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>2</code></td></tr></tbody></table><p><strong>source_id</strong><br></p><p>Source identifier for a single source.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr></tbody></table><p><strong>page</strong><br></p><p>The page of people result set to retrieve.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>5</code></td></tr></tbody></table><p><strong>per</strong><br></p><p>The number of people per page.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>10</code></td></tr></tbody></table><p><strong>token</strong><br></p><p>API access token. Do not use together with the &quot;Authorization&quot; header.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>false</td></tr><tr><td><em>type</em></td><td>string</td></tr><tr><td><em>examples</em></td><td><code>eUUB4dQCCWlLGzksimEqNQ</code></td></tr></tbody></table><br><p><strong><em><big>Response Headers</big></em></strong></p><p><strong>Pagination-Page</strong><br></p><p>Page number of result set.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>5</code></td></tr></tbody></table><p><strong>Pagination-Per-Page</strong><br></p><p>Number of people per Page.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>100</code></td></tr></tbody></table><p><strong>Pagination-Previous-Page</strong><br></p><p>Previous page number.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>4</code></td></tr></tbody></table><p><strong>Pagination-Next-Page</strong><br></p><p>Next page number.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>6</code></td></tr></tbody></table><p><strong>Pagination-Total</strong><br></p><p>Total number of people in result set.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>30034</code></td></tr></tbody></table><p><strong>Pagination-Total-Pages</strong><br></p><p>Total number of pages for result set.</p><p></p><table><thead><th>Property</th><th style="width: 99%">Value</th></thead><tbody><tr><td><em>required</em></td><td>true</td></tr><tr><td><em>type</em></td><td>integer</td></tr><tr><td><em>examples</em></td><td><code>300</code></td></tr></tbody></table><br><p><strong><em><big>Possible Responses</big></em></strong></p><p><strong>200</strong></p></div><div class="set-examples"><hr><h2 class="toc-ignore" id="/people-get">/people get</h2><blockquote><h3 class="toc-ignore">CURL EXAMPLE</h3></blockquote><div class="languagebox bash"><pre><code>curl -X GET &quot;https://{host}/api/{version}/people?last_name_starts_with=Murp&amp;role[]=SourceAuthor&amp;project_id=2&amp;page=5&amp;per=10&amp;token=eUUB4dQCCWlLGzksimEqNQ&quot; \
-H &quot;Authorization: Token eUUB4dQCCWlLGzksimEqNQ&quot;</code></pre></div><blockquote><h3 class="toc-ignore">REQUEST HEADERS</h3></blockquote><div class="languagebox"><pre><code>Authorization: Token eUUB4dQCCWlLGzksimEqNQ
</code></pre></div><blockquote><h3 class="toc-ignore">RESPONSE HEADERS</h3></blockquote><div class="languagebox"><pre><code>Pagination-Page: 5
Expand Down

0 comments on commit 54feded

Please sign in to comment.