REST: Difference between revisions
Jump to navigation
Jump to search
(Added SSL mode via port 3263) |
(Added search box) |
||
Line 12: | Line 12: | ||
</pre> | </pre> | ||
where <format> may be any of "json", "spdx", "xml" or "yaml". The version must be given when [[RDF-XML]], [[SPDX2TV]] or [[YAML]] format is used. Only [[JSON]] format permits to retrieve all curated versions of a software package with a single REST call. | where <format> may be any of "json", "spdx", "xml" or "yaml". The version must be given when [[RDF-XML]], [[SPDX2TV]] or [[YAML]] format is used. Only [[JSON]] format permits to retrieve all curated versions of a software package with a single REST call. | ||
<html> | |||
<script src="/scripts/osadl.js"> | |||
</script> | |||
<script> | |||
function onselectchange(select, link) | |||
{ | |||
searchOSSelot(select.nextElementSibling.nextElementSibling, link); | |||
} | |||
</script> | |||
<h4>Use the below search box to immediately test the REST interface for the available data formats and display the selected <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data in a new window</h4> | |||
<span><label for="formats">Format: </label> | |||
<select onchange="onselectchange(this, 'rest' + document.getElementById('formats').value);" name="formats" id="formats"> | |||
<option value="json" selected="selected">JSON</option> | |||
<option value="xml">RDF-XML</option> | |||
<option value="spdx">SPDX2TV</option> | |||
<option value="yaml">YAML</option> | |||
</select> | |||
<input type="text" onkeyup="searchtextkeyup(event, this, 'rest' + document.getElementById('formats').value);" size="30" /> | |||
<button onclick="searchOSSelot(this, 'rest' + document.getElementById('formats').value);">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> repository</button><br /> | |||
<span style="display: none;"></span> | |||
</span> | |||
</html> |
Revision as of 17:05, 27 July 2023
Obtain curation data via a REST interface
Available formats
Currently, the curated data are available in JSON, RDF-XML, SPDX2TV and YAML format.
Scheme
This REST interface uses HTTP protocol at port 3262 and the following scheme:
http://www.osselot.org:3262/<format>/<package>/<version>
Alternatively and if needed, the SSL-enabled port 3263 can be used in which case the scheme has the form
https://www.osselot.org:3263/<format>/<package>/<version>
where <format> may be any of "json", "spdx", "xml" or "yaml". The version must be given when RDF-XML, SPDX2TV or YAML format is used. Only JSON format permits to retrieve all curated versions of a software package with a single REST call.