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%"> </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"> </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><value></strong></code> |
tag is separated in three tags: <code><strong><asn1-notation></strong></code>, |
<code><strong><dot-notation></strong></code> and <code><strong><iri-notation></strong></code>. |
Another main difference is that the <code><strong><oid></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 "<a href="faq.htm#26"><code>Leaf |
OID</code></a>", "<a href="faq.htm#26"><code>Frozen OID</code></a>", |
"<code>Not allocating identifiers</code>" and "<code>Not |
allocating Unicode labels</code>"; |
</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><value></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>"category"</code>, <code>"identifier"</code>, |
<code>"unicode-label"</code>, <code>"long-arc"</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><oid category="</strong>Leaf OID"<strong>><br> <asn1_notation></strong>{joint-iso-itu-t(2) |
example(999) xml-submission(777)}<strong></asn1_notation><br> <dot-notation></strong>2.999.777<strong></dot-notation><br> <iri-notation></strong>/Joint-ISO-ITU-T/Example/XML_submission<strong></iri-notation><br> <identifier></strong>xml-submission<strong></identifier><br> </strong><strong><identifier></strong>xml-document<strong></identifier><br> <unicode-label></strong>XML_submission<strong></unicode-label><br> <description></strong>Example of a description |
conforming to the <a href="http://oid-info.com/oid.xsd">XML |
Schema of the OID repository</a>.<strong></description><br> <information></strong>More information can be |
found at <a href="http://oid-info.com/submit.htm">Submit |
OID descriptions as XML files</a>.<strong></information><br> <current-registrant><br> </strong><strong><first-name></strong>John<strong></first-name><br> <last-name></strong>Doe<strong></last-name><br> <email></strong>john.doe@dummy.com<strong></email><br> <modification-date></strong>2002-05-25<strong></modification-date><br> </current-registrant><br> <first-registrant privacy="</strong>true<strong>"><br> <first-name></strong>Paul<strong></first-name><br> <last-name></strong>Connor<strong></last-name><br> <email></strong>paul.connor@myhost.com<strong></email><br> <creation-date></strong>1999-12-31<strong></creation-date><br> </first-registrant><br> <last-modification></strong>2017-05-23<strong></last-modification><br></oid></strong></code> |
</p> |
</td> |
</tr> |
<tr> |
<td align="center"> |
<font class="color_orange">JSON</font> |
</td> |
</tr> |
<tr> |
<tr> |
<td> |
<p> |
<code><strong>{ "oid": {<br> "category": [</strong>"Leaf |
OID"<strong>]</strong>,<br><strong> "asn1-notation"</strong>: |
"{joint-iso-itu-t(2) example(999) xml-submission(777)}<strong>",<br> "dot-notation"</strong>: "2.999.777<strong>",<br> "iri-notation"</strong>: "/Joint-ISO-ITU-T/Example/XML_submission<strong>",<br></strong><strong> "identifier": |
[</strong>"xml-submission", "xml-document"<strong>]</strong>,<br><strong> "unicode-label": [</strong>"XML_submission"<strong>]</strong>,<br><strong> </strong></code><strong><code><strong> </strong>"description":</code></strong><code>"Example of a description conforming to the <a href=\"http://oid-info.com/oid.xsd\">XML |
Schema of the OID repository</a>.<strong>",<br> "information":</strong> "More |
information can be found at <a href=\"http://oid-info.com/submit.htm\">Submit |
OID descriptions as XML files</a>."<strong>,<br> "current-registrant": {<br> </strong></code><strong><code>"first-name":</code></strong><code>"John<strong>",<br> "last-name":</strong> |
"Doe"<strong>,<br> "email":</strong> "john.doe@dummy.com"<strong>,<br> "modification-date":</strong> |
"2002-05-25"<br><strong> }, <br> "first-registrant": {<br> "privacy":</strong> "true"<strong>,<br> "first-name":</strong> |
"Paul"<strong>,<br> "last-name":</strong> |
"Connor<strong>",<br> "email": "</strong>paul.connor@myhost.com<strong>",<br> "creation-date": "</strong>1999-12-31"<strong><br> },<br> "last-modification":</strong> "2017-05-23"<br> }<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><error code="</strong><em>error_code</em><strong>"></strong><br> Error message in English<br><strong></error></strong></code> |
</td> |
</tr> |
<tr> |
<td align="center"> <font class="color_orange">JSON</font> </td> |
</tr> |
<tr> |
<td> |
<code><strong>{ "error": {<br> "code":</strong> "<em>error_code</em><strong>",<br> "message":</strong> "Error message |
in English"<br> <strong>}<br>}</strong></code> |
</td> |
</tr> |
</table> |
<br>where <code><em>error_code</em></code> is one of: |
<ul> |
<li> |
"<code>illegal_oid</code>" 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 |
"<code>Error message in English</code>" explains what the |
problem is); |
</li> |
<li> |
"<code>maintenance</code>" when the OID repository is |
not available because it is under maintenance; |
</li> |
<li> |
"<code>oid_not_validated</code>" 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> |
"<code>runtime_error</code>" when there is an internal |
problem (in which case the OID repository admin is automatically notified |
by email); |
</li> |
<li> |
"<code>syntax_error</code>" when the OID given in parameter |
<strong><code>oid</code></strong> is not syntactiacally correct (the |
"<code>Error message in English</code>" explains what the |
problem is); |
</li> |
<li> |
"<code>unknown_oid</code>" 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> |
"<code>wrong_login</code>" when parameters <strong><code>login</code></strong> |
or <strong><code>password</code></strong> are not correct (the "<code>Error |
message in English</code>" explains what the problem is). |
</li> |
</ul> |
Note that the <code><em>error_code</em></code> won't change whereas the |
"<code>Error message in English</code>" may evolve, so it is |
recommended that, if needed, your application checks the <code><em>error_code</em></code>. |
</td> |
</tr> |
</table> |
|
</div> |