<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Coordinating Node APIs — v2.1.0-beta</title> <link rel="stylesheet" href="../_static/dataone.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '2.1.0-beta', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/mathjax_pre.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Investigator Toolkit APIs" href="ITK_APIs.html" /> <link rel="prev" title="Member Node APIs" href="MN_APIs.html" /> <link media="only screen and (max-device-width: 480px)" href="../_static/small_dataone.css" type= "text/css" rel="stylesheet" /> </head> <body role="document"> <div class="version_notice"> <p> <span class='bold'>Warning:</span> These documents are under active development and subject to change (version 2.1.0-beta).<br /> The latest release documents are at: <a href="https://purl.dataone.org/architecture">https://purl.dataone.org/architecture</a> </p> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="ITK_APIs.html" title="Investigator Toolkit APIs" accesskey="N">next</a> |</li> <li class="right" > <a href="MN_APIs.html" title="Member Node APIs" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html"></a> »</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">DataONE APIs</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="coordinating-node-apis"> <h1>Coordinating Node APIs<a class="headerlink" href="#coordinating-node-apis" title="Permalink to this headline">¶</a></h1> <p>The service interfaces described here are exposed through the Coordinating Node REST interface to support interactions with Member Nodes and DataONE clients.</p> <p>The following table provides a list of API methods exposed by Coordinating Nodes.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Tier:</th><td class="field-body">The tier in which a method is grouped.</td> </tr> <tr class="field-even field"><th class="field-name">Version:</th><td class="field-body">Version of API method is available. The lowest version number indicates when the method was added. A version number in parentheses indicates the method is available in that version and is unchanged from the previous version. If more than one version number is present, then the method signature or functionality has changed between API versions. e.g. “1.0, 2.0” indicates that the method was first introduced in Version 1.0 and has been modified in Version 2.0.</td> </tr> <tr class="field-odd field"><th class="field-name">REST:</th><td class="field-body">The HTTP method and path relative to the Base URL. Parameters specified in the URL are indicatd by braces. Note that parameters included in a path MUST be properly path encoded, and parameters included as key, value pairs MUST also be properly encoded.</td> </tr> <tr class="field-even field"><th class="field-name">Function:</th><td class="field-body">The function name, associated with an API grouping.</td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body">Indicates the parameters used when calling the method (sent in the message payload) and the return type.</td> </tr> </tbody> </table> <table border="1" class="docutils" id="id1"> <caption><span class="caption-text">Methods for CN component</span><a class="headerlink" href="#id1" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/monitor/ping</span></code></td> <td><a class="reference internal" href="#CNCore.ping" title="CNCore.ping"><code class="xref py py-func docutils literal"><span class="pre">CNCore.ping()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> null</td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/object</span></code></td> <td><a class="reference internal" href="#CNCore.create" title="CNCore.create"><code class="xref py py-func docutils literal"><span class="pre">CNCore.create()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <code class="docutils literal"><span class="pre">object</span></code>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats</span></code></td> <td><a class="reference internal" href="#CNCore.listFormats" title="CNCore.listFormats"><code class="xref py py-func docutils literal"><span class="pre">CNCore.listFormats()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectFormatList" title="Types.ObjectFormatList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormatList</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats/{formatId}</span></code></td> <td><a class="reference internal" href="#CNCore.getFormat" title="CNCore.getFormat"><code class="xref py py-func docutils literal"><span class="pre">CNCore.getFormat()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">formatId</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectFormat" title="Types.ObjectFormat"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormat</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/log?[fromDate={fromDate}][&toDate={toDate}][&event={event}][&idFilter={idFilter}][&start={start}][&count={count}]</span></code></td> <td><a class="reference internal" href="#CNCore.getLogRecords" title="CNCore.getLogRecords"><code class="xref py py-func docutils literal"><span class="pre">CNCore.getLogRecords()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[fromDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[toDate]</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">[event]</span></code>, <code class="docutils literal"><span class="pre">[idFilter]</span></code>, <code class="docutils literal"><span class="pre">[start]</span></code>, <code class="docutils literal"><span class="pre">[count]</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Log" title="Types.Log"><code class="xref py py-class docutils literal"><span class="pre">Types.Log</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/reserve</span></code></td> <td><a class="reference internal" href="#CNCore.reserveIdentifier" title="CNCore.reserveIdentifier"><code class="xref py py-func docutils literal"><span class="pre">CNCore.reserveIdentifier()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/generate</span></code></td> <td><a class="reference internal" href="#CNCore.generateIdentifier" title="CNCore.generateIdentifier"><code class="xref py py-func docutils literal"><span class="pre">CNCore.generateIdentifier()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">scheme</span></code>, <code class="docutils literal"><span class="pre">[fragment]</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum</span></code></td> <td><a class="reference internal" href="#CNCore.listChecksumAlgorithms" title="CNCore.listChecksumAlgorithms"><code class="xref py py-func docutils literal"><span class="pre">CNCore.listChecksumAlgorithms()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ChecksumAlgorithmList" title="Types.ChecksumAlgorithmList"><code class="xref py py-class docutils literal"><span class="pre">Types.ChecksumAlgorithmList</span></code></a></td> </tr> <tr class="row-even"><td> </td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/obsoletedBy/{pid}</span></code></td> <td><a class="reference internal" href="#CNCore.setObsoletedBy" title="CNCore.setObsoletedBy"><code class="xref py py-func docutils literal"><span class="pre">CNCore.setObsoletedBy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">obsoletedByPid</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 3</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNCore.delete" title="CNCore.delete"><code class="xref py py-func docutils literal"><span class="pre">CNCore.delete()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 3</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/archive/{id}</span></code></td> <td><a class="reference internal" href="#CNCore.archive" title="CNCore.archive"><code class="xref py py-func docutils literal"><span class="pre">CNCore.archive()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node</span></code></td> <td><a class="reference internal" href="#CNCore.listNodes" title="CNCore.listNodes"><code class="xref py py-func docutils literal"><span class="pre">CNCore.listNodes()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.NodeList" title="Types.NodeList"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/</span></code></td> <td><a class="reference internal" href="#CNCore.getCapabilities" title="CNCore.getCapabilities"><code class="xref py py-func docutils literal"><span class="pre">CNCore.getCapabilities()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/meta</span></code></td> <td><a class="reference internal" href="#CNCore.registerSystemMetadata" title="CNCore.registerSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNCore.registerSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/meta</span></code></td> <td><a class="reference internal" href="#CNCore.updateSystemMetadata" title="CNCore.updateSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNCore.updateSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td> </td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/reserve/{id}?subject={subject}</span></code></td> <td><a class="reference internal" href="#CNCore.hasReservation" title="CNCore.hasReservation"><code class="xref py py-func docutils literal"><span class="pre">CNCore.hasReservation()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.get" title="CNRead.get"><code class="xref py py-func docutils literal"><span class="pre">CNRead.get()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/meta/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.getSystemMetadata" title="CNRead.getSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNRead.getSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">HEAD</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.describe" title="CNRead.describe"><code class="xref py py-func docutils literal"><span class="pre">CNRead.describe()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.DescribeResponse" title="Types.DescribeResponse"><code class="xref py py-class docutils literal"><span class="pre">Types.DescribeResponse</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/resolve/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.resolve" title="CNRead.resolve"><code class="xref py py-func docutils literal"><span class="pre">CNRead.resolve()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectLocationList" title="Types.ObjectLocationList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectLocationList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum/{pid}</span></code></td> <td><a class="reference internal" href="#CNRead.getChecksum" title="CNRead.getChecksum"><code class="xref py py-func docutils literal"><span class="pre">CNRead.getChecksum()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Checksum" title="Types.Checksum"><code class="xref py py-class docutils literal"><span class="pre">Types.Checksum</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object[?fromDate={fromDate}&toDate={toDate}&identifier={identifier}&formatId={formatId}&nodeId={nodeId}&start={start}&count={count}]</span></code></td> <td><a class="reference internal" href="#CNRead.listObjects" title="CNRead.listObjects"><code class="xref py py-func docutils literal"><span class="pre">CNRead.listObjects()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[fromDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[toDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">[formatId]</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">[identifier]</span></code></a>, <code class="docutils literal"><span class="pre">[start=0]</span></code>, <code class="docutils literal"><span class="pre">[count=1000]</span></code>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">[nodeId]</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/search/{queryType}/{query}</span></code></td> <td><a class="reference internal" href="#CNRead.search" title="CNRead.search"><code class="xref py py-func docutils literal"><span class="pre">CNRead.search()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryType</span></code>, <code class="docutils literal"><span class="pre">query</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryEngine}/{query}</span></code></td> <td><a class="reference internal" href="#CNRead.query" title="CNRead.query"><code class="xref py py-func docutils literal"><span class="pre">CNRead.query()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>, <code class="docutils literal"><span class="pre">query</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryType}</span></code></td> <td><a class="reference internal" href="#CNRead.getQueryEngineDescription" title="CNRead.getQueryEngineDescription"><code class="xref py py-func docutils literal"><span class="pre">CNRead.getQueryEngineDescription()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineDescription</span></code></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query</span></code></td> <td><a class="reference internal" href="#CNRead.listQueryEngines" title="CNRead.listQueryEngines"><code class="xref py py-func docutils literal"><span class="pre">CNRead.listQueryEngines()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineList</span></code></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/synchronize</span></code></td> <td><a class="reference internal" href="#CNRead.synchronize" title="CNRead.synchronize"><code class="xref py py-func docutils literal"><span class="pre">CNRead.synchronize()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/owner/{id}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.setRightsHolder" title="CNAuthorization.setRightsHolder"><code class="xref py py-func docutils literal"><span class="pre">CNAuthorization.setRightsHolder()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">userId</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/isAuthorized/{id}?action={action}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.isAuthorized" title="CNAuthorization.isAuthorized"><code class="xref py py-func docutils literal"><span class="pre">CNAuthorization.isAuthorized()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.Permission" title="Types.Permission"><code class="xref py py-class docutils literal"><span class="pre">action</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accessRules/{id}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.setAccessPolicy" title="CNAuthorization.setAccessPolicy"><code class="xref py py-func docutils literal"><span class="pre">CNAuthorization.setAccessPolicy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.AccessPolicy" title="Types.AccessPolicy"><code class="xref py py-class docutils literal"><span class="pre">accessPolicy</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts</span></code></td> <td><a class="reference internal" href="#CNIdentity.registerAccount" title="CNIdentity.registerAccount"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.registerAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">person</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.updateAccount" title="CNIdentity.updateAccount"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.updateAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>, <a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">person</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/verification/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.verifyAccount" title="CNIdentity.verifyAccount"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.verifyAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.getSubjectInfo" title="CNIdentity.getSubjectInfo"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.getSubjectInfo()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts?query={query}[&status={status}&start={start}&count={count}]</span></code></td> <td><a class="reference internal" href="#CNIdentity.listSubjects" title="CNIdentity.listSubjects"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.listSubjects()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">query</span></code>, <code class="docutils literal"><span class="pre">status</span></code>, <code class="docutils literal"><span class="pre">start</span></code>, <code class="docutils literal"><span class="pre">count</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/map</span></code></td> <td><a class="reference internal" href="#CNIdentity.mapIdentity" title="CNIdentity.mapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.mapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">primarySubject</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">secondarySubject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/map/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.removeMapIdentity" title="CNIdentity.removeMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.removeMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/pendingmap</span></code></td> <td><a class="reference internal" href="#CNIdentity.requestMapIdentity" title="CNIdentity.requestMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.requestMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.confirmMapIdentity" title="CNIdentity.confirmMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.confirmMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.getPendingMapIdentity" title="CNIdentity.getPendingMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.getPendingMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.denyMapIdentity" title="CNIdentity.denyMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.denyMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/groups</span></code></td> <td><a class="reference internal" href="#CNIdentity.createGroup" title="CNIdentity.createGroup"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.createGroup()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">group</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/groups</span></code></td> <td><a class="reference internal" href="#CNIdentity.updateGroup" title="CNIdentity.updateGroup"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.updateGroup()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">group</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaNotifications/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.setReplicationStatus" title="CNReplication.setReplicationStatus"><code class="xref py py-func docutils literal"><span class="pre">CNReplication.setReplicationStatus()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeRef</span></code></a>, <a class="reference internal" href="Types.html#Types.ReplicationStatus" title="Types.ReplicationStatus"><code class="xref py py-class docutils literal"><span class="pre">status</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">failure</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaMetadata/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.updateReplicationMetadata" title="CNReplication.updateReplicationMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNReplication.updateReplicationMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.Replica" title="Types.Replica"><code class="xref py py-class docutils literal"><span class="pre">replicaMetadata</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 4</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaPolicies/{id}</span></code></td> <td><a class="reference internal" href="#CNReplication.setReplicationPolicy" title="CNReplication.setReplicationPolicy"><code class="xref py py-func docutils literal"><span class="pre">CNReplication.setReplicationPolicy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.ReplicationPolicy" title="Types.ReplicationPolicy"><code class="xref py py-class docutils literal"><span class="pre">policy</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/replicaAuthorizations/{pid}?targetNodeSubject={targetNodeSubject}</span></code></td> <td><a class="reference internal" href="#CNReplication.isNodeAuthorized" title="CNReplication.isNodeAuthorized"><code class="xref py py-func docutils literal"><span class="pre">CNReplication.isNodeAuthorized()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">targetNodeSubject</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td> </td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/removeReplicaMetadata/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.deleteReplicationMetadata" title="CNReplication.deleteReplicationMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNReplication.deleteReplicationMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeId</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/node/{nodeid}</span></code></td> <td><a class="reference internal" href="#CNRegister.updateNodeCapabilities" title="CNRegister.updateNodeCapabilities"><code class="xref py py-func docutils literal"><span class="pre">CNRegister.updateNodeCapabilities()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeid</span></code></a>, <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">node</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node/{nodeid}</span></code></td> <td><a class="reference internal" href="#CNRegister.getNodeCapabilities" title="CNRegister.getNodeCapabilities"><code class="xref py py-func docutils literal"><span class="pre">CNRegister.getNodeCapabilities()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/node</span></code></td> <td><a class="reference internal" href="#CNRegister.register" title="CNRegister.register"><code class="xref py py-func docutils literal"><span class="pre">CNRegister.register()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">node</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views/{theme}/{id}</span></code></td> <td><a class="reference internal" href="#CNView.view" title="CNView.view"><code class="xref py py-func docutils literal"><span class="pre">CNView.view()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">theme</span></code>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views</span></code></td> <td><a class="reference internal" href="#CNView.listViews" title="CNView.listViews"><code class="xref py py-func docutils literal"><span class="pre">CNView.listViews()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.OptionList</span></code></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/diag/subject</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoCredentials" title="CNDiagnostic.echoCredentials"><code class="xref py py-func docutils literal"><span class="pre">CNDiagnostic.echoCredentials()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/sysmeta</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoSystemMetadata" title="CNDiagnostic.echoSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNDiagnostic.echoSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/object</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoIndexedObject" title="CNDiagnostic.echoIndexedObject"><code class="xref py py-func docutils literal"><span class="pre">CNDiagnostic.echoIndexedObject()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>, <code class="docutils literal"><span class="pre">object</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> </tbody> </table> <div class="section" id="module-CNDiagnostic"> <span id="diagnostic-api"></span><h2>Diagnostic API<a class="headerlink" href="#module-CNDiagnostic" title="Permalink to this headline">¶</a></h2> <table border="1" class="docutils" id="id2"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNDiagnostic" title="CNDiagnostic: Operations to assist with diagnosing authentication and content formatting."><code class="xref py py-mod docutils literal"><span class="pre">CNDiagnostic</span></code></a></span><a class="headerlink" href="#id2" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 2</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/diag/subject</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoCredentials" title="CNDiagnostic.echoCredentials"><code class="xref py py-func docutils literal"><span class="pre">echoCredentials()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/sysmeta</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoSystemMetadata" title="CNDiagnostic.echoSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">echoSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/object</span></code></td> <td><a class="reference internal" href="#CNDiagnostic.echoIndexedObject" title="CNDiagnostic.echoIndexedObject"><code class="xref py py-func docutils literal"><span class="pre">echoIndexedObject()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>, <code class="docutils literal"><span class="pre">object</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> </tbody> </table> <dl class="function"> <dt id="CNDiagnostic.echoCredentials"> <code class="descclassname">CNDiagnostic.</code><code class="descname">echoCredentials</code><span class="sig-paren">(</span><em>session</em><span class="sig-paren">)</span> → SubjectInfo<a class="headerlink" href="#CNDiagnostic.echoCredentials" title="Permalink to this definition">¶</a></dt> <dd><p>Echo the credentials used to make the call. This method can be used to verify the client certificate is valid and contains the expected information.</p> <p>v2.0: This method was added to the Version 2.0 API.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/diag/subject</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate. Transmitted as part of the SSL handshake process.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The subjects and groups parsed from the supplied session information.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4965)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4966)</span></code></p> <p>An internal failure prevented a successful response.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4967)</span></code></p> <p>The supplied session information could not be parsed.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNDiagnostic.echoSystemMetadata"> <code class="descclassname">CNDiagnostic.</code><code class="descname">echoSystemMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>sysmeta</em><span class="sig-paren">)</span> → SystemMetadata<a class="headerlink" href="#CNDiagnostic.echoSystemMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Parse and echo the provided system metadata</p> <p>On successful parsing, a copy of the system metadata is returned, otherwise an exception is returned indicating an error condition.</p> <p>v2.0: This operation is new to version 2.0.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/sysmeta</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the x.509 certificate. The service MAY choose to limit access to only authorized users. Transmitted as part of the SSL handshake process.</li> <li><strong>sysmeta</strong> (<a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a>) – A SystemMetadata object to be examined. The object is parsed and error conditions reported by an exception response. On successful parsing, the SystemMetadata object is echoed back with a HTTP 200 status. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A copy of the supplied System Metadata.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4970)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4971)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4972)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4973)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4974)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4975)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidSystemMetadata" title="Exceptions.InvalidSystemMetadata"><strong>Exceptions.InvalidSystemMetadata</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4976)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNDiagnostic.echoIndexedObject"> <code class="descclassname">CNDiagnostic.</code><code class="descname">echoIndexedObject</code><span class="sig-paren">(</span><em>session</em>, <em>queryEngine</em>, <em>sysmeta</em>, <em>object</em><span class="sig-paren">)</span> → OctetStream<a class="headerlink" href="#CNDiagnostic.echoIndexedObject" title="Permalink to this definition">¶</a></dt> <dd><p>Parse and echo the provided science metadata or resource map document. The response is governed by the type of object provided in the request, and on success is one or more documents that are the result of parsing for indexing.</p> <p>Since DataONE supports multiple types of query engine, the query engine to be used for parsing is specified in the request.</p> <p>The servce may terminate the POST operation if the size of the object is beyond a reasonable size.</p> <p>v2.0: This operation is new to version 2.0.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/diag/object</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the x.509 certificate. The service MAY choose to limit access to only authorized users. Transmitted as part of the SSL handshake process.</li> <li><strong>queryEngine</strong> (<em>string</em>) – A valid query engine name as reported by <code class="xref py py-func docutils literal"><span class="pre">listQueryEngines()</span></code> Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>sysmeta</strong> (<a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a>) – A SystemMetadata object that passes the echoSystemMetadata diagnostic. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> <li><strong>object</strong> (<em>bytes</em>) – A document (e.g. science metadata or resource map) that is to be evalauted for indexing.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A document representing the parsed object as it would be prior to being added to a search index. For the solr query engine for example, this would be the equivalent of a <em><add><doc> .. </doc> .. </add></em> structure with possibly multiple documents.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4980)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4981)</span></code></p> <p>An internal failure prevented a successful response.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4982)</span></code></p> <p>The supplied credentials are not authorized for this operation.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4983)</span></code></p> <p>The supplied session information could not be parsed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4984)</span></code></p> <p>The structure of the request is invalid.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidSystemMetadata" title="Exceptions.InvalidSystemMetadata"><strong>Exceptions.InvalidSystemMetadata</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4985)</span></code></p> <p>The system metadata could not be parsed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.UnsupportedType" title="Exceptions.UnsupportedType"><strong>Exceptions.UnsupportedType</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4986)</span></code></p> <p>The supplied object was not of a supported type.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.UnsupportedMetadataType" title="Exceptions.UnsupportedMetadataType"><strong>Exceptions.UnsupportedMetadataType</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4987)</span></code></p> <p>The provided metadata format is not supported by the query engine.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InsufficientResources" title="Exceptions.InsufficientResources"><strong>Exceptions.InsufficientResources</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=413,</span> <span class="pre">detailCode=4988)</span></code></p> <p>Insufficient resources could be allocated to support the request. The provided object may be too large to process.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNCore"> <span id="core-api"></span><h2>Core API<a class="headerlink" href="#module-CNCore" title="Permalink to this headline">¶</a></h2> <table border="1" class="docutils" id="id3"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNCore" title="CNCore: Core operations necessary for basic interaction with Coordinating Nodes"><code class="xref py py-mod docutils literal"><span class="pre">CNCore</span></code></a></span><a class="headerlink" href="#id3" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/monitor/ping</span></code></td> <td><a class="reference internal" href="#CNCore.ping" title="CNCore.ping"><code class="xref py py-func docutils literal"><span class="pre">ping()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> null</td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/object</span></code></td> <td><a class="reference internal" href="#CNCore.create" title="CNCore.create"><code class="xref py py-func docutils literal"><span class="pre">create()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <code class="docutils literal"><span class="pre">object</span></code>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats</span></code></td> <td><a class="reference internal" href="#CNCore.listFormats" title="CNCore.listFormats"><code class="xref py py-func docutils literal"><span class="pre">listFormats()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectFormatList" title="Types.ObjectFormatList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormatList</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats/{formatId}</span></code></td> <td><a class="reference internal" href="#CNCore.getFormat" title="CNCore.getFormat"><code class="xref py py-func docutils literal"><span class="pre">getFormat()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">formatId</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectFormat" title="Types.ObjectFormat"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormat</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/log?[fromDate={fromDate}][&toDate={toDate}][&event={event}][&idFilter={idFilter}][&start={start}][&count={count}]</span></code></td> <td><a class="reference internal" href="#CNCore.getLogRecords" title="CNCore.getLogRecords"><code class="xref py py-func docutils literal"><span class="pre">getLogRecords()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[fromDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[toDate]</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">[event]</span></code>, <code class="docutils literal"><span class="pre">[idFilter]</span></code>, <code class="docutils literal"><span class="pre">[start]</span></code>, <code class="docutils literal"><span class="pre">[count]</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Log" title="Types.Log"><code class="xref py py-class docutils literal"><span class="pre">Types.Log</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/reserve</span></code></td> <td><a class="reference internal" href="#CNCore.reserveIdentifier" title="CNCore.reserveIdentifier"><code class="xref py py-func docutils literal"><span class="pre">reserveIdentifier()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/generate</span></code></td> <td><a class="reference internal" href="#CNCore.generateIdentifier" title="CNCore.generateIdentifier"><code class="xref py py-func docutils literal"><span class="pre">generateIdentifier()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">scheme</span></code>, <code class="docutils literal"><span class="pre">[fragment]</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum</span></code></td> <td><a class="reference internal" href="#CNCore.listChecksumAlgorithms" title="CNCore.listChecksumAlgorithms"><code class="xref py py-func docutils literal"><span class="pre">listChecksumAlgorithms()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ChecksumAlgorithmList" title="Types.ChecksumAlgorithmList"><code class="xref py py-class docutils literal"><span class="pre">Types.ChecksumAlgorithmList</span></code></a></td> </tr> <tr class="row-even"><td> </td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/obsoletedBy/{pid}</span></code></td> <td><a class="reference internal" href="#CNCore.setObsoletedBy" title="CNCore.setObsoletedBy"><code class="xref py py-func docutils literal"><span class="pre">setObsoletedBy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">obsoletedByPid</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 3</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNCore.delete" title="CNCore.delete"><code class="xref py py-func docutils literal"><span class="pre">delete()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 3</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/archive/{id}</span></code></td> <td><a class="reference internal" href="#CNCore.archive" title="CNCore.archive"><code class="xref py py-func docutils literal"><span class="pre">archive()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node</span></code></td> <td><a class="reference internal" href="#CNCore.listNodes" title="CNCore.listNodes"><code class="xref py py-func docutils literal"><span class="pre">listNodes()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.NodeList" title="Types.NodeList"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/</span></code></td> <td><a class="reference internal" href="#CNCore.getCapabilities" title="CNCore.getCapabilities"><code class="xref py py-func docutils literal"><span class="pre">getCapabilities()</span></code></a></td> <td>() <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/meta</span></code></td> <td><a class="reference internal" href="#CNCore.registerSystemMetadata" title="CNCore.registerSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">registerSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/meta</span></code></td> <td><a class="reference internal" href="#CNCore.updateSystemMetadata" title="CNCore.updateSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">updateSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">sysmeta</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td> </td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/reserve/{id}?subject={subject}</span></code></td> <td><a class="reference internal" href="#CNCore.hasReservation" title="CNCore.hasReservation"><code class="xref py py-func docutils literal"><span class="pre">hasReservation()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> </tbody> </table> <dl class="function"> <dt id="CNCore.ping"> <code class="descclassname">CNCore.</code><code class="descname">ping</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → null<a class="headerlink" href="#CNCore.ping" title="Permalink to this definition">¶</a></dt> <dd><p>Low level “are you alive” operation. A valid ping response is indicated by a HTTP status of 200. A timestmap indicating the current system time (UTC) on the node MUST be returned in the HTTP Date header.</p> <p>The Member Node should perform some minimal internal functionality testing before answering. However, ping checks will be frequent (every few minutes) so the internal functionality test should not be high impact.</p> <p>Any status response other than 200 indicates that the node is offline for DataONE operations.</p> <p>Note that the timestamp returned in the Date header should follow the semantics as described in the HTTP specifications, <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18</a></p> <p>The response body will be ignored by the caller expect in the case of an error, in which case the response body should contain the appropriate DataONE exception.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/10_uc.html"><span class="doc">UC10</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/monitor/ping</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Null body or Exception. The body of the message is ignored by the caller. The HTTP header <em>Date</em> MUST be set in the response.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">null</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2041)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2042)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InsufficientResources" title="Exceptions.InsufficientResources"><strong>Exceptions.InsufficientResources</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=413,</span> <span class="pre">detailCode=2045)</span></code></p> <p>A ping response may return InsufficientResources if for example the system is in a state where normal DataONE operations may be impeded by an unusually high load on the node.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <blockquote> <div><p><strong>Response</strong></p> <p>The response should be a valid HTTP response with a blank or arbitrary body. Only the HTTP header information is considered by the requestor. A successful response MUST have a HTTP status code of 200. In case of an error condition, the appropriate HTTP status code MUST be set, and an exception or error information MAY be returned in the response body.</p> <p><strong>Example</strong></p> <p>Example of ping request and response for a Member Node (Coordinating Nodes implement the same functionality). Lines prefixed with “>” indicate outgoing information, lines prefixed with “<” show content returned from the server. Lines associated with SSL connection initiation and close are not shown here. Note that the actual response headers may vary, the only required header fields are the first status line and a <code class="docutils literal"><span class="pre">Date</span></code> entry. However, in order to fully support clients that may cache the response, it is recommended that the <code class="docutils literal"><span class="pre">Expires</span></code>, and <code class="docutils literal"><span class="pre">Cache-Control</span></code> headers are returned.</p> <div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">NODE</span><span class="o">=</span><span class="s2">"https://demo2.test.dataone.org/knb/d1/mn"</span> <span class="hll">curl -k -v <span class="s2">"</span><span class="nv">$NODE</span><span class="s2">/v1/monitor/ping"</span> </span> > GET /knb/d1/mn/v1/monitor/ping HTTP/1.1 > User-Agent: curl/7.21.6 <span class="o">(</span>x86_64-pc-linux-gnu<span class="o">)</span> libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3 > Host: demo2.test.dataone.org > Accept: */* > < HTTP/1.1 <span class="m">200</span> OK <span class="hll">< Date: Tue, <span class="m">06</span> Mar <span class="m">2012</span> <span class="m">14</span>:19:59 GMT </span>< Server: Apache/2.2.14 <span class="o">(</span>Ubuntu<span class="o">)</span> < Content-Length: <span class="m">0</span> < Content-Type: text/plain < </pre></div> </div> </div></blockquote> <dl class="function"> <dt id="CNCore.create"> <code class="descclassname">CNCore.</code><code class="descname">create</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>object</em>, <em>sysmeta</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.create" title="Permalink to this definition">¶</a></dt> <dd><p>Used internally within a Coordinating Node to add a new object to the object store.</p> <p>This method is not publicly exposed by a Coordinating Node.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.SystemMetadata" title="v2_0.Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.SystemMetadata</span></code></a> has changed from Version 1.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/04_uc.html"><span class="doc">UC04</span></a>, <a class="reference internal" href="../design/UseCases/09_uc.html"><span class="doc">UC09</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/object</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier that should be used in DataONE to identify and access the object. This is an Unicode string that follows the constraints on identifiers described in <a class="reference internal" href="../design/PIDs.html"><span class="doc">Identifiers in DataONE</span></a>. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>object</strong> (<em>bytes</em>) – The object (e.g. Science Metadata) bytes.</li> <li><strong>sysmeta</strong> (<a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a>) – The complete system metadata document describing the object. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier that was used to insert the document into the system. This should be the same as the identifier provided as the <em>pid</em> parameter.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1100)</span></code></p> <p>The provided identity does not have permission to WRITE to the Member Node.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=1120)</span></code></p> <p>The requested identifier is already used by another object and therefore can not be used for this object. Clients should choose a new identifier that is unique and retry the operation or use <a class="reference internal" href="#CNCore.reserveIdentifier" title="CNCore.reserveIdentifier"><code class="xref py py-func docutils literal"><span class="pre">CNCore.reserveIdentifier()</span></code></a> to reserve one.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.UnsupportedType" title="Exceptions.UnsupportedType"><strong>Exceptions.UnsupportedType</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4895)</span></code></p> <p>The object store is unable to store the provided content.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InsufficientResources" title="Exceptions.InsufficientResources"><strong>Exceptions.InsufficientResources</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=413,</span> <span class="pre">detailCode=4897)</span></code></p> <p>The CN object store is unable to execute the transfer because of resource limitations.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidSystemMetadata" title="Exceptions.InvalidSystemMetadata"><strong>Exceptions.InvalidSystemMetadata</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4896)</span></code></p> <p>The supplied system metadata is invalid. This could be because some required field is not set, the metadata document is malformed, or the value of some field is not valid.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4893)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4894)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4890)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4891)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.listFormats"> <code class="descclassname">CNCore.</code><code class="descname">listFormats</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → ObjectFormatList<a class="headerlink" href="#CNCore.listFormats" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of all object formats registered in the DataONE Object Format Vocabulary.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.ObjectFormat" title="v2_0.Types.ObjectFormat"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.ObjectFormat</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The list of object formats registered in the DataONE Object Format Vocabulary</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ObjectFormatList" title="Types.ObjectFormatList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormatList</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4840)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4841)</span></code></p> <p>An error occurred when attempting to service the request.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Example</strong></p> <div class="highlight-bash"><div class="highlight"><pre><span></span>curl <span class="s2">"http://cn.dataone.org/cn/v1/formats"</span> <?xml <span class="nv">version</span><span class="o">=</span><span class="s2">"1.0"</span> <span class="nv">encoding</span><span class="o">=</span><span class="s2">"UTF-8"</span>?> <?xml-stylesheet <span class="nv">type</span><span class="o">=</span><span class="s2">"text/xsl"</span> <span class="nv">href</span><span class="o">=</span><span class="s2">"/cn/xslt/dataone.types.v1.xsl"</span>?> <d1:objectFormatList xmlns:d1<span class="o">=</span><span class="s2">"http://ns.dataone.org/service/types/v1"</span> <span class="nv">count</span><span class="o">=</span><span class="s2">"67"</span> <span class="nv">start</span><span class="o">=</span><span class="s2">"0"</span> <span class="nv">total</span><span class="o">=</span><span class="s2">"67"</span>> <objectFormat> <formatId>-//ecoinformatics.org//eml-access-2.0.0beta4//EN</formatId> <formatName>Ecological Metadata Language, Access module, version <span class="m">2</span>.0.0beta4</formatName> <formatType>METADATA</formatType> </objectFormat> <objectFormat> <formatId>-//ecoinformatics.org//eml-attribute-2.0.0beta4//EN</formatId> <formatName>Ecological Metadata Language, Attribute module, version <span class="m">2</span>.0.0beta4</formatName> <formatType>METADATA</formatType> </objectFormat> <objectFormat> <formatId>-//ecoinformatics.org//eml-constraint-2.0.0beta4//EN</formatId> <formatName>Ecological Metadata Language, Constraint module, version <span class="m">2</span>.0.0beta4</formatName> <formatType>METADATA</formatType> </objectFormat> ... </d1:objectFormatList> </pre></div> </div> <dl class="function"> <dt id="CNCore.getFormat"> <code class="descclassname">CNCore.</code><code class="descname">getFormat</code><span class="sig-paren">(</span><em>formatId</em><span class="sig-paren">)</span> → ObjectFormat<a class="headerlink" href="#CNCore.getFormat" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the object format registered in the DataONE Object Format Vocabulary for the given format identifier.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.ObjectFormat" title="v2_0.Types.ObjectFormat"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.ObjectFormat</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/formats/{formatId}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>formatId</strong> (<a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormatIdentifier</span></code></a>) – Unique ObjectFormatIdentifier for the object format Transmitted as part of the URL path and must be escaped accordingly.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The object format registered in the DataONE Object Format Vocablulary</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ObjectFormat" title="Types.ObjectFormat"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormat</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4845)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4846)</span></code></p> <p>Unexpected exception from the service.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4848)</span></code></p> <p>The format specified by <em>formatId</em> does not exist at this node.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Example</strong></p> <p>Retrieve information about the <code class="docutils literal"><span class="pre">http://www.openarchives.org/ore/terms</span></code> formatId. Note that formatId has characters that should be escaped when added as a URL path element. This is done using the urlencode script.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">The <em>xml</em> command is implemented by <a class="reference external" href="http://xmlstar.sourceforge.net/">XMLStarlet</a>, and is used here to format the output for easier reading. The <em>urlencode</em> command is a script available with the <a class="reference external" href="https://repository.dataone.org/software/cicore/trunk/itk/d1_client_bash">d1_client_bash</a> itk tool</p> </div> <div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nv">formatid</span><span class="o">=</span><span class="k">$(</span><span class="nb">echo</span> <span class="s2">"http://www.openarchives.org/ore/terms"</span> <span class="p">|</span> urlencode<span class="k">)</span> curl -s <span class="s2">"http://cn-dev.dataone.org/cn/v1/formats/</span><span class="si">${</span><span class="nv">formatid</span><span class="si">}</span><span class="s2">"</span> <span class="p">|</span> xml fo <?xml <span class="nv">version</span><span class="o">=</span><span class="s2">"1.0"</span> <span class="nv">encoding</span><span class="o">=</span><span class="s2">"UTF-8"</span>?> <d1:objectFormat xmlns:d1<span class="o">=</span><span class="s2">"http://ns.dataone.org/service/types/v1"</span>> <formatId>http://www.openarchives.org/ore/terms</formatId> <formatName>Object Reuse and Exchange Vocabulary</formatName> <formatType>RESOURCE</formatType> </d1:objectFormat> </pre></div> </div> <dl class="function"> <dt id="CNCore.getLogRecords"> <code class="descclassname">CNCore.</code><code class="descname">getLogRecords</code><span class="sig-paren">(</span><em>session</em><span class="optional">[</span>, <em>fromDate</em><span class="optional">]</span><span class="optional">[</span>, <em>toDate</em><span class="optional">]</span><span class="optional">[</span>, <em>event</em><span class="optional">]</span><span class="optional">[</span>, <em>idFilter</em><span class="optional">]</span><span class="optional">[</span>, <em>start</em><span class="optional">]</span><span class="optional">[</span>, <em>count</em><span class="optional">]</span><span class="sig-paren">)</span> → Log<a class="headerlink" href="#CNCore.getLogRecords" title="Permalink to this definition">¶</a></dt> <dd><p>Retrieves consolidated log information for the specified date range (fromDate < timestamp <= toDate) for the entire DataONE infrastructure</p> <p>Note that date time precision is limited to one millisecond. If no timezone information is provided, the UTC will be assumed.</p> <p>Note that full access to log records requires access through a priviledged account. A public user may be presented with an empty response.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Log" title="v2_0.Types.Log"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Log</span></code></a> has changed.</p> <p>v2.0: The event parameter has changed from <code class="xref py py-class docutils literal"><span class="pre">v1_0.Types.Event</span></code> to a plain <em>string</em></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/log?[fromDate={fromDate}][&toDate={toDate}][&event={event}][&idFilter={idFilter}][&start={start}][&count={count}]</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>fromDate</strong> (<a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">Types.DateTime</span></code></a>) – Starting time for records in response, entries with timestamp greater than or equal to (>=) this value will be returned. Defaults to include all records. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>toDate</strong> (<a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">Types.DateTime</span></code></a>) – End time for records in response, entries with timestamp less than (<) this value will be returned. If not specified, then defaults to now. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>event</strong> (<code class="xref py py-class docutils literal"><span class="pre">Types.Event,</span> <span class="pre">string</span></code>) – Return only log records for the specified type of event. Default is all. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>idFilter</strong> (<em>string</em>) – Return only log records for identifiers that start with the supplied identifier string. Support for this parameter is optional and MAY be ignored by the Coordinating Node implementation with no warning. Supports PID and SID values. Only PID values will be included in the returned entries. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>start</strong> (<em>integer</em>) – The zero based index of the first log record to return. Default is 0. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>count</strong> (<em>integer</em>) – The maximum number of log records that should be returned in the response. The Member Node may return fewer and the caller should check the <em>total</em> in the response to determine if further pages may be retrieved. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"></p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Log" title="Types.Log"><code class="xref py py-class docutils literal"><span class="pre">Types.Log</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1470)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1490)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1460)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1461)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=1480)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InsufficientResources" title="Exceptions.InsufficientResources"><strong>Exceptions.InsufficientResources</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=413,</span> <span class="pre">detailCode=1481)</span></code></p> <p>The request could not be serviced due to a limitation of resources - too many requests, internal service timeout, or another similar failure.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.reserveIdentifier"> <code class="descclassname">CNCore.</code><code class="descname">reserveIdentifier</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.reserveIdentifier" title="Permalink to this definition">¶</a></dt> <dd><p>Reserves the identifier that is unique and can not be used by any other sessions. Future calls to <a class="reference internal" href="MN_APIs.html#MNStorage.create" title="MNStorage.create"><code class="xref py py-func docutils literal"><span class="pre">MNStorage.create()</span></code></a> and <a class="reference internal" href="MN_APIs.html#MNStorage.update" title="MNStorage.update"><code class="xref py py-func docutils literal"><span class="pre">MNStorage.update()</span></code></a> that reference this ID must be made by the same <a class="reference internal" href="../glossary.html#term-principal"><span class="xref std std-term">principal</span></a> making the reservation, otherwise an error is raised on those methods.</p> <p>The requested identifier is transmitted in a MIME Multipart/form-data body with <em>id</em> as key, and the identifier string as value.</p> <p>v2.0: The identifier being reserved may be used as a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/reserve</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier that is to be reserved. May be a PID or a SID value. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier that was reserved</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4190)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4210)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4180)</span></code></p> <p>Supplied credentials does not have WRITE permission</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4200)</span></code></p> <p>The identifier requested is not a valid format accepted by this service</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4210)</span></code></p> <p>The requested identifier can not be reserved because it already exists in the DataONE system or has already been reserved.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4191)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.generateIdentifier"> <code class="descclassname">CNCore.</code><code class="descname">generateIdentifier</code><span class="sig-paren">(</span><em>session</em>, <em>scheme</em><span class="optional">[</span>, <em>fragment</em><span class="optional">]</span><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.generateIdentifier" title="Permalink to this definition">¶</a></dt> <dd><p>Given a scheme and optional fragment, generates an identifier with that scheme and fragment that is unique. Returned identifier may be used as either a PID or a SID.</p> <p>The message body is encoded as MIME Multipart/form-data</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/generate</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>scheme</strong> (<em>string</em>) – The name of the identifier scheme to be used, drawn from a DataONE-specific vocabulary of identifier scheme names, including several common syntaxes such as DOI, ARK, LSID, UUID, and LSRN, among others. The first version of this method only supports the UUID scheme, and ignores the fragment parameter. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>fragment</strong> (<em>string</em>) – The optional fragment to include in the generated Identifier. This parameter is optional and may not be present in the message body. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier that was generated</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4190)</span></code></p> <p>The supplied authentication token is not a proper certificate, or missing required fields, or otherwise proves invalid.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4210)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4180)</span></code></p> <p>Supplied credentials does not have WRITE permission</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4200)</span></code></p> <p>The schme requested is not a valid schme accepted by this service</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4191)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <div class="admonition-todo admonition" id="index-0"> <p class="first admonition-title">Todo</p> <p class="last">Need to provide a list of recommended identifier schemes.</p> </div> <dl class="function"> <dt id="CNCore.listChecksumAlgorithms"> <code class="descclassname">CNCore.</code><code class="descname">listChecksumAlgorithms</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → ChecksumAlgorithmList<a class="headerlink" href="#CNCore.listChecksumAlgorithms" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of checksum algorithms that are supported by DataONE.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of supported checksum algorithms.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ChecksumAlgorithmList" title="Types.ChecksumAlgorithmList"><code class="xref py py-class docutils literal"><span class="pre">Types.ChecksumAlgorithmList</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4880)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4881)</span></code></p> <p>A problem occurred with the service that prevented it from returning the expected response.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.setObsoletedBy"> <code class="descclassname">CNCore.</code><code class="descname">setObsoletedBy</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>obsoletedByPid</em>, <em>serialVersion</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNCore.setObsoletedBy" title="Permalink to this definition">¶</a></dt> <dd><p>Updates the <a class="reference internal" href="Types.html#Types.SystemMetadata.obsoletedBy" title="Types.SystemMetadata.obsoletedBy"><code class="xref py py-attr docutils literal"><span class="pre">Types.SystemMetadata.obsoletedBy</span></code></a> property for an object, indicating that the object specified by <em>pid</em> has been obsoleted by the identifier in <em>obsoletedByPid</em>.</p> <p>v2.0: Method implementation has changed to ensure that the obsolescence chain is consistent with use of any SID assigned to the object.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/obsoletedBy/{pid}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">Subject</span></a> of the session MUST have <em>write</em> permission on the object. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object system metadata being updated. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>obsoletedByPid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object that obsoletes the object identified by <em>pid</em>. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The serial version of the system metadata being updated. If the specified <em>serialVersion</em> does not match the current version at the Coordinating Nodes, then a <a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><code class="xref py py-exc docutils literal"><span class="pre">Exceptions.VersionMismatch</span></code></a> error is raised and no changes are made. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the operation succeeds, otherwise false.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4940)</span></code></p> <p>The service endpoint has not yet been fully implemented</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4941)</span></code></p> <p>A problem occurred with the service that prevented it from returning the expected response.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4942)</span></code></p> <p>The request was malformed and could not be processed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4943)</span></code></p> <p>The supplied session information could not be verified as a valid DataONE session.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4944)</span></code></p> <p>The specified <em>pid</em> does not exist.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4945)</span></code></p> <p>The credentials provided with the request in the <em>session</em> do not have <em>write</em> privileges on <em>pid</em>.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4946)</span></code></p> <p>The provided <em>serialVersion</em> does not match the latest version that is held by the CN. The client should refresh it’s copy, verify that the update is still necessary, and resubmit the request with the updated information.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.delete"> <code class="descclassname">CNCore.</code><code class="descname">delete</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.delete" title="Permalink to this definition">¶</a></dt> <dd><p>Deletes an object from the entire DataONE system, including all nodes known to hold a copy of the object. The PID and/or SID of the object will continue to be shown as in use (preventing its reuse for other objects), however the object should not be resolvable (NotFound) or retrievable.</p> <p>The delete operation is used only by administrators in response to a request to remove an object from DataONE, perhaps because of legal requirements or the object has been identified as containing malicious content.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/object/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the object to be deleted. May be either a PID or SID, the latter will operate on the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier of the object that was deleted.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4960)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4961)</span></code></p> <p>The delete operation failed because the object does not exist.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4962)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4963)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4964)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.archive"> <code class="descclassname">CNCore.</code><code class="descname">archive</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.archive" title="Permalink to this definition">¶</a></dt> <dd><p>Hides an object managed by DataONE from search operations, effectively preventing its discovery during normal operations.</p> <p>The operation does not delete the object bytes, but instead sets the <a class="reference internal" href="Types.html#Types.SystemMetadata.archived" title="Types.SystemMetadata.archived"><code class="xref py py-attr docutils literal"><span class="pre">Types.SystemMetadata.archived</span></code></a> flag to True. This ensures that the object can still be resolved (and hence remain valid for existing citations and cross references), though will not appear in searches.</p> <p>Objects that are archived can not be updated through the <a class="reference internal" href="MN_APIs.html#MNStorage.update" title="MNStorage.update"><code class="xref py py-func docutils literal"><span class="pre">MNStorage.update()</span></code></a> operation.</p> <p>Archived objects can not be un-archived. This behavior may change in future versions of the DataONE API.</p> <p>The CN should ensure that all MNs holding a copy of the object are informed of the change so that they may update their information about the object.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/archive/{id}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the object to be archived. May be either a PID or a SID, the latter will act on the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier of the object that was archived.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4970)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4971)</span></code></p> <p>The archive operation failed because the object does not exist.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4972)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4973)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4974)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.listNodes"> <code class="descclassname">CNCore.</code><code class="descname">listNodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → NodeList<a class="headerlink" href="#CNCore.listNodes" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of nodes that have been registered with the DataONE infrastructure.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Node" title="v2_0.Types.Node"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Node</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/39_uc.html"><span class="doc">UC39</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">List of nodes from the registry</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.NodeList" title="Types.NodeList"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeList</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4800)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4801)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.getCapabilities"> <code class="descclassname">CNCore.</code><code class="descname">getCapabilities</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → Node<a class="headerlink" href="#CNCore.getCapabilities" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a document describing the capabilities of the Coordinating Node.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Node" title="v2_0.Types.Node"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Node</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The technical capabilities of the Coordinating Node</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4802)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4803)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.registerSystemMetadata"> <code class="descclassname">CNCore.</code><code class="descname">registerSystemMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>sysmeta</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNCore.registerSystemMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Provides a mechanism for adding system metadata independently of its associated object, such as when adding system metadata for data objects.</p> <p>This method is used internally by Coordinating Nodes.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.SystemMetadata" title="v2_0.Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.SystemMetadata</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/meta</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>sysmeta</strong> (<a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a>) – Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The pid that was updated.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4860)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4861)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4862)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4863)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidSystemMetadata" title="Exceptions.InvalidSystemMetadata"><strong>Exceptions.InvalidSystemMetadata</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4864)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4865)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.updateSystemMetadata"> <code class="descclassname">CNCore.</code><code class="descname">updateSystemMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>sysmeta</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNCore.updateSystemMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Provides a mechanism for updating system metadata for any objects held in the federation.</p> <p>Usage of this method SHOULD be restricted to CNs for updating the system metadata in the underlying CN storage sub-system.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.SystemMetadata" title="v2_0.Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.SystemMetadata</span></code></a> has changed.</p> <p>Note: the serial version and the replica list in the new system metadata will be ignored.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/meta</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>sysmeta</strong> (<a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a>) – Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the update was successful.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4866)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4867)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4868)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4869)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidSystemMetadata" title="Exceptions.InvalidSystemMetadata"><strong>Exceptions.InvalidSystemMetadata</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4956)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4957)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNCore.hasReservation"> <code class="descclassname">CNCore.</code><code class="descname">hasReservation</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em>, <em>id</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNCore.hasReservation" title="Permalink to this definition">¶</a></dt> <dd><p>Checks to determine if the supplied <em>subject</em> is the owner of the reservation of <em>id</em>.</p> <p>A positive response (that the <em>pid</em> is reserved and owned by <em>subject</em>) is indicated by a return of a HTTP status of 200.</p> <p>A negative response is indicated by an exception and the associated HTTP status code.</p> <p>v2.0: The identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/reserve/{id}?subject={subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to an authority trusted by the DataONE Coordinating Nodes. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The subject of the <a class="reference internal" href="../glossary.html#term-principal"><span class="xref std std-term">principal</span></a> (user) that made the reservation. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier that is being checked for existing as a reserved identifier or is in use as an identifier for an existing object. May be either a PID or a SID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True - subject has the reservation on the PID; False - the PID does not exist; False - the PID is already in use; False - the PID is reserved by somone else.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4920)</span></code></p> <p>The method functionality is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4921)</span></code></p> <p>An internal server error occurred.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4922)</span></code></p> <p>The session information is invalid.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4923)</span></code></p> <p>The PID does not exist as a reservation or an existing object and is not in use as an identifier.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4924)</span></code></p> <p>The PID is reserved but the owner is not the <a class="reference internal" href="../glossary.html#term-principal"><span class="xref std std-term">principal</span></a> identified by the <em>subjectInfo</em> OR the provide <em>session</em> does not have authority to access this service.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4925)</span></code></p> <p>The request was malformed and could not be processed</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNRead"> <span id="read-api"></span><h2>Read API<a class="headerlink" href="#module-CNRead" title="Permalink to this headline">¶</a></h2> <p>The <em>CN_read</em> API implements methods that enable object retrieval operations on a <a class="reference internal" href="../glossary.html#term-coordinating-node"><span class="xref std std-term">Coordinating Node</span></a>. It includes searches of science metadata and system metadata and exposes log records held by CNs.</p> <table border="1" class="docutils" id="id4"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNRead" title="CNRead: Data read operations for Coordinating Nodes"><code class="xref py py-mod docutils literal"><span class="pre">CNRead</span></code></a></span><a class="headerlink" href="#id4" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.get" title="CNRead.get"><code class="xref py py-func docutils literal"><span class="pre">get()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/meta/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.getSystemMetadata" title="CNRead.getSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">getSystemMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">HEAD</span> <span class="pre">/object/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.describe" title="CNRead.describe"><code class="xref py py-func docutils literal"><span class="pre">describe()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.DescribeResponse" title="Types.DescribeResponse"><code class="xref py py-class docutils literal"><span class="pre">Types.DescribeResponse</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/resolve/{id}</span></code></td> <td><a class="reference internal" href="#CNRead.resolve" title="CNRead.resolve"><code class="xref py py-func docutils literal"><span class="pre">resolve()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectLocationList" title="Types.ObjectLocationList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectLocationList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum/{pid}</span></code></td> <td><a class="reference internal" href="#CNRead.getChecksum" title="CNRead.getChecksum"><code class="xref py py-func docutils literal"><span class="pre">getChecksum()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Checksum" title="Types.Checksum"><code class="xref py py-class docutils literal"><span class="pre">Types.Checksum</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object[?fromDate={fromDate}&toDate={toDate}&identifier={identifier}&formatId={formatId}&nodeId={nodeId}&start={start}&count={count}]</span></code></td> <td><a class="reference internal" href="#CNRead.listObjects" title="CNRead.listObjects"><code class="xref py py-func docutils literal"><span class="pre">listObjects()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[fromDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">[toDate]</span></code></a>, <a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">[formatId]</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">[identifier]</span></code></a>, <code class="docutils literal"><span class="pre">[start=0]</span></code>, <code class="docutils literal"><span class="pre">[count=1000]</span></code>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">[nodeId]</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/search/{queryType}/{query}</span></code></td> <td><a class="reference internal" href="#CNRead.search" title="CNRead.search"><code class="xref py py-func docutils literal"><span class="pre">search()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryType</span></code>, <code class="docutils literal"><span class="pre">query</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryEngine}/{query}</span></code></td> <td><a class="reference internal" href="#CNRead.query" title="CNRead.query"><code class="xref py py-func docutils literal"><span class="pre">query()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>, <code class="docutils literal"><span class="pre">query</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryType}</span></code></td> <td><a class="reference internal" href="#CNRead.getQueryEngineDescription" title="CNRead.getQueryEngineDescription"><code class="xref py py-func docutils literal"><span class="pre">getQueryEngineDescription()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">queryEngine</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineDescription</span></code></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>1.1, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query</span></code></td> <td><a class="reference internal" href="#CNRead.listQueryEngines" title="CNRead.listQueryEngines"><code class="xref py py-func docutils literal"><span class="pre">listQueryEngines()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineList</span></code></td> </tr> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/synchronize</span></code></td> <td><a class="reference internal" href="#CNRead.synchronize" title="CNRead.synchronize"><code class="xref py py-func docutils literal"><span class="pre">synchronize()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> </tbody> </table> <dl class="function"> <dt id="CNRead.get"> <code class="descclassname">CNRead.</code><code class="descname">get</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → OctetStream<a class="headerlink" href="#CNRead.get" title="Permalink to this definition">¶</a></dt> <dd><p>Retrieves the object identified by <em>id</em> from the node. If the object is not present on the node, then an <a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><code class="xref py py-exc docutils literal"><span class="pre">Exceptions.NotFound</span></code></a> error is raised, regardless of whether the object exists on another node in the DataONE system.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/01_uc.html"><span class="doc">UC01</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a>, <a class="reference internal" href="../design/UseCases/09_uc.html"><span class="doc">UC09</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object to be retrieved. May be either a PID or a SID, the latter acting as if called using the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">For science metadata objects, this will be the exact byte stream of the science metadata object as it was original ingested. Note that additional object types may in the future be returned by the get method.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1000)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1001)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=1020)</span></code></p> <p>The object specified by the identifier is not present on this (or any) CN. The response body should contain a reference to <a class="reference internal" href="#CNRead.resolve" title="CNRead.resolve"><code class="xref py py-func docutils literal"><span class="pre">CNRead.resolve()</span></code></a>.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1030)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1010)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Example</strong></p> <p>See <a class="reference internal" href="MN_APIs.html#MNRead.get" title="MNRead.get"><code class="xref py py-func docutils literal"><span class="pre">MNRead.get()</span></code></a> for additional details and examples.</p> <dl class="function"> <dt id="CNRead.getSystemMetadata"> <code class="descclassname">CNRead.</code><code class="descname">getSystemMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → SystemMetadata<a class="headerlink" href="#CNRead.getSystemMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the <a class="reference internal" href="../glossary.html#term-80"><span class="xref std std-term">system metadata</span></a> that contains DataONE specific information about the object identified by <em>id</em>. Authoritative copies of system metadata are only available from the Coordinating Nodes.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a> and the returned <a class="reference internal" href="Types2.html#v2_0.Types.SystemMetadata" title="v2_0.Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.SystemMetadata</span></code></a> structure has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/36_uc.html"><span class="doc">UC36</span></a>, <a class="reference internal" href="../design/UseCases/37_uc.html"><span class="doc">UC37</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/meta/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier for the object of interest. May be either a PID or a SID, the latter acts as if called with the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A system metadata document describing the object.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SystemMetadata" title="Types.SystemMetadata"><code class="xref py py-class docutils literal"><span class="pre">Types.SystemMetadata</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1050)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1041)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1090)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1040)</span></code></p> <p>The principal identified by token does not have READ permission on the object.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=1060)</span></code></p> <p>There is no object identified by <em>pid</em> and so no system metadata can be returned.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Example</strong></p> <p>See <a class="reference internal" href="MN_APIs.html#MNRead.getSystemMetadata" title="MNRead.getSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">MNRead.getSystemMetadata()</span></code></a> for additional details and examples.</p> <dl class="function"> <dt id="CNRead.describe"> <code class="descclassname">CNRead.</code><code class="descname">describe</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → DescribeResponse<a class="headerlink" href="#CNRead.describe" title="Permalink to this definition">¶</a></dt> <dd><p>This method provides a lighter weight mechanism than <a class="reference internal" href="#CNRead.getSystemMetadata" title="CNRead.getSystemMetadata"><code class="xref py py-func docutils literal"><span class="pre">CNRead.getSystemMetadata()</span></code></a> for a client to determine basic properties of the referenced object. The response should indicate properties that are typically returned in a HTTP HEAD request: the date late modified, the size of the object, the type of the object (the <code class="xref py py-attr docutils literal"><span class="pre">SystemMetadata.formatId</span></code>).</p> <p>The principal indicated by <em>token</em> must have read privileges on the object, otherwise <a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><code class="xref py py-exc docutils literal"><span class="pre">Exceptions.NotAuthorized</span></code></a> is raised.</p> <p>If the object does not exist on the node servicing the request, then <a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><code class="xref py py-exc docutils literal"><span class="pre">Exceptions.NotFound</span></code></a> must be raised even if the object exists on another node in the DataONE system.</p> <p>Note that this method is likely to be called frequently and so efficiency should be taken into consideration during implementation.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">HEAD</span> <span class="pre">/object/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier for the object in question. May be either a PID or a SID, the latter acting as if called with the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A set of values providing a basic description of the object.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.DescribeResponse" title="Types.DescribeResponse"><code class="xref py py-class docutils literal"><span class="pre">Types.DescribeResponse</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4930)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4931)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4932)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4933)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4934)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Examples</strong></p> <p>(HEAD) Retrieve information about the object with identifier “ABC123”:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">I</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o">/</span><span class="n">v1</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="n">ABC123</span> <span class="n">HTTP</span><span class="o">/</span><span class="mf">1.1</span> <span class="mi">200</span> <span class="n">OK</span> <span class="n">Last</span><span class="o">-</span><span class="n">Modified</span><span class="p">:</span> <span class="n">Wed</span><span class="p">,</span> <span class="mi">16</span> <span class="n">Dec</span> <span class="mi">2009</span> <span class="mi">13</span><span class="p">:</span><span class="mi">58</span><span class="p">:</span><span class="mi">34</span> <span class="n">GMT</span> <span class="n">Content</span><span class="o">-</span><span class="n">Length</span><span class="p">:</span> <span class="mi">10400</span> <span class="n">Content</span><span class="o">-</span><span class="n">Type</span><span class="p">:</span> <span class="n">application</span><span class="o">/</span><span class="n">octet</span><span class="o">-</span><span class="n">stream</span> <span class="n">DataONE</span><span class="o">-</span><span class="n">ObjectFormat</span><span class="p">:</span> <span class="n">eml</span><span class="p">:</span><span class="o">//</span><span class="n">ecoinformatics</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">eml</span><span class="o">-</span><span class="mf">2.0</span><span class="o">.</span><span class="mi">1</span> <span class="n">DataONE</span><span class="o">-</span><span class="n">Checksum</span><span class="p">:</span> <span class="n">SHA</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mf">2e01</span><span class="n">e17467891f7c933dbaa00e1459d23db3fe4f</span> <span class="n">DataONE</span><span class="o">-</span><span class="n">SerialVersion</span><span class="p">:</span> <span class="mi">1234</span> </pre></div> </div> <p>(HEAD) An error response to a describe() request for object “IDONTEXIST”:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">I</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o">/</span><span class="n">v1</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="n">IDONTEXIST</span> <span class="n">HTTP</span><span class="o">/</span><span class="mf">1.1</span> <span class="mi">404</span> <span class="n">Not</span> <span class="n">Found</span> <span class="n">Last</span><span class="o">-</span><span class="n">Modified</span><span class="p">:</span> <span class="n">Wed</span><span class="p">,</span> <span class="mi">16</span> <span class="n">Dec</span> <span class="mi">2009</span> <span class="mi">13</span><span class="p">:</span><span class="mi">58</span><span class="p">:</span><span class="mi">34</span> <span class="n">GMT</span> <span class="n">Content</span><span class="o">-</span><span class="n">Length</span><span class="p">:</span> <span class="mi">1182</span> <span class="n">Content</span><span class="o">-</span><span class="n">Type</span><span class="p">:</span> <span class="n">text</span><span class="o">/</span><span class="n">xml</span> <span class="n">DataONE</span><span class="o">-</span><span class="ne">Exception</span><span class="o">-</span><span class="n">Name</span><span class="p">:</span> <span class="n">NotFound</span> <span class="n">DataONE</span><span class="o">-</span><span class="ne">Exception</span><span class="o">-</span><span class="n">DetailCode</span><span class="p">:</span> <span class="mi">1380</span> <span class="n">DataONE</span><span class="o">-</span><span class="ne">Exception</span><span class="o">-</span><span class="n">Description</span><span class="p">:</span> <span class="n">The</span> <span class="n">specified</span> <span class="nb">object</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exist</span> <span class="n">on</span> <span class="n">this</span> <span class="n">node</span><span class="o">.</span> <span class="n">DataONE</span><span class="o">-</span><span class="ne">Exception</span><span class="o">-</span><span class="n">PID</span><span class="p">:</span> <span class="n">IDONTEXIST</span> </pre></div> </div> <dl class="function"> <dt id="CNRead.resolve"> <code class="descclassname">CNRead.</code><code class="descname">resolve</code><span class="sig-paren">(</span><em>session</em>, <em>id</em><span class="sig-paren">)</span> → ObjectLocationList<a class="headerlink" href="#CNRead.resolve" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of nodes (MNs or CNs) known to hold copies of the object identified by <em>id</em>. The object resolution process is intended to provide a simple mechanism for a client to discover from which node(s) a particular object may be retrieved. Details about method interfaces (i.e. REST URLs) exposed by a particular node can be determined by examining the response from the <em>node</em> collection. For convenience, the <a class="reference internal" href="MN_APIs.html#MNRead.get" title="MNRead.get"><code class="xref py py-func docutils literal"><span class="pre">MNRead.get()</span></code></a> URL is included in the response as is the base URL of the node REST services.</p> <p>Note also that the same functionality as <em>resolve()</em> can be implemented by retrieving a copy of the system metadata for the object and utilizing the node registry to discover the base URL from which the client can construct the <em>get()</em> URL. Resolve is provided for efficiency since the response size is much smaller.</p> <p>Resolve will return a HTTP status of 303 (see other) on success. The HTTP header “Location” MUST be set, and it’s value SHOULD be the full get() URL for retrieving the object from the first location in the resolve response.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>. If the identifier is a SID, then resolution is for the latest version of an object (i.e. the head of the obsolescence chain).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/36_uc.html"><span class="doc">UC36</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/resolve/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier being resolved. May be either a PID or a SID, the latter acting as if called with the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of nodes known to contain copies of the target object, plus the URLs known to resolve to the node get methods.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ObjectLocationList" title="Types.ObjectLocationList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectLocationList</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4130)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4150)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4120)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4140)</span></code></p> <p>There is no object identified by the given identifier</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4131)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <p><strong>Examples</strong></p> <p>XML (default) in response to <code class="docutils literal"><span class="pre">Accept:</span> <span class="pre">text/xml</span></code>:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">GET</span> <span class="o">-</span><span class="n">H</span> <span class="s2">"Accept: text/xml"</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="n">resolve</span><span class="o">/</span><span class="mi">1234</span> <span class="ow">or</span> <span class="n">curl</span> <span class="o">-</span><span class="n">X</span> <span class="n">GET</span> <span class="o">-</span><span class="n">H</span> <span class="s2">"Accept: */*"</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="n">resolve</span><span class="o">/</span><span class="mi">1234</span> <span class="o"><</span><span class="n">objectLocationList</span> <span class="n">xmlns</span><span class="p">:</span><span class="n">d1</span><span class="o">=</span><span class="s2">"http://ns.dataone.org/service/types/v1"</span><span class="o">></span> <span class="o"><</span><span class="n">identifier</span><span class="o">></span><span class="mi">1234</span><span class="o"></</span><span class="n">identifier</span><span class="o">></span> <span class="o"><</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">nodeIdentifier</span><span class="o">></span><span class="n">mn1</span><span class="o"></</span><span class="n">nodeIdentifier</span><span class="o">></span> <span class="o"><</span><span class="n">baseURL</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o"></</span><span class="n">baseURL</span><span class="o">></span> <span class="o"><</span><span class="n">version</span><span class="o">></span><span class="n">v1</span><span class="o"></</span><span class="n">version</span><span class="o">></span> <span class="o"><</span><span class="n">url</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="mi">1234</span><span class="o"></</span><span class="n">url</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">nodeIdentifier</span><span class="o">></span><span class="n">mn2</span><span class="o"></</span><span class="n">nodeIdentifier</span><span class="o">></span> <span class="o"><</span><span class="n">baseURL</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn2</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o"></</span><span class="n">baseURL</span><span class="o">></span> <span class="o"><</span><span class="n">version</span><span class="o">></span><span class="n">v1</span><span class="o"></</span><span class="n">version</span><span class="o">></span> <span class="o"><</span><span class="n">url</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mn2</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">some_base</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="mi">1234</span><span class="o"></</span><span class="n">url</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">nodeIdentifier</span><span class="o">></span><span class="n">cn1</span><span class="o"></</span><span class="n">nodeIdentifier</span><span class="o">></span> <span class="o"><</span><span class="n">baseURL</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o"></</span><span class="n">baseURL</span><span class="o">></span> <span class="o"><</span><span class="n">version</span><span class="o">></span><span class="n">v1</span><span class="o"></</span><span class="n">version</span><span class="o">></span> <span class="o"><</span><span class="n">url</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn1</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">cn</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="mi">1234</span><span class="o"></</span><span class="n">url</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">nodeIdentifier</span><span class="o">></span><span class="n">cn2</span><span class="o"></</span><span class="n">nodeIdentifier</span><span class="o">></span> <span class="o"><</span><span class="n">baseURL</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn2</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o"></</span><span class="n">baseURL</span><span class="o">></span> <span class="o"><</span><span class="n">version</span><span class="o">></span><span class="n">v1</span><span class="o"></</span><span class="n">version</span><span class="o">></span> <span class="o"><</span><span class="n">url</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn2</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">cn</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="mi">1234</span><span class="o"></</span><span class="n">url</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"><</span><span class="n">nodeIdentifier</span><span class="o">></span><span class="n">cn3</span><span class="o"></</span><span class="n">nodeIdentifier</span><span class="o">></span> <span class="o"><</span><span class="n">baseURL</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn3</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">mn</span><span class="o"></</span><span class="n">baseURL</span><span class="o">></span> <span class="o"><</span><span class="n">version</span><span class="o">></span><span class="n">v1</span><span class="o"></</span><span class="n">version</span><span class="o">></span> <span class="o"><</span><span class="n">url</span><span class="o">></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">cn3</span><span class="o">.</span><span class="n">dataone</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">cn</span><span class="o">/</span><span class="nb">object</span><span class="o">/</span><span class="mi">1234</span><span class="o"></</span><span class="n">url</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocation</span><span class="o">></span> <span class="o"></</span><span class="n">objectLocationList</span><span class="o">></span> </pre></div> </div> <dl class="function"> <dt id="CNRead.getChecksum"> <code class="descclassname">CNRead.</code><code class="descname">getChecksum</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em><span class="sig-paren">)</span> → Checksum<a class="headerlink" href="#CNRead.getChecksum" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the checksum for the specified object as reported in the system metadata.</p> <p>Note that the signature of this method differs from <a class="reference internal" href="MN_APIs.html#MNRead.getChecksum" title="MNRead.getChecksum"><code class="xref py py-func docutils literal"><span class="pre">MNRead.getChecksum()</span></code></a> as that method takes an optional algorithm parameter.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/09_uc.html"><span class="doc">UC09</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/checksum/{pid}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object for which checksum is being requested Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The checksum of the specified object</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Checksum" title="Types.Checksum"><code class="xref py py-class docutils literal"><span class="pre">Types.Checksum</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1402)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1410)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=1420)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1400)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1430)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.listObjects"> <code class="descclassname">CNRead.</code><code class="descname">listObjects</code><span class="sig-paren">(</span><em>session</em><span class="optional">[</span>, <em>fromDate</em><span class="optional">]</span><span class="optional">[</span>, <em>toDate</em><span class="optional">]</span><span class="optional">[</span>, <em>formatId</em><span class="optional">]</span><span class="optional">[</span>, <em>identifier</em><span class="optional">]</span><span class="optional">[</span>, <em>start=0</em><span class="optional">]</span><span class="optional">[</span>, <em>count=1000</em><span class="optional">]</span><span class="optional">[</span>, <em>nodeId</em><span class="optional">]</span><span class="sig-paren">)</span> → ObjectList<a class="headerlink" href="#CNRead.listObjects" title="Permalink to this definition">¶</a></dt> <dd><p>Retrieve the list of objects present on the CN that match the calling parameters. At a minimum, this method should be able to return a list of objects that match:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">fromDate</span> <span class="o"><</span> <span class="n">SystemMetadata</span><span class="o">.</span><span class="n">dateSysMetadataModified</span> </pre></div> </div> <p>but is expected to also support date range (by also specifying <em>toDate</em>), and should also support slicing of the matching set of records by indicating the starting <em>index</em> of the response (where 0 is the index of the first item) and the <em>count</em> of elements to be returned.</p> <p>Note that date time precision is limited to one millisecond. If no timezone information is provided, the UTC will be assumed.</p> <p>Note that date time precision is limited to one millisecond. If no timezone information is provided, the UTC will be assumed.</p> <p>V2.0: Added filter on authoritativeMemberNode value.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/06_uc.html"><span class="doc">UC06</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/object[?fromDate={fromDate}&toDate={toDate}&identifier={identifier}&formatId={formatId}&nodeId={nodeId}&start={start}&count={count}]</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>fromDate</strong> (<a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">Types.DateTime</span></code></a>) – Entries with <code class="xref py py-attr docutils literal"><span class="pre">SystemMetadata.dateSysMetadataModified</span></code> greater than or equal to (>=) <em>fromDate</em> must be returned. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>toDate</strong> (<a class="reference internal" href="Types.html#Types.DateTime" title="Types.DateTime"><code class="xref py py-class docutils literal"><span class="pre">Types.DateTime</span></code></a>) – Entries with <code class="xref py py-attr docutils literal"><span class="pre">SystemMetadata.dateSysMetadataModified</span></code> less than (<) <em>toDate</em> must be returned. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>formatId</strong> (<a class="reference internal" href="Types.html#Types.ObjectFormatIdentifier" title="Types.ObjectFormatIdentifier"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectFormatIdentifier</span></code></a>) – Restrict results to the specified object format. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>identifier</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Restrict results to the specified identifier. May be either a PID or a SID. If the latter, will return results for each PID in the series. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>start=0</strong> (<em>integer</em>) – The zero-based index of the first value, relative to the first record of the resultset that matches the parameters. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>count=1000</strong> (<em>integer</em>) – The maximum number of entries that should be returned in the response. The Member Node may return fewer and the caller should check the <em>total</em> in the response to determine if further pages may be retrieved. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>nodeId</strong> (<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a>) – Restrict results to those with authoritativeMemberNode equal to nodeId. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The list of PIDs that match the query criteria. If none match, an empty list is returned.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1520)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=1540)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1560)</span></code></p> <p>Raised if some functionality requested is not implemented. In the case of an optional request parameter not being supported, the errorCode should be 400. If the requested format (through HTTP Accept headers) is not supported, then the standard HTTP 406 error code should be returned.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1580)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1530)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.search"> <code class="descclassname">CNRead.</code><code class="descname">search</code><span class="sig-paren">(</span><em>session</em>, <em>queryType</em>, <em>query</em><span class="sig-paren">)</span> → ObjectList<a class="headerlink" href="#CNRead.search" title="Permalink to this definition">¶</a></dt> <dd><p>Search the metadata catalog and return identifiers of metadata records that match the criteria.</p> <p>Search may be implemented by more than one type of search engine. The queryType parameter indicates which search engine should be targeted. The value and form of <em>query</em> is determined by the search engine.</p> <p>Currently supported search engines include: “solr”</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/02_uc.html"><span class="doc">UC02</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/search/{queryType}/{query}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>queryType</strong> (<em>string</em>) – Indicates which search engine will be used to handle the query. Currently supported search engines include: “SOLR”. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>query</strong> (<em>string</em>) – The remainder of the URL is passed verbatim to the respective search engine implementation. Hence it may contain additional path elements and query elements as determined by the functionality of the search engine. The caller is reponsible for providing a ‘?’ to indicate the start of the query string portion of the URL, as well as proper URL escaping. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of objects that match the specified search criteria</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.ObjectList" title="Types.ObjectList"><code class="xref py py-class docutils literal"><span class="pre">Types.ObjectList</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4290)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4310)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4280)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4300)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4281)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.query"> <code class="descclassname">CNRead.</code><code class="descname">query</code><span class="sig-paren">(</span><em>session</em>, <em>queryEngine</em>, <em>query</em><span class="sig-paren">)</span> → OctetStream<a class="headerlink" href="#CNRead.query" title="Permalink to this definition">¶</a></dt> <dd><p>Submit a query against the specified <em>queryEngine</em> and return the response as formatted by the queryEngine.</p> <p>The <em>query()</em> operation may be implemented by more than one type of search engine and the <em>queryEngine</em> parameter indicates which search engine is targeted. The value and form of <em>query</em> is determined by the specific query engine.</p> <p>For example, the solr search engine will accept many of the standard parameters of solr, including field restrictions and faceting.</p> <p>v1.1: This method was added.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.1, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/02_uc.html"><span class="doc">UC02</span></a>, <a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryEngine}/{query}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>queryEngine</strong> (<em>string</em>) – Indicates which search engine will be used to handle the query. Supported search engines can be determined through the CNRead.listQueryEngines API call. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>query</strong> (<em>string</em>) – The remainder of the URL is passed verbatim to the respective search engine implementation. Hence it may contain additional path elements and query elements as determined by the functionality of the search engine. The caller is reponsible for providing a ‘?’ to indicate the start of the query string portion of the URL, as well as proper URL escaping. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The structure of the response is determined by the chosen search engine and parameters provided to it.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4320)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4321)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4322)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4323)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4324)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4325)</span></code></p> <p>The specified queryEngine does not exist</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.getQueryEngineDescription"> <code class="descclassname">CNRead.</code><code class="descname">getQueryEngineDescription</code><span class="sig-paren">(</span><em>session</em>, <em>queryEngine</em><span class="sig-paren">)</span> → QueryEngineDescription<a class="headerlink" href="#CNRead.getQueryEngineDescription" title="Permalink to this definition">¶</a></dt> <dd><p>Provides metadata about the query service of the specified <em>queryEngine</em>. The metadata provides a brief description of the query engine, its version, its schema version, and an optional list of fields supported by the query engine.</p> <p>v1.1: This method was added.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.1, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query/{queryType}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate provided with the request. The certificate must be traceable to an authority recognized by DataONE, currently CILogon. Transmitted as part of the SSL handshake process.</li> <li><strong>queryEngine</strong> (<em>string</em>) – Indicates which query engine for which to provide descriptive metadata. Currently supported search engines can be determined through CNRead.listQueryEngines. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of fields that are supported by the search index and additional metadata.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineDescription</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4410)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4411)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4412)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4413)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4414)</span></code></p> <p>The specified queryEngine does not exist</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.listQueryEngines"> <code class="descclassname">CNRead.</code><code class="descname">listQueryEngines</code><span class="sig-paren">(</span><em>session</em><span class="sig-paren">)</span> → QueryEngineList<a class="headerlink" href="#CNRead.listQueryEngines" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of query engines, i.e. supported values for the <em>queryEngine</em> parameter of the <em>getQueryEngineDescription</em> and <em>query</em> operations.</p> <p>The list of search engines available may be influenced by the authentication status of the request.</p> <p>v1.1: This method was added.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.1, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/query</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate provided with the request. The certificate must be traceable to an authority recognized by DataONE, currently CILogon. Transmitted as part of the SSL handshake process.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of names of queryEngines available to the user identified by <em>session</em>.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">Types.QueryEngineList</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4420)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4421)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4422)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4423)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRead.synchronize"> <code class="descclassname">CNRead.</code><code class="descname">synchronize</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNRead.synchronize" title="Permalink to this definition">¶</a></dt> <dd><p>Indicates to the CN that a new or existing object identified by PID requires synchronization. Note that this operation is asynchronous, a successful return indicates that the synchronization task was successfully queued.</p> <p>This method may be called by any Member Node for new content or the authoritative Member Node for updates to existing content.</p> <p>The CN will schedule the synchronization task which will then be processed in the same way as content changes identified through the listObjects polling mechanism.</p> <p>v2.0: This method was added to the Version 2.0 API.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/synchronize</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the synchronization request was successfully queued, otherwise False</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4960)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4961)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4962)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4963)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNView"> <span id="view-api"></span><h2>View API<a class="headerlink" href="#module-CNView" title="Permalink to this headline">¶</a></h2> <p>The <em>CNView</em> API implements methods that enable viewing content on a <a class="reference internal" href="../glossary.html#term-coordinating-node"><span class="xref std std-term">Coordinating Node</span></a>. Like the MNView service, the CNView service provides a transformed view of a metadata file, data file, or package. The CNView service provides a default view for all content, and may choose to redirect a review request to the authoritative Member Node for a given PID.</p> <table border="1" class="docutils" id="id5"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNView" title="CNView: View operations to see formatted versions of metadata and data for Coordinating Nodes"><code class="xref py py-mod docutils literal"><span class="pre">CNView</span></code></a></span><a class="headerlink" href="#id5" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views/{theme}/{id}</span></code></td> <td><a class="reference internal" href="#CNView.view" title="CNView.view"><code class="xref py py-func docutils literal"><span class="pre">view()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">theme</span></code>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 1</td> <td>2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views</span></code></td> <td><a class="reference internal" href="#CNView.listViews" title="CNView.listViews"><code class="xref py py-func docutils literal"><span class="pre">listViews()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <code class="xref py py-class docutils literal"><span class="pre">Types.OptionList</span></code></td> </tr> </tbody> </table> <dl class="function"> <dt id="CNView.view"> <code class="descclassname">CNView.</code><code class="descname">view</code><span class="sig-paren">(</span><em>session</em>, <em>theme</em>, <em>id</em><span class="sig-paren">)</span> → OctetStream<a class="headerlink" href="#CNView.view" title="Permalink to this definition">¶</a></dt> <dd><p>Provides a formatted view of an object (science metadata, data, resource, or other) using the given named theme.</p> <p>The service <a class="reference internal" href="#CNView.view" title="CNView.view"><code class="xref py py-func docutils literal"><span class="pre">CNView.view()</span></code></a> operation will implement at least one {theme} named ‘default’ to provide a standard (possibly minimalistic) view of the content in HTML format. In addition, a CN may redirect a client to the view service of the authoritative Member Node for a PID if that node has implemented the <a class="reference internal" href="MN_APIs.html#MNView.view" title="MNView.view"><code class="xref py py-func docutils literal"><span class="pre">MNView.view()</span></code></a> service and implements a compatible theme.</p> <p>If the {theme} parameter is not recognized, the service must render the object using the default theme rather than throwing an error. Note that the return type of Types.OctetStream requires that the consuming client has a priori knowledge of the theme being returned (like HTML). Response headers must include the correct mime-type of the view being returned.</p> <p>v2.0: This method was added to the Version 2.0 API.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views/{theme}/{id}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>theme</strong> (<em>string</em>) – Indicates which themed view will be used to handle the query. All implementations must support a ‘default’ HTML theme, but are free to implement additional themes that return both HTML and non-HTML responses. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the object to render in a view. May be a PID or a SID, the latter acting as if called with the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Any return type is allowed, including application/octet-stream, but the format of the response should be specialized by the requested theme.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.OctetStream" title="Types.OctetStream"><code class="xref py py-class docutils literal"><span class="pre">Types.OctetStream</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2850)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2851)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2852)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2853)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2854)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2855)</span></code></p> <p>The specified pid does not exist.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNView.listViews"> <code class="descclassname">CNView.</code><code class="descname">listViews</code><span class="sig-paren">(</span><em>session</em><span class="sig-paren">)</span> → OptionList<a class="headerlink" href="#CNView.listViews" title="Permalink to this definition">¶</a></dt> <dd><p>Provides a list of usable themes for rendering content in a view, including a required ‘default’ theme. The list of themes is provided as an OptionList, where the option key should be used as the theme name in calls to MNView.view, and the description provides a human readable description of what will be returned fo rthat theme.</p> <p>v2.0: This method was added to the Version 2.0 API.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/views</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A list of available themes that can be used with the MNView.view service.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">Types.OptionList</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2860)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2861)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2862)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2863)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2864)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNAuthorization"> <span id="authorization-api"></span><h2>Authorization API<a class="headerlink" href="#module-CNAuthorization" title="Permalink to this headline">¶</a></h2> <table border="1" class="docutils" id="id6"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNAuthorization" title="CNAuthorization: Methods for authorization and access control"><code class="xref py py-mod docutils literal"><span class="pre">CNAuthorization</span></code></a></span><a class="headerlink" href="#id6" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/owner/{id}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.setRightsHolder" title="CNAuthorization.setRightsHolder"><code class="xref py py-func docutils literal"><span class="pre">setRightsHolder()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">userId</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/isAuthorized/{id}?action={action}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.isAuthorized" title="CNAuthorization.isAuthorized"><code class="xref py py-func docutils literal"><span class="pre">isAuthorized()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.Permission" title="Types.Permission"><code class="xref py py-class docutils literal"><span class="pre">action</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accessRules/{id}</span></code></td> <td><a class="reference internal" href="#CNAuthorization.setAccessPolicy" title="CNAuthorization.setAccessPolicy"><code class="xref py py-func docutils literal"><span class="pre">setAccessPolicy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.AccessPolicy" title="Types.AccessPolicy"><code class="xref py py-class docutils literal"><span class="pre">accessPolicy</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> </tbody> </table> <dl class="function"> <dt id="CNAuthorization.setRightsHolder"> <code class="descclassname">CNAuthorization.</code><code class="descname">setRightsHolder</code><span class="sig-paren">(</span><em>session</em>, <em>id</em>, <em>userId</em>, <em>serialVersion</em><span class="sig-paren">)</span> → Identifier<a class="headerlink" href="#CNAuthorization.setRightsHolder" title="Permalink to this definition">¶</a></dt> <dd><p>Changes ownership (RightsHolder) of the specified object to the <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">subject</span></a> specified by <cite>userId</cite></p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/owner/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object to be modified. May be either a PID or a SID, the latter acting on the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>userId</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The subject that will be taking ownership of the specified object. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The serialVersion of the system metadata that is the intended target for the change. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Identifier of the object that was modified</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4490)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4480)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4440)</span></code></p> <p>The supplied subject does not have permission to change ownership of the object</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4460)</span></code></p> <p>The specified object does not exist in the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4441)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4442)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4443)</span></code></p> <p>The serialVersion supplied with the request does not match the serialVersion of the target</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNAuthorization.isAuthorized"> <code class="descclassname">CNAuthorization.</code><code class="descname">isAuthorized</code><span class="sig-paren">(</span><em>session</em>, <em>id</em>, <em>action</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNAuthorization.isAuthorized" title="Permalink to this definition">¶</a></dt> <dd><p>Test if the user identified by the provided token has authorization for operation on the specified object.</p> <p>A successful operation is indicated by a return HTTP status of 200.</p> <p>Failure is indicated by an exception such as <code class="xref py py-exc docutils literal"><span class="pre">NotAuthorized</span></code> being returned.</p> <p>A successful response is indicated by a response HTTP status of 200. The body of the response is arbitrary and SHOULD be ignored by the caller.</p> <p>If the action is not authorized, then a <code class="xref py py-exc docutils literal"><span class="pre">NotAuthorized</span></code> exception MUST be raised.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/01_uc.html"><span class="doc">UC01</span></a>, <a class="reference internal" href="../design/UseCases/02_uc.html"><span class="doc">UC02</span></a>, <a class="reference internal" href="../design/UseCases/36_uc.html"><span class="doc">UC36</span></a>, <a class="reference internal" href="../design/UseCases/37_uc.html"><span class="doc">UC37</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/isAuthorized/{id}?action={action}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifer of the resource for which access is being checked. May be either a PID or a SID, the latter returning results as if called with the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>action</strong> (<a class="reference internal" href="Types.html#Types.Permission" title="Types.Permission"><code class="xref py py-class docutils literal"><span class="pre">Types.Permission</span></code></a>) – The type of operation which is being requested for the given identifier. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the operation is allowed</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=1760)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1840)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=1800)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=1820)</span></code></p> <p>This error is raised if the request comes from a black listed source (e.g. a temporary block may be imposed on a source that calls this method too many times within some time interval)</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=1780)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=1761)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNAuthorization.setAccessPolicy"> <code class="descclassname">CNAuthorization.</code><code class="descname">setAccessPolicy</code><span class="sig-paren">(</span><em>session</em>, <em>id</em>, <em>accessPolicy</em>, <em>serialVersion</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNAuthorization.setAccessPolicy" title="Permalink to this definition">¶</a></dt> <dd><p>Sets the access permissions for an object identified by <em>id</em>.</p> <p>Triggers a change to the system metadata modified time stamp.</p> <p>Successful completion of this operation is indicated by a HTTP response status code of 200.</p> <p>Unsuccessful completion of this operation MUST be indicated by returning an appropriate exception such as <code class="xref py py-exc docutils literal"><span class="pre">NotAuthorized</span></code>.</p> <p>v2.0: The supplied identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or a <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accessRules/{id}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The object for which access control is being updated. May be either a PID or a SID, the latter acting on the HEAD PID only. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>accessPolicy</strong> (<a class="reference internal" href="Types.html#Types.AccessPolicy" title="Types.AccessPolicy"><code class="xref py py-class docutils literal"><span class="pre">Types.AccessPolicy</span></code></a>) – The desired privileges to be assigned to the object. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The serialVersion of the system metadata that is the intended target for the change. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the operation succeeds, otherwise false.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4410)</span></code></p> <p>The supplied token is invalid</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4430)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4400)</span></code></p> <p>The specified object does not exist in the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4420)</span></code></p> <p>The <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">Subject</span></a> does not have permission to alter access control rules for the object.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4401)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4402)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4403)</span></code></p> <p>The serialVersion supplied with the request does not match the serialVersion of the target</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNIdentity"> <span id="identity-api"></span><h2>Identity API<a class="headerlink" href="#module-CNIdentity" title="Permalink to this headline">¶</a></h2> <table border="1" class="docutils" id="id7"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNIdentity" title="CNIdentity: Methods for account management and identity mapping."><code class="xref py py-mod docutils literal"><span class="pre">CNIdentity</span></code></a></span><a class="headerlink" href="#id7" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts</span></code></td> <td><a class="reference internal" href="#CNIdentity.registerAccount" title="CNIdentity.registerAccount"><code class="xref py py-func docutils literal"><span class="pre">registerAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">person</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.updateAccount" title="CNIdentity.updateAccount"><code class="xref py py-func docutils literal"><span class="pre">updateAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>, <a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">person</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/verification/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.verifyAccount" title="CNIdentity.verifyAccount"><code class="xref py py-func docutils literal"><span class="pre">verifyAccount()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.getSubjectInfo" title="CNIdentity.getSubjectInfo"><code class="xref py py-func docutils literal"><span class="pre">getSubjectInfo()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts?query={query}[&status={status}&start={start}&count={count}]</span></code></td> <td><a class="reference internal" href="#CNIdentity.listSubjects" title="CNIdentity.listSubjects"><code class="xref py py-func docutils literal"><span class="pre">listSubjects()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <code class="docutils literal"><span class="pre">query</span></code>, <code class="docutils literal"><span class="pre">status</span></code>, <code class="docutils literal"><span class="pre">start</span></code>, <code class="docutils literal"><span class="pre">count</span></code>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/map</span></code></td> <td><a class="reference internal" href="#CNIdentity.mapIdentity" title="CNIdentity.mapIdentity"><code class="xref py py-func docutils literal"><span class="pre">mapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">primarySubject</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">secondarySubject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/map/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.removeMapIdentity" title="CNIdentity.removeMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">removeMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/pendingmap</span></code></td> <td><a class="reference internal" href="#CNIdentity.requestMapIdentity" title="CNIdentity.requestMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">requestMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.confirmMapIdentity" title="CNIdentity.confirmMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">confirmMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.getPendingMapIdentity" title="CNIdentity.getPendingMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">getPendingMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></td> <td><a class="reference internal" href="#CNIdentity.denyMapIdentity" title="CNIdentity.denyMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">denyMapIdentity()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">subject</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/groups</span></code></td> <td><a class="reference internal" href="#CNIdentity.createGroup" title="CNIdentity.createGroup"><code class="xref py py-func docutils literal"><span class="pre">createGroup()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">group</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/groups</span></code></td> <td><a class="reference internal" href="#CNIdentity.updateGroup" title="CNIdentity.updateGroup"><code class="xref py py-func docutils literal"><span class="pre">updateGroup()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">group</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> </tbody> </table> <dl class="function"> <dt id="CNIdentity.registerAccount"> <code class="descclassname">CNIdentity.</code><code class="descname">registerAccount</code><span class="sig-paren">(</span><em>session</em>, <em>person</em><span class="sig-paren">)</span> → Subject<a class="headerlink" href="#CNIdentity.registerAccount" title="Permalink to this definition">¶</a></dt> <dd><p>Create a new <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">subject</span></a> in the DataONE system.</p> <p>Note that there should probably be a lot more metadata captured about the new user, and there should be a mechanism for specifying the default access control rules for the new account.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>person</strong> (<a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">Types.Person</span></code></a>) – Information about the Person to be registered with the account, including the real name and email address for the individual. The Subject with the Person must match the subject of the X.509 certificate associated with the authenticated SSL session via client-side authentication, and must not have been registered previously. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The new subject in the DataONE system. This may be a simple identifier.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4520)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4521)</span></code></p> <p>The chosen identity already exists in the system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidCredentials" title="Exceptions.InvalidCredentials"><strong>Exceptions.InvalidCredentials</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4522)</span></code></p> <p>Raised if the supplied credentials are invalid, such as an invalid X.509 certificate.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4523)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4524)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4525)</span></code></p> <p>The subject of the session does not match the subject of the person.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4526)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.updateAccount"> <code class="descclassname">CNIdentity.</code><code class="descname">updateAccount</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em>, <em>person</em><span class="sig-paren">)</span> → Subject<a class="headerlink" href="#CNIdentity.updateAccount" title="Permalink to this definition">¶</a></dt> <dd><p>Update an existing <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">subject</span></a> in the DataONE system. The target subject is determined from subject provided in the URL.</p> <p>The use calling this method must have write access to the account details.</p> <p>Note that there should be a policy for verifying the details that change via this method.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/16_uc.html"><span class="doc">UC16</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/{subject}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The subject of the person being updated. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>person</strong> (<a class="reference internal" href="Types.html#Types.Person" title="Types.Person"><code class="xref py py-class docutils literal"><span class="pre">Types.Person</span></code></a>) – New information about the Person. The subject of the Person cannot be updated with this method and must match the subject of the X.509 certificate associated with the authenticated SSL session via client-side authentication. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The Subject in the DataONE system that was updated.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4530)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidCredentials" title="Exceptions.InvalidCredentials"><strong>Exceptions.InvalidCredentials</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4531)</span></code></p> <p>Raised if the supplied credentials are invalid, such as an invalid X.509 certificate.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4532)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4533)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4534)</span></code></p> <p>Raised if the subject of the session does not match that of the person.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4535)</span></code></p> <p>Raised if the account does not exist.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4536)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.verifyAccount"> <code class="descclassname">CNIdentity.</code><code class="descname">verifyAccount</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.verifyAccount" title="Permalink to this definition">¶</a></dt> <dd><p>Verify that the Person data associated with this Subject is a true representation of the real world person.</p> <p>This service can only be called by users who have an administrative role for the domain of users in question.</p> <p>A successful completion of this operation is indicated by returning a HTTP status of 200.</p> <p>An exeption MUST be returned if the account verification is not successful.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/verification/{subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier of the Person to be verified. After this service is called for a subject by an authorized user, the account is marked as verified by this user. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the account verification succeeds, otherwise false.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4540)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4541)</span></code></p> <p>This error is raised if the person attempting to validate the account is not authorized to verify accounts.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4542)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4543)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4544)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.getSubjectInfo"> <code class="descclassname">CNIdentity.</code><code class="descname">getSubjectInfo</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → SubjectInfo<a class="headerlink" href="#CNIdentity.getSubjectInfo" title="Permalink to this definition">¶</a></dt> <dd><p>Get the information about a Person (their equivalent identities, and the Groups to which they belong) or the Group (including members).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/12_uc.html"><span class="doc">UC12</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/{subject}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier of the Person or Group details to be returned. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The Person or Group details are contained in the returned SubjectList for the given Subject</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4560)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4561)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4564)</span></code></p> <p>Raised if the requested subject is not registered with the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4563)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4564)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.listSubjects"> <code class="descclassname">CNIdentity.</code><code class="descname">listSubjects</code><span class="sig-paren">(</span><em>session</em>, <em>query</em>, <em>status</em>, <em>start</em>, <em>count</em><span class="sig-paren">)</span> → SubjectInfo<a class="headerlink" href="#CNIdentity.listSubjects" title="Permalink to this definition">¶</a></dt> <dd><p>List the subjects, including users, groups, and systems, that match search criteria.</p> <p>The list can be restricted to subjects whose identifier matches certain substrings, and the size of the resultset can be paged through.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts?query={query}[&status={status}&start={start}&count={count}]</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>query</strong> (<em>string</em>) – A query string criteria to be matched using a case-insensitive substring match against the identifier for the principal, the givenName or familyName of users, and the groupName of groups. The function returns the union of all successful matches against these fields. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>status</strong> (<em>string</em>) – When provided, the status field can limit the returned list of Subjects to only those with the given status. Currently the ‘verified’ status is supported. Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>start</strong> (<em>integer</em>) – The starting record number for the records to be returned (default = 0). Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>count</strong> (<em>integer</em>) – The maximum number of entries that should be returned in the response. The Member Node may return fewer and the caller should check the <em>total</em> in the response to determine if further pages may be retrieved (default = 100). Transmitted as a URL query parameter, and so must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The list of people and groups that match the query.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2290)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2270)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2260)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2261)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2262)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.mapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">mapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>primarySubject</em>, <em>secondarySubject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.mapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Create a new mapping between the two identities, asserting that they represent the same subject.</p> <p>Mapping identities with this method requires explicit authorization for the user given in the Session object. The caller must have made sure that the primary and secondary identities represent one and the same individual.</p> <p>Successful completion of the request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/map</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>primarySubject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier that will have a mapped identity to the other given subject. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>secondarySubject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier that will have a mapped identity to the other given subject. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the mapping was successfully initiated, false otherwise.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2370)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to map these two identities</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2342)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=2343)</span></code></p> <p>The subject of the session and the provided subject are the same</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.removeMapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">removeMapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.removeMapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Removes a previously asserted identity mapping from the Subject in the Session to the Subject given by the parameter. The reciprocol mapping entry is also removed.</p> <p>A successful request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/map/{subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier to be used for equivalentIdentity. This Subject will not match the Subject named in the certificate. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the map was successfully created, false otherwise.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2370)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to map these two identities</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system, or the mapping between the subjects has no yet been initiated.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.requestMapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">requestMapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.requestMapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Request a new mapping between the authenticated identity in the session and the given identity, asserting that they represent the same subject.</p> <p>Mapping identities is a two-step process wherein a map request is made by a primary Subject and a subsequent (confirmation) map request is made by the secondary Subject. This ensures that mappings are performed only by those that have authority to do so.</p> <p>Successful completion of the request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/accounts/pendingmap</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier to be used for equivalentIdentity. This Subject will not match the Subject named in the certificate. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the mapping was successfully initiated, false otherwise.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2370)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to map these two identities</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2342)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=2343)</span></code></p> <p>The subject of the session and the provided subject are the same</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.confirmMapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">confirmMapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.confirmMapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Confirms a previously initiated identity mapping. If subject A asserts that B is the same identity through <a class="reference internal" href="#CNIdentity.requestMapIdentity" title="CNIdentity.requestMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.requestMapIdentity()</span></code></a>, then this method is called by B to confirm that assertion.</p> <p>A successful request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier to be used for equivalentIdentity. This Subject will not match the Subject named in the certificate. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the map was successfully created, false otherwise.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2370)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to map these two identities</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system, or the mapping between the subjects has no yet been initiated.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.getPendingMapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">getPendingMapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → SubjectInfo<a class="headerlink" href="#CNIdentity.getPendingMapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Gets the SubjectInfo of a previously initiated identity mapping.</p> <p>A successful request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier to be used for equivalentIdentity. This Subject will not match the Subject named in the certificate. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The SubjectInfo</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.SubjectInfo" title="Types.SubjectInfo"><code class="xref py py-class docutils literal"><span class="pre">Types.SubjectInfo</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to get the SubjectInfo</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system, or the mapping between the subjects has no yet been initiated.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4961)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.denyMapIdentity"> <code class="descclassname">CNIdentity.</code><code class="descname">denyMapIdentity</code><span class="sig-paren">(</span><em>session</em>, <em>subject</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.denyMapIdentity" title="Permalink to this definition">¶</a></dt> <dd><p>Denies a previously initiated identity mapping. If subject A asserts that B is the same identity through <a class="reference internal" href="#CNIdentity.requestMapIdentity" title="CNIdentity.requestMapIdentity"><code class="xref py py-func docutils literal"><span class="pre">CNIdentity.requestMapIdentity()</span></code></a>, then this method is called by B to deny that assertion.</p> <p>A successful request is indicated by returning a HTTP status of 200.</p> <p>A failed request MUST be indicated by returning an appropriate exception and setting the response HTTP status accordingly.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">DELETE</span> <span class="pre">/accounts/pendingmap/{subject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>subject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The Subject identifier to be used for equivalentIdentity. This Subject will not match the Subject named in the certificate. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the map was successfully created, false otherwise.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2390)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2370)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2360)</span></code></p> <p>The supplied principal does not have permission to map these two identities</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2340)</span></code></p> <p>The specified principal does not exist in the DataONE system, or the mapping between the subjects has no yet been initiated.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2361)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.createGroup"> <code class="descclassname">CNIdentity.</code><code class="descname">createGroup</code><span class="sig-paren">(</span><em>session</em>, <em>group</em><span class="sig-paren">)</span> → Subject<a class="headerlink" href="#CNIdentity.createGroup" title="Permalink to this definition">¶</a></dt> <dd><p>Create a group with the given name.</p> <p>Groups are lists of subjects that allow all members of the group to be referenced by listing solely the subject name of the group. Group names must be unique within the DataONE system. Groups can only be modified by Subjects listed as rightsHolders.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/groups</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>group</strong> (<a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">Types.Group</span></code></a>) – The Group to be created. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The Subject of the group that was created.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2490)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2470)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2460)</span></code></p> <p>The supplied principal does not have permission to create a group</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2461)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=2400)</span></code></p> <p>A group by this name already exists</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNIdentity.updateGroup"> <code class="descclassname">CNIdentity.</code><code class="descname">updateGroup</code><span class="sig-paren">(</span><em>session</em>, <em>group</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNIdentity.updateGroup" title="Permalink to this definition">¶</a></dt> <dd><p>Add members to the named group.</p> <p>Group members can be modified only by the original creator of the group, otherwise a NotAuthorized exception is thrown. Group members are provided as a list of subjects that replace the group membership.</p> <p>Successful completion of this operation is indicated by a HTTP response status code of 200.</p> <p>Unsuccessful completion of this operation MUST be indicated by returning an appropriate exception.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/groups</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session is used to determine if the request is being made by the creator of the group. Transmitted as part of the SSL handshake process.</li> <li><strong>group</strong> (<a class="reference internal" href="Types.html#Types.Group" title="Types.Group"><code class="xref py py-class docutils literal"><span class="pre">Types.Group</span></code></a>) – The new Group object that will replace the old Group. The Group.Subject must match the groupName and an update cannot modify this value. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the group that was modified successfully, false otherwise</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=2590)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2570)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=2560)</span></code></p> <p>The supplied principal does not have permission to add to a group</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=2540)</span></code></p> <p>The specified group does not exist in the DataONE system</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=2561)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=2542)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> <div class="section" id="module-CNReplication"> <span id="replication-api"></span><h2>Replication API<a class="headerlink" href="#module-CNReplication" title="Permalink to this headline">¶</a></h2> <p>The Data Replication API operates in conjunction with the <a class="reference internal" href="MN_APIs.html#module-MNReplication" title="MNReplication: Handles CN directed replication of content between Member Nodes."><code class="xref py py-mod docutils literal"><span class="pre">MNReplication</span></code></a> API to assist with the replication of data and science metadata content between Member Nodes to ensure that copies of data and metadata can be retrieved from more than one Member Node where possible.</p> <table border="1" class="docutils" id="id8"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNReplication" title="CNReplication: Supports operations for replication of content between Member Nodes."><code class="xref py py-mod docutils literal"><span class="pre">CNReplication</span></code></a></span><a class="headerlink" href="#id8" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaNotifications/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.setReplicationStatus" title="CNReplication.setReplicationStatus"><code class="xref py py-func docutils literal"><span class="pre">setReplicationStatus()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeRef</span></code></a>, <a class="reference internal" href="Types.html#Types.ReplicationStatus" title="Types.ReplicationStatus"><code class="xref py py-class docutils literal"><span class="pre">status</span></code></a>, <code class="xref py py-class docutils literal"><span class="pre">failure</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaMetadata/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.updateReplicationMetadata" title="CNReplication.updateReplicationMetadata"><code class="xref py py-func docutils literal"><span class="pre">updateReplicationMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.Replica" title="Types.Replica"><code class="xref py py-class docutils literal"><span class="pre">replicaMetadata</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td>Tier 4</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaPolicies/{id}</span></code></td> <td><a class="reference internal" href="#CNReplication.setReplicationPolicy" title="CNReplication.setReplicationPolicy"><code class="xref py py-func docutils literal"><span class="pre">setReplicationPolicy()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">id</span></code></a>, <a class="reference internal" href="Types.html#Types.ReplicationPolicy" title="Types.ReplicationPolicy"><code class="xref py py-class docutils literal"><span class="pre">policy</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 4</td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/replicaAuthorizations/{pid}?targetNodeSubject={targetNodeSubject}</span></code></td> <td><a class="reference internal" href="#CNReplication.isNodeAuthorized" title="CNReplication.isNodeAuthorized"><code class="xref py py-func docutils literal"><span class="pre">isNodeAuthorized()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">targetNodeSubject</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-even"><td> </td> <td>1.0, (2.0)</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/removeReplicaMetadata/{pid}</span></code></td> <td><a class="reference internal" href="#CNReplication.deleteReplicationMetadata" title="CNReplication.deleteReplicationMetadata"><code class="xref py py-func docutils literal"><span class="pre">deleteReplicationMetadata()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">pid</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeId</span></code></a>, <code class="docutils literal"><span class="pre">serialVersion</span></code>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> </tbody> </table> <dl class="function"> <dt id="CNReplication.setReplicationStatus"> <code class="descclassname">CNReplication.</code><code class="descname">setReplicationStatus</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>nodeRef</em>, <em>status</em>, <em>failure</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNReplication.setReplicationStatus" title="Permalink to this definition">¶</a></dt> <dd><p>Update the replication status of the system metadata, ensuring that the change is appropriate for the given state of system metadata. For example, a MN can not change the status to <em>COMPLETED</em> unless the CN previously requested replication of the object and the replications status of the object (as indicated in the system metadata) is set to <em>QUEUED</em>.</p> <p>Successful completion of this operation is indicated by a HTTP response status code of 200.</p> <p>Unsuccessful completion of this operation MUST be indicated by returning an appropriate exception.</p> <p>The nodeRef, status, and failure parameters are transmitted as part of the HTTP request body encoded as a MIME Multipart/form-data encoded payload.</p> <p>This method can be only called by Coordinating Nodes and trusted Member Nodes.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">Use Cases:</th><td class="field-body"><p class="first"><a class="reference internal" href="../design/UseCases/09_uc.html"><span class="doc">UC09</span></a></p> </td> </tr> <tr class="field-odd field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaNotifications/{pid}</span></code></p> </td> </tr> <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the public user if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Identifier of the object to be replicated between Member Nodes. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>nodeRef</strong> (<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a>) – Reference to the Node which made the setReplicationStatus call. If this is a Member Node, the checksum must be compared with that of the authoritative Member Node. If not, this step can be ignored as the call is not signifying a replication is complete. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>status</strong> (<a class="reference internal" href="Types.html#Types.ReplicationStatus" title="Types.ReplicationStatus"><code class="xref py py-class docutils literal"><span class="pre">Types.ReplicationStatus</span></code></a>) – Replication status. See system metadata schema for possible values. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>failure</strong> (<code class="xref py py-class docutils literal"><span class="pre">Types.BaseException</span></code>) – A BaseException object or one of it’s subclasses, or null. If the status is set to ‘failed’, this exception object can provide more detail. Appropriate sub-classes include InsufficientResource, NotAuthorized, ServiceFailure, etc. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the operation is allowed and expected, otherwise an exception should be raised.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4700)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4701)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4710)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4720)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4730)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4740)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNReplication.updateReplicationMetadata"> <code class="descclassname">CNReplication.</code><code class="descname">updateReplicationMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>replicaMetadata</em>, <em>serialVersion</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNReplication.updateReplicationMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Replaces the replica with matching nodeRef in the system metadata of the specified object. Adds a new replica if the nodeRef of passed in Replica is not already present. Changes the date sys meta modified.</p> <p>Successful completion of the operation is indicated by returning a HTTP status of 200.</p> <p>Failure of the operation MUST be indicated by returning an appropriate exception.</p> <p>This method can be only called by Coordinating Nodes.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaMetadata/{pid}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>replicaMetadata</strong> (<a class="reference internal" href="Types.html#Types.Replica" title="Types.Replica"><code class="xref py py-class docutils literal"><span class="pre">Types.Replica</span></code></a>) – Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The serialVersion of the system metadata that is the intended target for the change. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True on success</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4850)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4851)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4852)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4853)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4854)</span></code></p> <p>The specified pid does not exist</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4855)</span></code></p> <p>The serialVersion supplied with the request does not match the serialVersion of the target</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4856)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNReplication.setReplicationPolicy"> <code class="descclassname">CNReplication.</code><code class="descname">setReplicationPolicy</code><span class="sig-paren">(</span><em>session</em>, <em>id</em>, <em>policy</em>, <em>serialVersion</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNReplication.setReplicationPolicy" title="Permalink to this definition">¶</a></dt> <dd><p>Updates the replication policy entry for an object by updating the system metadata.</p> <p>Successful completion of the operation is indicated by returning a HTTP status of 200.</p> <p>Failure of the operation MUST be indicated by returning an appropriate exception.</p> <p>v2.0: The identifier may be a <a class="reference internal" href="../glossary.html#term-29"><span class="xref std std-term">PID</span></a> or <a class="reference internal" href="../glossary.html#term-sid"><span class="xref std std-term">SID</span></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/replicaPolicies/{id}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>id</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the policy being updated. May be either a PID or a SID, the latter acting only on the HEAD PID. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>policy</strong> (<a class="reference internal" href="Types.html#Types.ReplicationPolicy" title="Types.ReplicationPolicy"><code class="xref py py-class docutils literal"><span class="pre">Types.ReplicationPolicy</span></code></a>) – Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The serialVersion of the system metadata that is the intended target for the change. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True on success</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4880)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4881)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4882)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4883)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4884)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4885)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4886)</span></code></p> <p>The serialVersion supplied with the request does not match the serialVersion of the target</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNReplication.isNodeAuthorized"> <code class="descclassname">CNReplication.</code><code class="descname">isNodeAuthorized</code><span class="sig-paren">(</span><em>session</em>, <em>targetNodeSubject</em>, <em>pid</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNReplication.isNodeAuthorized" title="Permalink to this definition">¶</a></dt> <dd><p>Verifies that a replication event was initiated by a CN by comparing the target node’s identifiying subject with a known list of scheduled replication tasks.</p> <p>Successful completion of the operation is indicated by returning a HTTP status of 200.</p> <p>Failure of the operation MUST be indicated by returning an appropriate exception.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/replicaAuthorizations/{pid}?targetNodeSubject={targetNodeSubject}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>targetNodeSubject</strong> (<a class="reference internal" href="Types.html#Types.Subject" title="Types.Subject"><code class="xref py py-class docutils literal"><span class="pre">Types.Subject</span></code></a>) – The subject that identifies the target node, with a value extracted from the X.509 certificate passed in during the call to MNReplication.replicate(). Transmitted as a URL query parameter, and so must be escaped accordingly.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the object to be replicated. Transmitted as part of the URL path and must be escaped accordingly.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True on success</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4870)</span></code></p> <p>The method functionality is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4871)</span></code></p> <p>Replication of PID is not authorized for the subject listed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4872)</span></code></p> <p>An internal server error occurred.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4873)</span></code></p> <p>The replication request is invalid.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4874)</span></code></p> <p>The PID does not exist as an existing object.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4875)</span></code></p> <p>The session information is invalid.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNReplication.deleteReplicationMetadata"> <code class="descclassname">CNReplication.</code><code class="descname">deleteReplicationMetadata</code><span class="sig-paren">(</span><em>session</em>, <em>pid</em>, <em>nodeId</em>, <em>serialVersion</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNReplication.deleteReplicationMetadata" title="Permalink to this definition">¶</a></dt> <dd><p>Removes the replication information for the specified node from the object system metadata identified by <em>pid</em>.</p> <p>Removal of replication metadata is necessary if the Member Node goes offline permanently or for an extended period, or when it is deeemed prudent to migrate an object from one node to another to address resource management issues.</p> <p>This method can be only called by Coordinating Nodes.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, (2.0)</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/removeReplicaMetadata/{pid}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session MUST be a Coordinating Node. Transmitted as part of the SSL handshake process.</li> <li><strong>pid</strong> (<a class="reference internal" href="Types.html#Types.Identifier" title="Types.Identifier"><code class="xref py py-class docutils literal"><span class="pre">Types.Identifier</span></code></a>) – The identifier of the object whose replication metadata is being modified. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>nodeId</strong> (<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a>) – The identifier of the node replication information that is being removed from the system metadata record. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> <li><strong>serialVersion</strong> (<em>unsigned long</em>) – The <a class="reference internal" href="Types.html#Types.SystemMetadata.serialVersion" title="Types.SystemMetadata.serialVersion"><code class="xref py py-attr docutils literal"><span class="pre">Types.SystemMetadata.serialVersion</span></code></a> of the system metadata being updated. This MUST match the latest version of system metadata available for the object on the Coordinating Node. Transmitted as a UTF-8 String as a <em>Param part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if the replication metadata was successfully deleted.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4950)</span></code></p> <p>The method functionality if not fully implemented</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4951)</span></code></p> <p>An internal server error occurred that prevented the operation from completing.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4952)</span></code></p> <p>The request parameters are malformed</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4953)</span></code></p> <p>The supplied session is invalid</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4956)</span></code></p> <p>The object identified by <em>pid</em> or the node reference specified by <em>nodeId</em> could not be located in the system metadata for the object.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4954)</span></code></p> <p>The subject identified by the <em>session</em> information does not have appropriate priviledges for modifiying the content or accessing the service.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.VersionMismatch" title="Exceptions.VersionMismatch"><strong>Exceptions.VersionMismatch</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4955)</span></code></p> <p>The <em>serialVersion</em> does not match the current <a class="reference internal" href="Types.html#Types.SystemMetadata.serialVersion" title="Types.SystemMetadata.serialVersion"><code class="xref py py-attr docutils literal"><span class="pre">Types.SystemMetadata.serialVersion</span></code></a> value of the object system metadata.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <blockquote> <div><p>This old stuff is commented out but kept here for revisiting later .. function:: getDefaultReplicationPolicy (sess)</p> <dl class="function"> <dt id="CNReplication.getMNReplicateList"> <code class="descclassname">CNReplication.</code><code class="descname">getMNReplicateList</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#CNReplication.getMNReplicateList" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="function"> <dt id="CNReplication.getReplicationPolicy"> <code class="descclassname">CNReplication.</code><code class="descname">getReplicationPolicy</code><span class="sig-paren">(</span><em>sess</em>, <em>ID</em><span class="sig-paren">)</span><a class="headerlink" href="#CNReplication.getReplicationPolicy" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="function"> <dt id="CNReplication.isReplicationNeeded"> <code class="descclassname">CNReplication.</code><code class="descname">isReplicationNeeded</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#CNReplication.isReplicationNeeded" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="function"> <dt id="CNReplication.replicateMetadata"> <code class="descclassname">CNReplication.</code><code class="descname">replicateMetadata</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#CNReplication.replicateMetadata" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="function"> <dt id="CNReplication.setDefaultReplicationPolicy"> <code class="descclassname">CNReplication.</code><code class="descname">setDefaultReplicationPolicy</code><span class="sig-paren">(</span><em>sess</em>, <em>policy</em><span class="sig-paren">)</span><a class="headerlink" href="#CNReplication.setDefaultReplicationPolicy" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="function"> <dt> <code class="descclassname">CNReplication.</code><code class="descname">setReplicationPolicy</code><span class="sig-paren">(</span><em>sess</em>, <em>policy</em>, <em>ID</em><span class="sig-paren">)</span></dt> <dd></dd></dl> </div></blockquote> </div> <div class="section" id="module-CNRegister"> <span id="register-api"></span><h2>Register API<a class="headerlink" href="#module-CNRegister" title="Permalink to this headline">¶</a></h2> <p>The register API methods are used to maintain a registry of nodes participating in the DataONE infrastructure.</p> <p>Note that the node registry is much the same as the Object collection with a restriction on the returned object formats to be Member Nodes or Coordinating Nodes. It may be prudent for the implementation of the registration API to leverage the existing functionality of the object collection rather than implementing a parallel data store. In this case, the “science metadata” could be a DC description of the node, and the “data” might be the detailed registration information including node capabilities, scheduling and so forth.</p> <table border="1" class="docutils" id="id9"> <caption><span class="caption-text">Functions defined in <a class="reference internal" href="#module-CNRegister" title="CNRegister: Register nodes and their capabilities, retrieve node list"><code class="xref py py-mod docutils literal"><span class="pre">CNRegister</span></code></a></span><a class="headerlink" href="#id9" title="Permalink to this table">¶</a></caption> <colgroup> <col width="5%" /> <col width="5%" /> <col width="18%" /> <col width="18%" /> <col width="54%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Tier</th> <th class="head">Version</th> <th class="head">REST</th> <th class="head">Function</th> <th class="head">Parameters</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/node/{nodeid}</span></code></td> <td><a class="reference internal" href="#CNRegister.updateNodeCapabilities" title="CNRegister.updateNodeCapabilities"><code class="xref py py-func docutils literal"><span class="pre">updateNodeCapabilities()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeid</span></code></a>, <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">node</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> boolean</td> </tr> <tr class="row-odd"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node/{nodeid}</span></code></td> <td><a class="reference internal" href="#CNRegister.getNodeCapabilities" title="CNRegister.getNodeCapabilities"><code class="xref py py-func docutils literal"><span class="pre">getNodeCapabilities()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">nodeid</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></td> </tr> <tr class="row-even"><td>Tier 2</td> <td>1.0, 2.0</td> <td><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/node</span></code></td> <td><a class="reference internal" href="../notes/MN_api_notes_comments.html#register" title="register"><code class="xref py py-func docutils literal"><span class="pre">register()</span></code></a></td> <td>(<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">session</span></code></a>, <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">node</span></code></a>) <code class="docutils literal"><span class="pre">-></span></code> <a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a></td> </tr> </tbody> </table> <dl class="function"> <dt id="CNRegister.updateNodeCapabilities"> <code class="descclassname">CNRegister.</code><code class="descname">updateNodeCapabilities</code><span class="sig-paren">(</span><em>session</em>, <em>nodeid</em>, <em>node</em><span class="sig-paren">)</span> → boolean<a class="headerlink" href="#CNRegister.updateNodeCapabilities" title="Permalink to this definition">¶</a></dt> <dd><p>For updating the capabilities of the specified node. Most information is replaced by information in the new node, however, the node identifier, nodeType, ping, syncrhonization.lastHarvested, and synchronization.lastCompleteHarvest are preserved from the existing entry. Services in the old record not included in the new Node will be removed.</p> <p>Successful completion of this operation is indicated by a HTTP response status code of 200.</p> <p>Unsuccessful completion of this operation MUST be indicated by returning an appropriate exception.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Node" title="v2_0.Types.Node"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Node</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">PUT</span> <span class="pre">/node/{nodeid}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>nodeid</strong> (<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a>) – The identifier of the existing node entry being updated. Transmitted as part of the URL path and must be escaped accordingly.</li> <li><strong>node</strong> (<a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a>) – An instance of :class`Types.Node` that contains the updated information. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if operation is successful</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4820)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4821)</span></code></p> <p>The <a class="reference internal" href="../glossary.html#term-74"><span class="xref std std-term">Subject</span></a> does not have authority to modify the node registration information.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4822)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4823)</span></code></p> <p>The request was malformed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4824)</span></code></p> <p>The requested nodeid is not available in the registry.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4825)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRegister.getNodeCapabilities"> <code class="descclassname">CNRegister.</code><code class="descname">getNodeCapabilities</code><span class="sig-paren">(</span><em>nodeid</em><span class="sig-paren">)</span> → Node<a class="headerlink" href="#CNRegister.getNodeCapabilities" title="Permalink to this definition">¶</a></dt> <dd><p>For retrieving the capabilities of the specified node if it is registered on the Coordinating Node being called.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Node" title="v2_0.Types.Node"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Node</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">/node/{nodeid}</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>nodeid</strong> (<a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a>) – The identifier of the existing node entry being looked up. Transmitted as part of the URL path and must be escaped accordingly.</p> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">An instance of :class`Types.Node` that contains the Node information.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4826)</span></code></p> <p>The service is not implemented.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4827)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4828)</span></code></p> <p>The request was malformed.</p> </li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotFound" title="Exceptions.NotFound"><strong>Exceptions.NotFound</strong></a> – <p><code class="docutils literal"><span class="pre">(errorCode=404,</span> <span class="pre">detailCode=4829)</span></code></p> <p>The requested nodeid is not available in the registry.</p> </li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="CNRegister.register"> <code class="descclassname">CNRegister.</code><code class="descname">register</code><span class="sig-paren">(</span><em>session</em>, <em>node</em><span class="sig-paren">)</span> → NodeReference<a class="headerlink" href="#CNRegister.register" title="Permalink to this definition">¶</a></dt> <dd><p>Register a new node in the system. If the node already exists, then a <code class="xref py py-exc docutils literal"><span class="pre">IdentifierNotUnique</span></code> exception MUST be returned.</p> <p>v2.0: The structure of <a class="reference internal" href="Types2.html#v2_0.Types.Node" title="v2_0.Types.Node"><code class="xref py py-class docutils literal"><span class="pre">v2_0.Types.Node</span></code></a> has changed.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Version:</th><td class="field-body"><p class="first">1.0, 2.0</p> </td> </tr> <tr class="field-even field"><th class="field-name">REST URL:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">POST</span> <span class="pre">/node</span></code></p> </td> </tr> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>session</strong> (<a class="reference internal" href="Types.html#Types.Session" title="Types.Session"><code class="xref py py-class docutils literal"><span class="pre">Types.Session</span></code></a>) – Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the <a class="reference internal" href="../glossary.html#term-54"><span class="xref std std-term">public user</span></a> if the certificate was not provided with the request. Transmitted as part of the SSL handshake process.</li> <li><strong>node</strong> (<a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a>) – An instance of <a class="reference internal" href="Types.html#Types.Node" title="Types.Node"><code class="xref py py-class docutils literal"><span class="pre">Types.Node</span></code></a> that fully describes the node being registered. Note that some attributes will be set by the Coordinating Node. Transmitted as an UTF-8 encoded XML structure for the respective type as defined in the DataONE types schema, as a <em>File part</em> of the MIME multipart/mixed message.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The identifier of the new node entry if successful, otherwise an error is raised.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="Types.html#Types.NodeReference" title="Types.NodeReference"><code class="xref py py-class docutils literal"><span class="pre">Types.NodeReference</span></code></a></p> </td> </tr> <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first last simple"> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotImplemented" title="Exceptions.NotImplemented"><strong>Exceptions.NotImplemented</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=501,</span> <span class="pre">detailCode=4840)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.NotAuthorized" title="Exceptions.NotAuthorized"><strong>Exceptions.NotAuthorized</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4841)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.ServiceFailure" title="Exceptions.ServiceFailure"><strong>Exceptions.ServiceFailure</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=500,</span> <span class="pre">detailCode=4842)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidRequest" title="Exceptions.InvalidRequest"><strong>Exceptions.InvalidRequest</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=400,</span> <span class="pre">detailCode=4843)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.IdentifierNotUnique" title="Exceptions.IdentifierNotUnique"><strong>Exceptions.IdentifierNotUnique</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=409,</span> <span class="pre">detailCode=4844)</span></code></li> <li><a class="reference internal" href="Exceptions.html#Exceptions.InvalidToken" title="Exceptions.InvalidToken"><strong>Exceptions.InvalidToken</strong></a> – <code class="docutils literal"><span class="pre">(errorCode=401,</span> <span class="pre">detailCode=4845)</span></code></li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="http://dataone.org"> <img class="logo" src="../_static/dataone_logo.png" alt="Logo"/> </a></p> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Coordinating Node APIs</a><ul> <li><a class="reference internal" href="#module-CNDiagnostic">Diagnostic API</a></li> <li><a class="reference internal" href="#module-CNCore">Core API</a></li> <li><a class="reference internal" href="#module-CNRead">Read API</a></li> <li><a class="reference internal" href="#module-CNView">View API</a></li> <li><a class="reference internal" href="#module-CNAuthorization">Authorization API</a></li> <li><a class="reference internal" href="#module-CNIdentity">Identity API</a></li> <li><a class="reference internal" href="#module-CNReplication">Replication API</a></li> <li><a class="reference internal" href="#module-CNRegister">Register API</a></li> </ul> </li> </ul> <h3>Related Topics</h3> <ul> <li><a href="../index.html">Documentation Overview</a><ul> <li><a href="index.html">DataONE APIs</a><ul> <li>Previous: <a href="MN_APIs.html" title="previous chapter">Member Node APIs</a></li> <li>Next: <a href="ITK_APIs.html" title="next chapter">Investigator Toolkit APIs</a></li> </ul></li> </ul></li> </ul> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer"> <div id="copyright"> © Copyright <a href="http://www.dataone.org">2009-2017, DataONE</a>. [ <a href="../_sources/apis/CN_APIs.txt" rel="nofollow">Page Source</a> | <a href='https://redmine.dataone.org/projects/d1/repository/changes/documents/Projects/cicore/architecture/api-documentation/source/apis/CN_APIs.txt' rel="nofollow">Revision History</a> ] </div> <div id="acknowledgement"> <p>This material is based upon work supported by the National Science Foundation under Grant Numbers <a href="http://www.nsf.gov/awardsearch/showAward?AWD_ID=0830944">083094</a> and <a href="http://www.nsf.gov/awardsearch/showAward?AWD_ID=1430508">1430508</a>.</p> <p>Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.</p> </div> </div> <!-- <hr /> <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...</div> <link rel="stylesheet" type="text/css" href="_static/skin.css" /> <script type="text/javascript" language="javascript" id="hcb"> /*<! -*/ (function() {s=document.createElement("script"); s.setAttribute("type","text/javascript"); s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((typeof hcb_user !== "undefined" && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&mod=%241%24wq1rdBcg%24Gg8J5iYSHJWwAJtlYu/yU."+"&opts=21407&num=10"); if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /* ->*/ </script> --> </body> </html>