https://www.safecreative.org/mw/index.php?title=Semantic.query&feed=atom&action=historySemantic.query - Revision history2024-03-29T13:28:12ZRevision history for this page on the wikiMediaWiki 1.40.1https://www.safecreative.org/mw/index.php?title=Semantic.query&diff=799&oldid=prevAdminwiki: Created page with "This is a prototype for Safe Creative semantic services. It allows to query a work registration info by providing some kind of digital fingerprint = Syntax = This component..."2021-05-07T08:46:02Z<p>Created page with "This is a prototype for Safe Creative semantic services. It allows to query a work registration info by providing some kind of digital fingerprint = Syntax = This component..."</p>
<p><b>New page</b></p><div>This is a prototype for Safe Creative semantic services.<br />
<br />
It allows to query a work registration info by providing some kind of digital fingerprint<br />
<br />
= Syntax =<br />
<br />
This component uses a different syntax from the rest of the API:<br />
<br />
<pre><br />
http://api-search.safecreative.org/semantic-query?param=value&....<br />
</pre><br />
<br />
= Parameters = <br />
You can use any of the following parameters on your semantic queries:<br />
* '''adler32''': Adler32 checksum of file contents (16 hex digits- first 8 digits should be zero)<br />
* '''crc32''': CRC32 checksum of file contents (16 hex digits – first 8 digits should be zero)<br />
* '''ed2kfileid''': File hash for ed2k network (32 hex digits)<br />
* '''md2''': MD2 hash of file contents (32 hex digits)<br />
* '''md4''': MD4 hash of file contents (32 hex digits)<br />
* '''md5''': MD5 hash of file contents (32 hex digits)<br />
* '''part32k.first''': SHA1 hash of the first 32k of file contents (40 hex digits)<br />
* '''part32k.last''': SHA1 hash of the last 32k of file contents (40 hex digits)<br />
* '''part32k.middle''': SHA1 hash of middle 32k of file contents (40 hex digits)<br />
** It is calculated as the SHA1 of a 32k chunk starting on file position (filesize – 32k) / 2.<br />
** If the file size is less than 32k, it is the hash of the whole file.<br />
* '''sha''': SHA1 hash of file contents(40 hex digits)<br />
* '''sha1''': SHA1 hash of file contents (40 hex digits)<br />
* '''sha384''': SHA384 hash of file contents (96 hex digits)<br />
* '''sha512''': SHA512 hash of file contents (128 hex digits)<br />
* '''size''': File size in bytes<br />
* '''torrent.*''': SHA1 hash of torrent chunk hashes for different chunk sizes (40 hex digits)<br />
** '''torrent.32768''': 32k chunks<br />
** '''torrent.49152''': 48k chunks<br />
** '''torrent.65536''': 64k chunks<br />
** '''torrent.98304''': 96k chunks<br />
** '''torrent.131072''': 128k chunks<br />
** '''torrent.196608''': 192k chunks<br />
** '''torrent.262144''': 256k chunks<br />
** '''torrent.393216''': 384k chunks<br />
** '''torrent.524288''': 512k chunks<br />
** '''torrent.786432''': 768k chunks<br />
** '''torrent.1048576''': 1024k chunks<br />
** '''torrent.1572864''': 1536k chunks<br />
** '''torrent.2097152''': 2048k chunks<br />
** '''torrent.3145728''': 3072k chunks<br />
** '''torrent.4194304''': 4096k chunks<br />
<br />
All binary contents must be encoded as a string of hexadecimal lowercase digits (0123456789abcdef), using two digits per byte (e.g. 8 bytes = 16 hex digits).<br />
<br />
= Returns =<br />
<br />
* '''works'''<br />
** '''work'''<br />
*** '''code''': Safe Creative work code <br />
*** '''title''': Work title<br />
*** '''authors''': List of authors<br />
**** '''author'''<br />
***** '''code''': Author's Safe Creative user code<br />
***** '''name''': Author's full name<br />
***** '''human-url''': URL to the author's Safe Creative public profile<br />
*** '''rights-holders''': List of rights holders<br />
**** '''rights-holder'''<br />
***** '''code''': Rights holder's Safe Creative user code<br />
***** '''name''': Rights holder's full name<br />
***** '''human-url''': URL to the rights holder's Safe Creative public profile<br />
*** '''thumbnail''': URL to the work thumbnail (if any)<br />
*** '''license''': Work license<br />
**** '''code''': License code<br />
**** '''name''': License name<br />
**** '''shortname''': License short name<br />
**** '''human-url''': URL to license text<br />
**** '''features''': License features (see [[user.licenses]]<br />
*** '''human-url''': URL to this work web page in Safe Creative<br />
*** '''machine-url''': URL to this work API info response (see [[work.get]])*<br />
<br />
= Example =<br />
REQUEST:<br />
<br />
<pre><br />
http://api-search.safecreative.org/semantic-query?md5=9a4bca4293523413c176dd6cd23d20c2<br />
</pre><br />
<br />
RESPONSE:<br />
<br />
<pre><br />
<?xml version="1.0" encoding="UTF-8"?><br />
<works><br />
<work><br />
<code>0908044196577</code><br />
<title>atardecer plateado</title><br />
<authors><br />
<author><br />
<code>0709270000528</code><br />
<name>Mario Pena Zapatería</name><br />
<human-url>http://www.safecreative.org/user/0709270000528</human-url><br />
</author><br />
</authors><br />
<thumbnail>http://thumbnails-safecreative-org.s3.amazonaws.com/1/00000122/e579/ca7e/dc6a/a75443e756ad/atardecerplateado_thumb.png</thumbnail><br />
<license><br />
<code>http://creativecommons.org/licenses/by-sa/3.0/</code><br />
<name>Creative Commons Reconocimiento-Compartirigual 3.0</name><br />
<shortname>CC by-sa</shortname><br />
<human-url>http://creativecommons.org/licenses/by-sa/3.0/legalcode</human-url><br />
<features><br />
<recognition>YES</recognition><br />
<distribution>YES</distribution><br />
<derivations>INHERITANCE</derivations><br />
<commercial>YES</commercial><br />
</features><br />
</license><br />
<human-url>http://www.safecreative.org/work/0908044196577</human-url><br />
<machine-url>http://www.safecreative.org/v2/?component=work.get&amp;code=0908044196577</machine-url><br />
</work><br />
</works><br />
</pre><br />
<br />
[[Category:API component]]</div>Adminwiki