Safe Creative API Web Services Reference v2 - D R A F T
work.register
You can register a work using the function work.register
The work content can be specified:
- with an upload ticket obtained from a previous upload
- using a text request parameter
- specifying an url
Using an upload ticket or text parameter are both synchronous registration.
You can register a work asynchronously using an url and sha-1 of the content. Safe Creative engine will download the content of the work to be registered .
The response is the work registration code
When a code parameter is specified the work will be updated with the new data.
If the work is in REGISTERED state you can not change the work title, alias, nor content.
You cannot change the work content if you registered the work using asyncrhonous mode (register via url) and it has not been downloaded yet.
This call requires a nonce key
- noncekey: nonce method call
- profile: profile code
- code: code of the work when you're updating the work
- title: title of the work
- excerpt: summary description of the work
- license: work licenses see user.licenses
- editlocked: for partners, avoid user work edit of this work
- worktype: work type, work.types
- language: work language
- tags: comma separated list of tags, replace existent tags
- extratags: comma separated list of tags, added to existent tags
- allowdownload: 1 when he work is downloadable publicly
- registrypublic: 1 when the registration is public available
- usealias: 1 when you want to use the user alias
- alias: alias of the user to be asigned to the work
- userauthor: 1 when the user is the author
- obs: extra notes for the work, only aplicable if your account is collaborator level, deprecated
- linkN: mutivalue work external links, replace previous work links. It's a multivalue property. The format is url|name|type where type can be DOWNLOAD or INFO. N must be 1..n
- extralinkN: mutivalue work external links, added to the previous defined work links. It's a multivalue property and the format is like the link property. N must be 1..n
- final: 1 if you want the work to be registered in REGISTERED state and not PREREGISTERED
- meta: 1 if the registration is not fully legal work registration. Please do not use
- versionof: comma separated list of work codes from which the work is version of. The specified works must exist and its state must be REGISTERED.
- derivationof: comma separated list of work codes from which the work is derived from. The specified works must exist and its state must be REGISTERED.
- compositionof: comma separated list of work codes from which the work is composed of. The specified works must exist and its state must be REGISTERED.
Option A: Register a text
- text: text to be registered
- filename: name for the content
Option B: Register a previously uploaded work
- uploadticket: upload ticket obtained from the work upload commit or a work upload by post
Option C: Register via url
- url: accesible url of the object to be registered
- filename: name for the downloaded content
- checksum: sha1 of the content of the url to be registered
- size: size in bytes of the content of the url to be registered
You cannot use simultaneously more than one method of registration
Profile is applied first, if no profile is specified then the user default profile is applied. The rest of the specified parameters replace the values of the profile.
Example of registering a text:
REQUEST:
https://api.safecreative.org/v2/
?authkey=1i5g2aaf2bz09lyo867cuimqg
&component=authkey.state
&sharedkey=zy9x4ol0ctg3btyswq7b5wi9
&ztime=1271749829192
&signature=508333b024993bbe54261a8c6713767dfe3ec9b1
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<authkeystate>
<authkey>1i5g2aaf2bz09lyo867cuimqg</authkey>
<level>MANAGE</level>
<noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey>
<usercode>0907100000018</usercode>
<authorized>true</authorized>
</authkeystate>
REQUEST:
https://api.safecreative.org/v2/
?allowdownload=1
&authkey=1i5g2aaf2bz09lyo867cuimqg
&component=work.register
&excerpt=An+important+text+about+registry+philosophy
&license=http%3A%2F%2Fcreativecommons.org%2Flicenses%2Fnc-sampling%2B%2F1.0%2F
&noncekey=4vrghpn0n8jxrrvoi3b7zta1c
&obs=More+info+at+%3Ca+href%3D%27http%3A%2F%2Fsafecreative.info%27%3Ehttp%3A%2F%2Fsafecreative.info%3C%2Fa%3E
®istrypublic=1
&tags=tag1%2C+tag2
&text=Text+to+be+registered
&title=My+first+registration
&usealias=1
&userauthor=1
&worktype=article
&ztime=1271749829429
&signature=0042020a7ffc118d189aa27a9b78d1962e781667
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<workregistry>
<code>1004200146109</code>
</workregistry>
result code:1004200146109
REMEMBER: You can use POST method instead of GET.
You can access some useful info with this code:
TOC