REST: Difference between revisions

From OSSelot
Jump to navigation Jump to search
mNo edit summary
m (Updated OSSelot logo to new font feature)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
Currently, the curated data are available in [[JSON]], [[RDF-XML]], [[SPDX2TV]] and [[YAML]] format.
Currently, the curated data are available in [[JSON]], [[RDF-XML]], [[SPDX2TV]] and [[YAML]] format.
====Scheme====
====Scheme====
This REST interface uses HTTP protocol at port 3262 and the following scheme:
This REST interface is available through standard HTTP protocol and the following scheme:
<pre>
<pre>
http://www.osselot.org:3262/<format>/<package>/<version>
http://rest.osselot.org/<format>/<package>/<version>
</pre>
</pre>
Alternatively and if needed, the SSL-enabled port 3263 can be used in which case the scheme has the form
Alternatively and if needed, the SSL-enabled port can be used in which case the scheme has the form
<pre>
<pre>
https://www.osselot.org:3263/<format>/<package>/<version>
https://rest.osselot.org/<format>/<package>/<version>
</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. When this is intended the scheme has the form
 
<pre>
https://rest.osselot.org/json/<package>
</pre>
and the various versions will be encapsulated in a JSON super object.
<html>
<html>
<script src="/scripts/osadl.js">
<script src="/scripts/osadl.js">
</script>
</script>
<h4 style="padding-bottom: 8px;">Use the below select box and search field to define a data format and enter the name of a software package. Then select one of the available software versions to immediately run the REST interface for the given package and display the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data in a new window</h4>
<h4 style="padding-bottom: 8px;">Use the below select box and search field to define a data format and enter the name of a software package. Then select one of the available software versions to immediately run the REST interface for the given package and display the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">OSSelot</span> curation data in a new window</h4>
<span><label for="formats">Format: </label>
<span><label for="formats">Format: </label>
<select onchange="onselectchange(this, 'rest' + document.getElementById('formats').value);" name="formats" id="formats">
<select onchange="onselectchange(this, 'rest' + document.getElementById('formats').value);" name="formats" id="formats">
Line 25: Line 28:
</select>
</select>
<input type="text" onkeyup="searchtextkeyup(event, this, 'rest' + document.getElementById('formats').value);" size="30" />
<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 />
<button onclick="searchOSSelot(this, 'rest' + document.getElementById('formats').value);">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">OSSelot</span> repository</button><br />
<span style="display: none;"></span>
<span style="display: none;"></span>
</span>
</span>
</html>
</html>

Latest revision as of 15:43, 1 November 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 is available through standard HTTP protocol and the following scheme:

http://rest.osselot.org/<format>/<package>/<version>

Alternatively and if needed, the SSL-enabled port can be used in which case the scheme has the form

https://rest.osselot.org/<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. When this is intended the scheme has the form

https://rest.osselot.org/json/<package>

and the various versions will be encapsulated in a JSON super object.

Use the below select box and search field to define a data format and enter the name of a software package. Then select one of the available software versions to immediately run the REST interface for the given package and display the OSSelot curation data in a new window