Subversion Repositories oidinfo_new_design

Compare Revisions

Regard whitespace Rev 1 → Rev 2

/trunk/getting-an-oid-in-xml.raw.htm
0,0 → 1,233
<div id="global_content">
 
<table cellspacing="0" cellpadding="0" border="0" width="100%">
 
<tr>
 
<td height="20" colspan="3" valign="top" width="100%">&nbsp;</td>
 
</tr>
 
<tr>
<td height="40" valign="top" width="440">
<p>
<span class="page_title">Getting an OID description in XML or JSON format</span>
</p>
</td>
<td height="40" valign="top" width="20">&nbsp;</td>
<td width="150" height="40" valign="middle">
<img src="images/bullet.gif" width="10" height="8" border="0"><a href="/cgi-bin/manage?a=ca">Request a registrant account</a>
</td>
</tr>
 
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="10"></td>
<td>
 
<p>
To get the description of an OID in XML or JSON format, use the following
URL (as a <code>GET</code> or <code>POST</code> <a href="http://www.w3schools.com/TAGs/ref_httpmethods.asp">HTTP
request method</a>):
</p>
<div align="center">
<table width="75%" border="1">
<tr>
<td align="center">
<div align="center"><font class="color_orange">XML</font> </div>
</td>
</tr>
<tr>
<td>
<div align="center">
<code><strong>http://oid-info.com/cgi-bin/display?a=<font class="color_orange">get-xml</font><br>&l=</strong><em>your_email_address</em><strong>&p=</strong><em>your_password</em><br><strong>&oid=</strong><em>OID_in_whichever_notation</em></code>
</div>
</td>
</tr>
<tr>
<td align="center">
<div align="center"><font class="color_orange">JSON</font> </div>
</td>
</tr>
<tr>
<td>
<div align="center">
<code><strong>http://oid-info.com/cgi-bin/display?a=<font class="color_orange">get-json</font><br>&l=</strong><em>your_email_address</em><strong>&p=</strong><em>your_password</em><br><strong>&oid=</strong><em>OID_in_whichever_notation</em></code>
</div>
</td>
</tr>
</table><br></div>
<p>
<b>Important note</b>: This feature is only available if a <a href="registrant-account-charter.htm">registrant
account</a> has been assigned to you by the webmaster.
</p>
<p>
When using this feature, you agree to conform to the <a href="disclaimer.htm">terms
of use</a> of this web site. In particular, you understand that downloading,
printing or copying from this web site must be for noncommercial use
only, and must be limited to a small part of the data. Moreover, you
endeavour to inform users of your application that data are coming from
<a href="http://oid-info.com">OID-info.com</a> by hyperlinking to <a href="http://oid-info.com">http://oid-info.com</a>.
</p>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="10"></td>
<td>
<p>
If there is no error, the returned result is a piece of XML (resp.
JSON) which looks like the following examples.
</p>
<p>
The generated XML mostly conforms to the <a href="http://oid-info.com/oid.xsd">XML
Schema for the OID repository</a>. One difference is that the <code><strong>&lt;value&gt;</strong></code>
tag is separated in three tags: <code><strong>&lt;asn1-notation&gt;</strong></code>,
<code><strong>&lt;dot-notation&gt;</strong></code> and <code><strong>&lt;iri-notation&gt;</strong></code>.
Another main difference is that the <code><strong>&lt;oid&gt;</strong></code>
tag can have two optional attributes:
</p>
<ul>
<li>
<code><strong>category</strong></code> which, when present, takes
one or multiple ("<code>;</code>"-separated) values among &quot;<a href="faq.htm#26"><code>Leaf
OID</code></a>&quot;, &quot;<a href="faq.htm#26"><code>Frozen OID</code></a>&quot;,
&quot;<code>Not allocating identifiers</code>&quot; and &quot;<code>Not
allocating Unicode labels</code>&quot;;
</li>
<li>
<code><strong>standardized</strong></code> which, when present,
takes value "<code>true</code>" and indicates that the last <a href="name-forms.htm">identifier</a>
in the <strong><code>&lt;value&gt;</code></strong> can be used alone
without its associated number;
</li>
<li>
<code>last-modification</code> is the date (YYYY-MM-DD) when the
OID description was last modified in the OID repository.
</li>
</ul>
<p>
In JSON, keys <code>&quot;category&quot;</code>, <code>&quot;identifier&quot;</code>,
<code>&quot;unicode-label&quot;</code>, <code>&quot;long-arc&quot;</code>
are tables (hence between square brackets).
</p>
<table width="100%" border="1">
<tr>
<td align="center">
<font class="color_orange">XML</font>
</td>
</tr>
<tr>
<td>
<p>
<code><strong>&lt;oid category=&quot;</strong>Leaf OID&quot;<strong>&gt;<br>&nbsp;&nbsp;&lt;asn1_notation&gt;</strong>{joint-iso-itu-t(2)
example(999) xml-submission(777)}<strong>&lt;/asn1_notation&gt;<br>&nbsp;&nbsp;&lt;dot-notation&gt;</strong>2.999.777<strong>&lt;/dot-notation&gt;<br>&nbsp;&nbsp;&lt;iri-notation&gt;</strong>/Joint-ISO-ITU-T/Example/XML_submission<strong>&lt;/iri-notation&gt;<br>&nbsp;&nbsp;&lt;identifier&gt;</strong>xml-submission<strong>&lt;/identifier&gt;<br>&nbsp;&nbsp;</strong><strong>&lt;identifier&gt;</strong>xml-document<strong>&lt;/identifier&gt;<br>&nbsp;&nbsp;&lt;unicode-label&gt;</strong>XML_submission<strong>&lt;/unicode-label&gt;<br>&nbsp;&nbsp;&lt;description&gt;</strong>Example of a description
conforming to the &lt;a href="http://oid-info.com/oid.xsd"&gt;XML
Schema of the OID repository&lt;/a&gt;.<strong>&lt;/description&gt;<br>&nbsp;&nbsp;&lt;information&gt;</strong>More information can be
found at &lt;a href="http://oid-info.com/submit.htm"&gt;Submit
OID descriptions as XML files&lt;/a&gt;.<strong>&lt;/information&gt;<br>&nbsp;&nbsp;&lt;current-registrant&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;</strong><strong>&lt;first-name&gt;</strong>John<strong>&lt;/first-name&gt;<br>&nbsp;&nbsp;&nbsp; &lt;last-name&gt;</strong>Doe<strong>&lt;/last-name&gt;<br>&nbsp;&nbsp;&nbsp; &lt;email&gt;</strong>john.doe@dummy.com<strong>&lt;/email&gt;<br>&nbsp;&nbsp;&nbsp; &lt;modification-date&gt;</strong>2002-05-25<strong>&lt;/modification-date&gt;<br>&nbsp; &lt;/current-registrant&gt;<br>&nbsp; &lt;first-registrant privacy=&quot;</strong>true<strong>&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;first-name&gt;</strong>Paul<strong>&lt;/first-name&gt;<br>&nbsp;&nbsp;&nbsp; &lt;last-name&gt;</strong>Connor<strong>&lt;/last-name&gt;<br>&nbsp;&nbsp;&nbsp; &lt;email&gt;</strong>paul.connor@myhost.com<strong>&lt;/email&gt;<br>&nbsp;&nbsp;&nbsp; &lt;creation-date&gt;</strong>1999-12-31<strong>&lt;/creation-date&gt;<br>&nbsp; &lt;/first-registrant&gt;<br>&nbsp;&nbsp;&lt;last-modification&gt;</strong>2017-05-23<strong>&lt;/last-modification&gt;<br>&lt;/oid&gt;</strong></code>
</p>
</td>
</tr>
<tr>
<td align="center">
<font class="color_orange">JSON</font>
</td>
</tr>
<tr>
<tr>
<td>
<p>
<code><strong>{ &quot;oid&quot;: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;category&quot;: [</strong>&quot;Leaf
OID&quot;<strong>]</strong>,<br><strong>&nbsp;&nbsp;&nbsp;&nbsp;&quot;asn1-notation&quot;</strong>:
&quot;{joint-iso-itu-t(2) example(999) xml-submission(777)}<strong>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;dot-notation&quot;</strong>: &quot;2.999.777<strong>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;iri-notation&quot;</strong>: &quot;/Joint-ISO-ITU-T/Example/XML_submission<strong>&quot;,<br></strong><strong>&nbsp;&nbsp;&nbsp;&nbsp;&quot;identifier&quot;:
[</strong>&quot;xml-submission&quot;, &quot;xml-document&quot;<strong>]</strong>,<br><strong>&nbsp;&nbsp;&nbsp;&nbsp;&quot;unicode-label&quot;: [</strong>&quot;XML_submission&quot;<strong>]</strong>,<br><strong>&nbsp;&nbsp;</strong></code><strong><code><strong>&nbsp;&nbsp;</strong>&quot;description&quot;:</code></strong><code>&quot;Example of a description conforming to the &lt;a href=\"http://oid-info.com/oid.xsd\"&gt;XML
Schema of the OID repository&lt;/a&gt;.<strong>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;information&quot;:</strong> &quot;More
information can be found at &lt;a href=\"http://oid-info.com/submit.htm\"&gt;Submit
OID descriptions as XML files&lt;/a&gt;.&quot;<strong>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;current-registrant&quot;: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></code><strong><code>&quot;first-name&quot;:</code></strong><code>&quot;John<strong>&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;last-name&quot;:</strong>
&quot;Doe&quot;<strong>,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;email&quot;:</strong> &quot;john.doe@dummy.com&quot;<strong>,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;modification-date&quot;:</strong>
&quot;2002-05-25&quot;<br><strong>&nbsp;&nbsp;&nbsp;&nbsp;}, <br>&nbsp; &nbsp;&nbsp;&quot;first-registrant&quot;: {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;privacy&quot;:</strong> &quot;true&quot;<strong>,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;first-name&quot;:</strong>
&quot;Paul&quot;<strong>,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;last-name&quot;:</strong>
&quot;Connor<strong>&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;email&quot;: &quot;</strong>paul.connor@myhost.com<strong>&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&quot;creation-date&quot;: &quot;</strong>1999-12-31&quot;<strong><br>&nbsp; &nbsp;&nbsp;},<br>&nbsp;&nbsp;&nbsp;&nbsp;&quot;last-modification&quot;:</strong> &quot;2017-05-23&quot;<br>&nbsp;&nbsp;}<br>}</code>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
 
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="10"></td>
<td>
Errors are rendered as follows:<br><br><table width="100%" border="1">
<tr>
<td align="center"> <font class="color_orange">XML</font> </td>
</tr>
<tr>
<td>
<code><strong>&lt;error code=&quot;</strong><em>error_code</em><strong>&quot;&gt;</strong><br>&nbsp;&nbsp;Error message in English<br><strong>&lt;/error&gt;</strong></code>
</td>
</tr>
<tr>
<td align="center"> <font class="color_orange">JSON</font> </td>
</tr>
<tr>
<td>
<code><strong>{ &quot;error&quot;: {<br>&nbsp;&nbsp;&nbsp; &quot;code&quot;:</strong> &quot;<em>error_code</em><strong>&quot;,<br>&nbsp;&nbsp;&nbsp; &quot;message&quot;:</strong> &quot;Error message
in English&quot;<br>&nbsp;&nbsp;<strong>}<br>}</strong></code>
</td>
</tr>
</table>
<br>where <code><em>error_code</em></code> is one of:
<ul>
<li>
&quot;<code>illegal_oid</code>&quot; when the OID given in parameter
<strong><code>oid</code></strong> cannot exist because, e.g., it is
known to be forbidden or one of its ascendant OIDs is a leaf (the
&quot;<code>Error message in English</code>&quot; explains what the
problem is);
</li>
<li>
&quot;<code>maintenance</code>&quot; when the OID repository is
not available because it is under maintenance;
</li>
<li>
&quot;<code>oid_not_validated</code>&quot; when the OID given in
parameter <strong><code>oid</code></strong> is described in the OID
repository but has not yet been validated by the OID administrator,
so its description is not yet publicly available;
</li>
<li>
&quot;<code>runtime_error</code>&quot; when there is an internal
problem (in which case the OID repository admin is automatically notified
by email);
</li>
<li>
&quot;<code>syntax_error</code>&quot; when the OID given in parameter
<strong><code>oid</code></strong> is not syntactiacally correct (the
&quot;<code>Error message in English</code>&quot; explains what the
problem is);
</li>
<li>
&quot;<code>unknown_oid</code>&quot; when the OID given in parameter
<strong><code>oid</code></strong> is not described in the OID repository
(or this parameter is missing);
</li>
<li>
&quot;<code>wrong_login</code>&quot; when parameters <strong><code>login</code></strong>
or <strong><code>password</code></strong> are not correct (the &quot;<code>Error
message in English</code>&quot; explains what the problem is).
</li>
</ul>
Note that the <code><em>error_code</em></code> won't change whereas the
&quot;<code>Error message in English</code>&quot; may evolve, so it is
recommended that, if needed, your application checks the <code><em>error_code</em></code>.
</td>
</tr>
</table>
 
</div>