Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <div id="global_content"> |
2 | |||
3 | <table cellspacing="0" cellpadding="0" border="0" width="100%"> |
||
4 | |||
5 | <tr> |
||
6 | |||
7 | <td height="20" colspan="3" valign="top" width="100%"> </td> |
||
8 | |||
9 | </tr> |
||
10 | |||
11 | <tr> |
||
12 | <td height="40" valign="top" width="440"> |
||
13 | <p> |
||
14 | <span class="page_title">Getting an OID description in XML or JSON format</span> |
||
15 | </p> |
||
16 | </td> |
||
17 | <td height="40" valign="top" width="20"> </td> |
||
18 | <td width="150" height="40" valign="middle"> |
||
19 | <img src="images/bullet.gif" width="10" height="8" border="0"><a href="/cgi-bin/manage?a=ca">Request a registrant account</a> |
||
20 | </td> |
||
21 | </tr> |
||
22 | |||
23 | </table> |
||
24 | <table cellspacing="0" cellpadding="0" border="0" width="100%"> |
||
25 | <tr> |
||
26 | <td width="10"></td> |
||
27 | <td> |
||
28 | |||
29 | <p> |
||
30 | To get the description of an OID in XML or JSON format, use the following |
||
31 | URL (as a <code>GET</code> or <code>POST</code> <a href="http://www.w3schools.com/TAGs/ref_httpmethods.asp">HTTP |
||
32 | request method</a>): |
||
33 | </p> |
||
34 | <div align="center"> |
||
35 | <table width="75%" border="1"> |
||
36 | <tr> |
||
37 | <td align="center"> |
||
38 | <div align="center"><font class="color_orange">XML</font> </div> |
||
39 | </td> |
||
40 | </tr> |
||
41 | <tr> |
||
42 | <td> |
||
43 | <div align="center"> |
||
17 | daniel-mar | 44 | <code><strong>https://oid-rep.orange-labs.fr/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> |
2 | daniel-mar | 45 | </div> |
46 | </td> |
||
47 | </tr> |
||
48 | <tr> |
||
49 | <td align="center"> |
||
50 | <div align="center"><font class="color_orange">JSON</font> </div> |
||
51 | </td> |
||
52 | </tr> |
||
53 | <tr> |
||
54 | <td> |
||
55 | <div align="center"> |
||
17 | daniel-mar | 56 | <code><strong>https://oid-rep.orange-labs.fr/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> |
2 | daniel-mar | 57 | </div> |
58 | </td> |
||
59 | </tr> |
||
60 | </table><br></div> |
||
61 | <p> |
||
62 | <b>Important note</b>: This feature is only available if a <a href="registrant-account-charter.htm">registrant |
||
63 | account</a> has been assigned to you by the webmaster. |
||
64 | </p> |
||
65 | <p> |
||
66 | When using this feature, you agree to conform to the <a href="disclaimer.htm">terms |
||
67 | of use</a> of this web site. In particular, you understand that downloading, |
||
68 | printing or copying from this web site must be for noncommercial use |
||
69 | only, and must be limited to a small part of the data. Moreover, you |
||
70 | endeavour to inform users of your application that data are coming from |
||
17 | daniel-mar | 71 | <a href="http://oid-info.com">OID-info.com</a> by adding a hyperlink to <a href="http://oid-info.com">http://oid-info.com</a> |
72 | or <a href="https://oid-rep.orange-labs.fr">https://oid-rep.orange-labs.fr</a>. |
||
2 | daniel-mar | 73 | </p> |
74 | </td> |
||
75 | </tr> |
||
76 | </table> |
||
77 | <table cellspacing="0" cellpadding="0" border="0" width="100%"> |
||
78 | <tr> |
||
79 | <td width="10"></td> |
||
80 | <td> |
||
81 | <p> |
||
82 | If there is no error, the returned result is a piece of XML (resp. |
||
83 | JSON) which looks like the following examples. |
||
84 | </p> |
||
85 | <p> |
||
86 | The generated XML mostly conforms to the <a href="http://oid-info.com/oid.xsd">XML |
||
87 | Schema for the OID repository</a>. One difference is that the <code><strong><value></strong></code> |
||
88 | tag is separated in three tags: <code><strong><asn1-notation></strong></code>, |
||
89 | <code><strong><dot-notation></strong></code> and <code><strong><iri-notation></strong></code>. |
||
90 | Another main difference is that the <code><strong><oid></strong></code> |
||
91 | tag can have two optional attributes: |
||
92 | </p> |
||
93 | <ul> |
||
94 | <li> |
||
95 | <code><strong>category</strong></code> which, when present, takes |
||
96 | one or multiple ("<code>;</code>"-separated) values among "<a href="faq.htm#26"><code>Leaf |
||
97 | OID</code></a>", "<a href="faq.htm#26"><code>Frozen OID</code></a>", |
||
98 | "<code>Not allocating identifiers</code>" and "<code>Not |
||
99 | allocating Unicode labels</code>"; |
||
100 | </li> |
||
101 | <li> |
||
102 | <code><strong>standardized</strong></code> which, when present, |
||
103 | takes value "<code>true</code>" and indicates that the last <a href="name-forms.htm">identifier</a> |
||
104 | in the <strong><code><value></code></strong> can be used alone |
||
105 | without its associated number; |
||
106 | </li> |
||
107 | <li> |
||
108 | <code>last-modification</code> is the date (YYYY-MM-DD) when the |
||
109 | OID description was last modified in the OID repository. |
||
110 | </li> |
||
111 | </ul> |
||
112 | <p> |
||
113 | In JSON, keys <code>"category"</code>, <code>"identifier"</code>, |
||
114 | <code>"unicode-label"</code>, <code>"long-arc"</code> |
||
115 | are tables (hence between square brackets). |
||
116 | </p> |
||
117 | <table width="100%" border="1"> |
||
118 | <tr> |
||
119 | <td align="center"> |
||
120 | <font class="color_orange">XML</font> |
||
121 | </td> |
||
122 | </tr> |
||
123 | <tr> |
||
124 | <td> |
||
125 | <p> |
||
126 | <code><strong><oid category="</strong>Leaf OID"<strong>><br> <asn1_notation></strong>{joint-iso-itu-t(2) |
||
127 | 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 |
||
128 | conforming to the <a href="http://oid-info.com/oid.xsd">XML |
||
129 | Schema of the OID repository</a>.<strong></description><br> <information></strong>More information can be |
||
130 | found at <a href="http://oid-info.com/submit.htm">Submit |
||
131 | 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> |
||
132 | </p> |
||
133 | </td> |
||
134 | </tr> |
||
135 | <tr> |
||
136 | <td align="center"> |
||
137 | <font class="color_orange">JSON</font> |
||
138 | </td> |
||
139 | </tr> |
||
140 | <tr> |
||
141 | <tr> |
||
142 | <td> |
||
143 | <p> |
||
144 | <code><strong>{ "oid": {<br> "category": [</strong>"Leaf |
||
145 | OID"<strong>]</strong>,<br><strong> "asn1-notation"</strong>: |
||
146 | "{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": |
||
147 | [</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 |
||
148 | Schema of the OID repository</a>.<strong>",<br> "information":</strong> "More |
||
149 | information can be found at <a href=\"http://oid-info.com/submit.htm\">Submit |
||
150 | 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> |
||
151 | "Doe"<strong>,<br> "email":</strong> "john.doe@dummy.com"<strong>,<br> "modification-date":</strong> |
||
152 | "2002-05-25"<br><strong> }, <br> "first-registrant": {<br> "privacy":</strong> "true"<strong>,<br> "first-name":</strong> |
||
153 | "Paul"<strong>,<br> "last-name":</strong> |
||
154 | "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> |
||
155 | </p> |
||
156 | </td> |
||
157 | </tr> |
||
158 | </table> |
||
159 | </td> |
||
160 | </tr> |
||
161 | </table> |
||
162 | |||
163 | <table cellspacing="0" cellpadding="0" border="0" width="100%"> |
||
164 | <tr> |
||
165 | <td width="10"></td> |
||
166 | <td> |
||
167 | Errors are rendered as follows:<br><br><table width="100%" border="1"> |
||
168 | <tr> |
||
169 | <td align="center"> <font class="color_orange">XML</font> </td> |
||
170 | </tr> |
||
171 | <tr> |
||
172 | <td> |
||
173 | <code><strong><error code="</strong><em>error_code</em><strong>"></strong><br> Error message in English<br><strong></error></strong></code> |
||
174 | </td> |
||
175 | </tr> |
||
176 | <tr> |
||
177 | <td align="center"> <font class="color_orange">JSON</font> </td> |
||
178 | </tr> |
||
179 | <tr> |
||
180 | <td> |
||
181 | <code><strong>{ "error": {<br> "code":</strong> "<em>error_code</em><strong>",<br> "message":</strong> "Error message |
||
182 | in English"<br> <strong>}<br>}</strong></code> |
||
183 | </td> |
||
184 | </tr> |
||
185 | </table> |
||
186 | <br>where <code><em>error_code</em></code> is one of: |
||
187 | <ul> |
||
188 | <li> |
||
189 | "<code>illegal_oid</code>" when the OID given in parameter |
||
190 | <strong><code>oid</code></strong> cannot exist because, e.g., it is |
||
191 | known to be forbidden or one of its ascendant OIDs is a leaf (the |
||
192 | "<code>Error message in English</code>" explains what the |
||
193 | problem is); |
||
194 | </li> |
||
195 | <li> |
||
196 | "<code>maintenance</code>" when the OID repository is |
||
197 | not available because it is under maintenance; |
||
198 | </li> |
||
199 | <li> |
||
200 | "<code>oid_not_validated</code>" when the OID given in |
||
201 | parameter <strong><code>oid</code></strong> is described in the OID |
||
202 | repository but has not yet been validated by the OID administrator, |
||
203 | so its description is not yet publicly available; |
||
204 | </li> |
||
205 | <li> |
||
206 | "<code>runtime_error</code>" when there is an internal |
||
207 | problem (in which case the OID repository admin is automatically notified |
||
208 | by email); |
||
209 | </li> |
||
210 | <li> |
||
211 | "<code>syntax_error</code>" when the OID given in parameter |
||
212 | <strong><code>oid</code></strong> is not syntactiacally correct (the |
||
213 | "<code>Error message in English</code>" explains what the |
||
214 | problem is); |
||
215 | </li> |
||
216 | <li> |
||
217 | "<code>unknown_oid</code>" when the OID given in parameter |
||
218 | <strong><code>oid</code></strong> is not described in the OID repository |
||
219 | (or this parameter is missing); |
||
220 | </li> |
||
221 | <li> |
||
222 | "<code>wrong_login</code>" when parameters <strong><code>login</code></strong> |
||
223 | or <strong><code>password</code></strong> are not correct (the "<code>Error |
||
224 | message in English</code>" explains what the problem is). |
||
225 | </li> |
||
226 | </ul> |
||
227 | Note that the <code><em>error_code</em></code> won't change whereas the |
||
228 | "<code>Error message in English</code>" may evolve, so it is |
||
229 | recommended that, if needed, your application checks the <code><em>error_code</em></code>. |
||
230 | </td> |
||
231 | </tr> |
||
232 | </table> |
||
233 | |||
234 | </div> |