CINXE.COM

InPhO - The Internet Philosophy Ontology Project

<!DOCTYPE html> <html> <head> <title>InPhO - The Internet Philosophy Ontology Project</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="/jquery/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="/jqueryui/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script> <link href="/jqueryui/css/blitzer/jquery-ui-1.8.10.custom.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/bootstrap/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" /> <script src="/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <link href="/css/font-awesome-4.0.3/css/font-awesome.min.css" media="screen" rel="stylesheet" type="text/css" /> <script src="/js/d3.min.js" type="text/javascript"></script> <link href="/css/style.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/tree.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/idea-edit.css" media="screen" rel="stylesheet" type="text/css" /> <script src="/js/util.js" type="text/javascript"></script> <script src="/js/actb.js" type="text/javascript"></script> <script type="text/javascript"> //Fixes navbar behavior with hashchanges var shiftWindow = function() { scrollBy(0, -50) }; if (location.hash) shiftWindow(); window.addEventListener("hashchange", shiftWindow); </script> </head> <body> <div class="navbar navbar-fixed-top navbar-inverse" id="header"> <div class="navbar-inner"> <div class="container"> <ul class="nav"> <li><a href="/"><i class="icon-home icon-white"></i></a></li> <li><a href="/about/">About</a></li> <li><a href="/papers/">Papers</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Data <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/docs/">REST API</a></li> <li><a href="/owl/">OWL Archive</a></li> <li><a href="https://inphoproject.org/datablog/">Data Blog</a></li> <li><a href="http://github.com/inpho">Source Code</a></li> </ul> </li> </ul> <ul class="nav pull-right"> <li> <form class="navbar-search" action="/entity" method="get"> <input type="hidden" name="redirect" value="true" /> <input class="search-query input-medium" type="text" id="nav-search" name="q" data-provide="typeahead" autocomplete="off" /> </form> <script src="/js/actb.js"></script> <script>inpho.actb.init('#nav-search', '/entity.json'); </script> </li> <li class="divider-vertical"></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Browse <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="/taxonomy"><i class="icon-comment"></i> Taxonomy</a></li> <li><a href="/thinker"><i class="icon-user"></i> Thinkers</a></li> <li><a href="/journal"><i class="icon-list-alt"></i> Journals</a></li> </ul> </li> <li class="divider-vertical"></li> <li><a href="/register">Register</a></li> <li><a href="/signin">Sign In</a></li> </ul> </div> </div> </div> <!-- <div class="container"> <div class="alert alert-block" style="padding-bottom: 10px;"> <button type="button" class="close" data-dismiss="alert">&times;</button> <h4>Welcome to our new home!</h4> <p>You are viewing the InPhO Project at <strong><a href="https://www.inphoproject.org/">https://www.inphoproject.org/</a></strong>. Please update your bookmarks.</p> </div> </div> --> <div class="container" id="container"> <div class="row"> <div class="hero-unit graph-bg" style="text-align: center;"> <div class="graph-content"> <h1><span class="logo-word">InPhO</span> API Docs</h1> <p>The InPhO offers much of its data through a REST API in JSON and RDF formats.</p> </div> </div> <div class="contents span3" id="table-of-contents"> <ul id="navlist" class="nav nav-list" style="position: fixed;"> <li> <a class="reference internal" href="#a-restful-inpho-api" id="id1"> A RESTful InPhO API </a> <li> <a class="reference internal" href="#api-structure" id="id2"> API Structure </a> </li> <li> <a class="reference internal" href="#response-codes" id="id3"> Response Codes </a> </li> <li> <a class="reference internal" href="#permissions" id="id4"> Permissions </a> </li> <li> <a class="reference internal" href="#request-parameters" id="id5"> Request Parameters </a> <ul> <li> <a class="reference internal" href="#get-parameters" id="id6"> GET Parameters </a> </li> <li> <a class="reference internal" href="#post-put-parameters" id="id7"> POST/PUT Parameters </a> </li> </ul> </li> <li> <a class="reference internal" href="#quick-start" id="id8"> Quick Start </a> </li> <li> <a class="reference internal" href="#development" id="id9"> Development </a> </li> <li> <a class="reference internal" href="#testing" id="id10"> Testing </a> </li> <li> <a class="reference internal" href="#more-rest-resources" id="id11"> More REST Resources </a> </li> </li> </ul> &nbsp; </div> <div class="span9"> <style type="text/css"> /* :Author: David Goodger (goodger@python.org) :Id: $Id: html4css1.css 5951 2009-05-18 18:03:10Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to customize this style sheet. */ dl { padding-left: 22px; } .headerlink { display: none; padding-left: 5px; font-size: 9px; color: #cccccc; !important } /* used to remove borders from tables and images */ .borderless, table.borderless td, table.borderless th { border: 0 } table.borderless td, table.borderless th { /* Override padding for "table.docutils td" with "! important". The right padding separates the table cells. */ padding: 0 0.5em 0 0 ! important } .first { /* Override more specific margin styles with "! important". */ margin-top: 0 ! important } .last, .with-subtitle { margin-bottom: 0 ! important } .hidden { display: none } a.toc-backref { text-decoration: none ; color: black } blockquote.epigraph { margin: 2em 5em ; } dl.docutils dd { margin-bottom: 0.5em } /* Uncomment (and remove this text!) to get bold-faced definition list terms dl.docutils dt { font-weight: bold } */ div.abstract { margin: 2em 5em } div.abstract p.topic-title { font-weight: bold ; text-align: center } div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { margin: 2em ; border: medium outset ; padding: 1em } div.admonition p.admonition-title, div.hint p.admonition-title, div.important p.admonition-title, div.note p.admonition-title, div.tip p.admonition-title { font-weight: bold ; font-family: sans-serif } div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, div.warning p.admonition-title { color: red ; font-weight: bold ; font-family: sans-serif } /* Uncomment (and remove this text!) to get reduced vertical space in compound paragraphs. div.compound .compound-first, div.compound .compound-middle { margin-bottom: 0.5em } div.compound .compound-last, div.compound .compound-middle { margin-top: 0.5em } */ div.dedication { margin: 2em 5em ; text-align: center ; font-style: italic } div.dedication p.topic-title { font-weight: bold ; font-style: normal } div.figure { margin-left: 2em ; margin-right: 2em } div.footer, div.header { clear: both; font-size: smaller } div.line-block { display: block ; margin-top: 1em ; margin-bottom: 1em } div.line-block div.line-block { margin-top: 0 ; margin-bottom: 0 ; margin-left: 1.5em } div.sidebar { margin: 0 0 0.5em 1em ; border: medium outset ; padding: 1em ; background-color: #ffffee ; width: 40% ; float: right ; clear: right } div.sidebar p.rubric { font-family: sans-serif ; font-size: medium } div.system-messages { margin: 5em } div.system-messages h1 { color: red } div.system-message { border: medium outset ; padding: 1em } div.system-message p.system-message-title { color: red ; font-weight: bold } div.topic { margin: 2em } h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { margin-top: 0.4em } h1.title { text-align: center } h2.subtitle { text-align: center } hr.docutils { width: 75% } img.align-left, .figure.align-left{ clear: left ; float: left ; margin-right: 1em } img.align-right, .figure.align-right { clear: right ; float: right ; margin-left: 1em } .align-left { text-align: left } .align-center { clear: both ; text-align: center } .align-right { text-align: right } /* reset inner alignment in figures */ div.align-right { text-align: left } /* div.align-center * { */ /* text-align: left } */ ol.simple, ul.simple { margin-bottom: 1em } ol.arabic { list-style: decimal } ol.loweralpha { list-style: lower-alpha } ol.upperalpha { list-style: upper-alpha } ol.lowerroman { list-style: lower-roman } ol.upperroman { list-style: upper-roman } p.attribution { text-align: right ; margin-left: 50% } p.caption { font-style: italic } p.credits { font-style: italic ; font-size: smaller } p.label { white-space: nowrap } p.rubric { font-weight: bold ; font-size: larger ; color: maroon ; text-align: center } p.sidebar-title { font-family: sans-serif ; font-weight: bold ; font-size: larger } p.sidebar-subtitle { font-family: sans-serif ; font-weight: bold } p.topic-title { font-weight: bold } pre.address { margin-bottom: 0 ; margin-top: 0 ; font: inherit } pre.literal-block, pre.doctest-block { margin-left: 2em ; margin-right: 2em } span.classifier { font-family: sans-serif ; font-style: oblique } span.classifier-delimiter { font-family: sans-serif ; font-weight: bold } span.interpreted { font-family: sans-serif } span.option { white-space: nowrap } span.pre { white-space: pre } span.problematic { color: red } span.section-subtitle { /* font-size relative to parent (h1..h6 element) */ font-size: 80% } table.citation { border-left: solid 1px gray; margin-left: 1px } table.docinfo { margin: 2em 4em } table.docutils { margin-top: 0.5em ; margin-bottom: 0.5em } table.footnote { border-left: solid 1px black; margin-left: 1px } table.docutils td, table.docutils th, table.docinfo td, table.docinfo th { padding-left: 0.5em ; padding-right: 0.5em ; vertical-align: top } table.docutils th.field-name, table.docinfo th.docinfo-name { font-weight: bold ; text-align: left ; white-space: nowrap ; padding-left: 0 } h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { font-size: 100% } ul.auto-toc { list-style-type: none } </style> <div id="content"> <div class="section" id="a-restful-inpho-api"> <h1> <a class="toc-backref" href="#id1"> A RESTful InPhO API </a> <a class="headerlink" href="#a-restful-inpho-api" title="Permalink to this headline"> 露 </a> </h1> <p>We are committed to open access, with data available <a href="/docs/">via a REST API</a>, <a href="/owl/">a monthly OWL archive</a> of the ontology, visualizations and datafiles posted <a href="http://inpho.cogs.indiana.edu/datablog/">on our datablog</a>, and <a href="http://github.com/inpho">source code at GitHub</a>. All data uses the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons BY-NC-SA 3.0 license</a>. <p> InPhO maintains an open-access application platform interface (API) to facilitate collaboration with digital humanities and semantic web programmers. This API is built upon the principles of REpresentational State Transfer (REST), a paradigm of web service development which leverages the ubiquotus HTTP protocol to provide a common interface for object manipulation. </p> <p> Every idea, thinker and journal in the InPhO knowledge base may be retrieved in both a human-readable HTML page and a machine-readable JSON object. Entities may be manipulated through the four basic HTTP Request Methods: POST (create), GET (retrieve/list), PUT (update), DELETE. Authentication is handled through HTTP Basic Authentication over a secure SSL connection. Due to the stateless nature of a RESTful web service, each request is completely self-contained, eliminating the need for session scoping. </p> <p> A detailed technical specification is below: </p> <div class="section" id="api-structure"> <h2> <a class="toc-backref" href="#id2"> API Structure </a> <a class="headerlink" href="#api-structure" title="Permalink to this headline"> 露 </a> </h2> <table class="table table-striped table-condensed"> <colgroup> <col width="53%" /> <col width="12%" /> <col width="12%" /> <col width="12%" /> <col width="12%" /> </colgroup> <thead valign="bottom"> <tr><th class="head">URI</th> <th class="head">GET</th> <th class="head">PUT</th> <th class="head">POST</th> <th class="head">DELETE</th> </tr> </thead> <tbody valign="top"> <tr> <td>/entity</td> <td>list</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/entity/{id}</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/idea</td> <td>list</td> <td>&#8211;</td> <td>create</td> <td>&#8211;</td> </tr> <tr><td>/idea/{id}</td> <td>view</td> <td>update</td> <td>&#8211;</td> <td>delete</td> </tr> <tr> <td>/idea/{id}/graph</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}/{relation}</td> <td>list</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}/{relation}/{id2}</td> <td>&#8211;</td> <td>update</td> <td>create</td> <td>delete</td> </tr> <tr> <td>/thinker</td> <td>list</td> <td>&#8211;</td> <td>create</td> <td>&#8211;</td> </tr> <tr> <td>/thinker/{id}</td> <td>view</td> <td>update</td> <td>&#8211;</td> <td>delete</td> </tr> <tr> <td>/thinker/{id}/graph</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/thinker/{id}/{relation}/{id2}</td> <td>&#8211;</td> <td>update</td> <td>create</td> <td>&#8211;</td> </tr> <tr> <td>/journal</td> <td>list</td> <td>&#8211;</td> <td>create</td> <td>&#8211;</td> </tr> <tr> <td>/journal/{id}</td> <td>view</td> <td>update</td> <td>&#8211;</td> <td>delete</td> </tr> <tr> <td>/school_of_thought</td> <td>list</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/school_of_thought/{id}</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/work</td> <td>list</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/work/{id}</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/taxonomy</td> <td>list</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/taxonomy/{id}</td> <td>view</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> </tbody> </table> <p> Adding a file extension will return the appropriate format for GET requests. Currently implemented: </p> <table class="table table-condensed table-striped"> <colgroup> <col width="53%" /> <col width="12%" /> <col width="12%" /> <col width="12%" /> <col width="12%" /> </colgroup> <thead valign="bottom"> <tr> <th class="head">URI</th> <th class="head">default</th> <th class="head">html</th> <th class="head">json</th> <th class="head">xml</th> </tr> </thead> <tbody valign="top"> <tr> <td>/entity</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/entity/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/idea</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}/graph</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}/{relation}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/idea/{id}/{relation}/{id2}</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/thinker</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/thinker/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/thinker/{id}/graph</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/thinker/{id}/{relation}/{id2}</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> <td>&#8211;</td> </tr> <tr> <td>/journal</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/journal/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/taxonomy</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/taxonomy/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/school_of_thought</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr> <td>/school_of_thought/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr><td>/work</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> <tr><td>/work/{id}</td> <td>html</td> <td>y</td> <td>y</td> <td>&#8211;</td> </tr> </tbody> </table> <dl class="docutils"> <dt>Thinker-Thinker {relation}s</dt> <dd>influenced, influenced_by, teacher_of, student_of</dd> <dt>Idea-Idea {relation}s</dt> <dd>classes, instances, links, hyponyms, related FIX: generality, relatedness</dd> <dt>Idea {relation}s</dt> <dd>FIX: nationality, profession</dd> </dl> </div> <div class="section" id="response-codes"> <h2><a class="toc-backref" href="#id3">Response Codes</a><a class="headerlink" href="#response-codes" title="Permalink to this headline">露</a></h2> <p>Code using our platform should handle the 6 HTTP Responses below for all Methods, unless otherwise noted.</p> <dl class="docutils"> <dt>HTTP 200 OK</dt> <dd>Request processed, success</dd> <dt>HTTP 400 Bad Request</dt> <dd>Only for: POST, PUT Request did not validate (ex: teacher_of can only have a degree of 0 or 1 (y/n) - if degree=3 you will get an HTTP 400)</dd> <dt>HTTP 401 Unauthorized</dt> <dd>Only for: Permissioned methods (see chart below) Unable to be authorized, self explanatory.</dd> <dt>HTTP 404 Not Found</dt> <dd>One of the ids passed was invalid, so the resource could not be found</dd> <dt>HTTP 405 Method Not Allowed</dt> <dd>The URL does not support the request method. (ex: Using GET on an evaluation url)</dd> <dt>HTTP 409 Conflict</dt> <dd>Only for: POST, PUT Valid request, but there are conflicts (ex. creating a journal with an ISSN that is already in the db)</dd> <dt>HTTP 500 Internal Server Error</dt> <dd>Thrown if there are currently issues with the InPhO service.</dd> </dl> </div> <div class="section" id="permissions"> <h2><a class="toc-backref" href="#id4">Permissions</a><a class="headerlink" href="#permissions" title="Permalink to this headline">露</a></h2> <p>There are five levels of authentication - from most restrictive to least restrictive, each role has the privileges of all lesser roles:</p> <table class="table table-condensed table-striped"> <colgroup> <col width="29%" /> <col width="71%" /> </colgroup> <tbody valign="top"> <tr><td>public</td> <td>GET</td> </tr> <tr><td>user</td> <td>evaluation POST</td> </tr> <tr><td>creator</td> <td>evaluation PUT, DELETE</td> </tr> <tr><td>curator</td> <td>entity PUT, POST, DELETE</td> </tr> <tr><td>admin</td> <td>all permissions</td> </tr> </tbody> </table> </div> <div class="section" id="request-parameters"> <h2><a class="toc-backref" href="#id5">Request Parameters</a><a class="headerlink" href="#request-parameters" title="Permalink to this headline">露</a></h2> <div class="section" id="get-parameters"> <h3><a class="toc-backref" href="#id6">GET Parameters</a><a class="headerlink" href="#get-parameters" title="Permalink to this headline">露</a></h3> <table class="table table-condensed table-striped"> <col class="option" /> <col class="description" /> <dl class="docutils"> <dt>/idea, /journal, /entity, /taxonomy, /thinker, /work, /school_of_thought</dt> <dd>string: sep, q boolean: redirect int: limit</dd> </dl> </tbody> </table> </div> <div class="section" id="post-put-parameters"> <h3><a class="toc-backref" href="#id7">POST/PUT Parameters</a><a class="headerlink" href="#post-put-parameters" title="Permalink to this headline">露</a></h3> <dl class="docutils"> <dt>/journal/{id}</dt> <dd>String: ISSN, URL boolean: openAccess, student, active (pass blank for false - ex. &#8220;?openAccess=&amp;student=&amp;active=&#8221;)</dd> <dt>/idea, /journal, /entity, /taxonomy, /thinker, /work, /school_of_thought</dt> <dd>String: sep_dir</dd> <dt>/idea/{id}, /journal{id}, /entity{id}, /taxonomy{id}, /thinker{id}, /work{id}, /school_of_thought{id}</dt> <dd>String: sep_dir</dd> <dt>/idea/{id}/{related}</dt> <dd>boolean: sep_filter</dd> <dt>/idea/{id}/{relation}/{id2}</dt> <dd>int: degree (0:4)</dd> <dt>/thinker/{id}}/{relation}/{id2}</dt> <dd>int: degree (0:4)</dd> </dl> </div> </div> <div class="section" id="quick-start"> <h2><a class="toc-backref" href="#id8">Quick Start</a><a class="headerlink" href="#quick-start" title="Permalink to this headline">露</a></h2> <p>The quickest way to get started is to use the command line tool curl:</p> <dl class="docutils"> <dt>GET</dt> <dd><p class="first"><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">https://inpho.cogs.indiana.edu/idea/646</span></tt></p> <p class="last">To send a query for a specific SEP directory</p> </dd> <dt>PUT</dt> <dd><p class="first"><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-X</span> <span class="pre">PUT</span> <span class="pre">-d</span> <span class="pre">&quot;degree=1&quot;</span> <span class="pre">-u</span> <span class="pre">username:password</span> <span class="pre">https://inpho.cogs.indiana.edu/thinker/3724/teacher_of/2553</span></tt></p> <p>For platforms which do not support the PUT method (including HTML4 forms), one can make a POST request with the parameter <cite>_method=PUT</cite> which will be translated to the appropriate request on the server-side:</p> <p class="last"><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-d</span> <span class="pre">&quot;_method=PUT&amp;degree=3&quot;</span> <span class="pre">-u</span> <span class="pre">username:password</span> <span class="pre">https://inpho.cogs.indiana.edu/thinker/3724/teacher_of/2553</span></tt></p> </dd> <dt>POST</dt> <dd><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-X</span> <span class="pre">POST</span> <span class="pre">-d</span> <span class="pre">&quot;label=epistemology&quot;</span> <span class="pre">-u</span> <span class="pre">username:password</span> <span class="pre">https://inpho.cogs.indiana.edu/idea</span></tt></dd> <dt>DELETE</dt> <dd><tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-X</span> <span class="pre">DELETE</span> <span class="pre">-u</span> <span class="pre">username:password</span> <span class="pre">https://inpho.cogs.indiana.edu/thinker/3724/teacher_of/2553</span></tt> <tt class="docutils literal"><span class="pre">curl</span> <span class="pre">-X</span> <span class="pre">DELETE</span> <span class="pre">-u</span> <span class="pre">username:password</span> <span class="pre">https://inpho.cogs.indiana.edu/idea/715</span></tt></dd> </dl> </div> <div class="section" id="development"> <h2><a class="toc-backref" href="#id9">Development</a><a class="headerlink" href="#development" title="Permalink to this headline">露</a></h2> <p>Developers may use any language to code against the API, provided they use the HTTP protocol. These are some reccommended url libraries for common development languages:</p> <table class="table table-condensed table-striped"> <colgroup> <col width="10%" /> <col width="90%" /> </colgroup> <tbody valign="top"> <tr><td>PHP</td> <td><a class="reference external" href="http://us2.php.net/curl">curl</a></td> </tr> <tr><td>Python</td> <td><a class="reference external" href="http://docs.python.org/library/urllib.html">urllib</a></td> </tr> <tr><td>Perl</td> <td><a class="reference external" href="http://search.cpan.org/perldoc?WWW::Curl">WWW::curl</a></td> </tr> <tr><td>Ruby</td> <td><a class="reference external" href="http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html">Net::HTTP</a></td> </tr> <tr><td>C</td> <td><a class="reference external" href="http://curl.haxx.se/libcurl/">libcurl</a></td> </tr> <tr><td>C++</td> <td><a class="reference external" href="http://curlpp.org/">curlpp</a></td> </tr> <tr><td>C#</td> <td><a class="reference external" href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx">System.Net.HttpWebRequest</a></td> </tr> <tr><td>Java</td> <td><a class="reference external" href="http://hc.apache.org/httpcomponents-client-ga/">HttpClient</a></td> </tr> <tr><td>Common Lisp</td> <td><a class="reference external" href="http://allegroserve.sourceforge.net/">AllegroServe</a></td> </tr> <tr><td>JavaScript</td> <td><a class="reference external" href="http://www.w3.org/TR/XMLHttpRequest/">XMLHttpRequest</a></td> </tr> <tr><td>JavaScript</td> <td><a class="reference external" href="http://api.jquery.com/jQuery.post/">jQuery.Post</a> <a class="reference external" href="http://api.jquery.com/jQuery.ajax/">jQuery.Ajax</a> [<a class="reference external" href="http://homework.nwsnet.de/news/9132_put-and-delete-with-jquery">useful notes on PUT and DELETE</a>]</td> </tr> <tr><td>JavaScript</td> <td>YAHOO.util.Connect.asyncRequest [<a class="reference external" href="http://developer.yahoo.com/yui/examples/connection/post.html">example</a>] [<a class="reference external" href="http://developer.yahoo.com/yui/docs/YAHOO.util.Connect.html">docs</a>]</td> </tr> </tbody> </table> </div> <div class="section" id="testing"> <h2><a class="toc-backref" href="#id10">Testing</a><a class="headerlink" href="#testing" title="Permalink to this headline">露</a></h2> <p>InPhO maintains a separate server for development testing. Applications should be tested on <a class="reference external" href="http://inphodev.cogs.indiana.edu:8088/">http://inphodev.cogs.indiana.edu:8088/</a> before switching to <a class="reference external" href="https://inpho.cogs.indiana.edu/">https://inpho.cogs.indiana.edu/</a>. InPhOdev maintains a separate database to avoid data pollution issues during development. The data is periodically replaced with the newest data from InPhO.</p> </div> <div class="section" id="more-rest-resources"> <h2><a class="toc-backref" href="#id11">More REST Resources</a><a class="headerlink" href="#more-rest-resources" title="Permalink to this headline">露</a></h2> <ul class="simple"> <li><a class="reference external" href="http://www.xfront.com/REST-Web-Services.html">Building Web Services the REST Way</a> - Concise, high-quality introduction</li> <li><a class="reference external" href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Wikipedia - Representational State Transfer</a> - Good summary, but does not include examples.</li> <li><a class="reference external" href="http://www.infoq.com/articles/rest-introduction">A Brief REST Introduction</a> - Comprehensive introduction, but not as brief as the title implies</li> <li><a class="reference external" href="http://bitworking.org/news/201/RESTify-DayTrader">RESTify-DayTrader</a> - Good example of using REST</li> <li><a class="reference external" href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">Representational State Transfer (REST)</a> The original chapter from Roy Feldings&#8217;s dissertation</li> </ul> </div> </div> </div> <script>$('#navlist').scrollspy();</script> </div> <footer class="footer"> <hr /> <p> <a href="http://www.neh.gov/odh/" title="Office of Digital Humanities" class="pull-right"> <img src="/img/ODH.jpg" alt="Office of Digital Humanities" style="border: 0px; margin-left: 10px;" /> </a> Funded through several generous grants by the <a href="http://www.neh.gov/odh/">National Endowment of the Humanities, Office of Digital Humanities</a>. Any views, findings, conclusions or recommendations expressed in this website do not necessarily represent those of the NEH. </p> <hr /> <p> Prior support from the Office of the Vice-Provost for Research and the Cognitive Science Program at Indiana University Bloomington made the original Indiana Philosophy Ontology project possible. Although rebranded to the Internet Philosophy Ontology, our genesis lives on in the InPhO moniker. </p> <!-- <p> <hr /> <a href="http://www.iub.edu" title="Indiana University" class="pull-left"> <img src="/img/iub_white.gif" alt="Indiana University Bloomington" style="border: 0px; margin-right: 10px;"/> </a> <a href="http://www.cogs.indiana.edu">Cognitive Science Program</a> | 819 Eigenmann Hall, 1910 E. 10th St. Bloomington, IN 47406-7512 <br /> <a href="http://www.indiana.edu/comments/copyright.shtml">Copyright</a> &copy; 2013 The Trustees of <a href="http://www.indiana.edu/">Indiana University</a> | <a href="http://www.indiana.edu/comments/complaint.shtml">Copyright Complaints</a> | <a href="/privacy/">Privacy Policy</a> </p> --> <hr /> <p style="margin-bottom: 25px;"> InPhO is committed to open access. Data published via <a href="/docs/">the REST API</a>, <a href="http://inpho.cogs.indiana.edu/datablog">datablog</a>, and <a href="/owl/">OWL archives</a> are licensed by the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons BY-NC-SA 3.0 License</a>. Developed using open-source technologies and distributed on <a href="http://github.com/inpho/">GitHub</a>. </p> </footer> </div> <script type="text/javascript"> $('[data-toggle="tooltip"]').tooltip(); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10