Work.download: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
No edit summary
m (16 revisions imported)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Partner component to get the download URL for any work. The returned URL is only valid for a limited time.
Partner component to get the download URL for any work. The returned URL is only valid for a limited time.


Work must be publicly registered and allow downloads.  
Work must allow download or evaluation.  


This component must be accessed using an authkey from a partner application.
You must be a Safe Creative partner to use this component.  


= Info =
= Info =
* '''Component name:''' work.download
* '''Component name:''' work.download
* '''Signature:''' Requires signature using the authkey's private key
* '''Signature:''' Requires signature using the shared key's private key  
* '''Timestamp:''' ZTime is not required
* '''Timestamp:''' Requires ztime parameter
* '''Authorization level:''' GET
* '''API trust level''': Partner
* '''API trust level''': Partner


= Parameters =  
= Parameters =  
* '''authkey*:''' Authorization key
* '''sharedkey*:''' Your application shared key
* '''ztime*:''' Z-Timestamp
* '''code*:''' Work code
* '''code*:''' Work code


Line 20: Line 20:
= Returns =
= Returns =
* '''url''': Download URL
* '''url''': Download URL
* '''mimetype''': Mime Type
* '''type''': What will be downloaded from the URL
** '''ORIGINAL''': The original work
** '''EVALUATION''': An evaluation version of the work


= Sample =
= Example =
REQUEST:
REQUEST:


  <nowiki>https://api.safecreative.org/v2/</nowiki>
  <nowiki>https://api.safecreative.org/v2/</nowiki>
  ?'''component'''=work.download
  ?'''component'''=work.download
  &'''authkey'''=Bb7NTK14QGeHjluE3vziqQ
  &'''sharedkey'''=zy9x4ol0ctg3btyswq7b5wi9
  &'''code'''=1003030120266
  &'''code'''=1003030120266
  &'''signature'''=0c941f02e79c1265b4799bebb1b184c4875da070
&'''ztime'''=1271749826106
  &'''signature'''=3b2d5552b5cd969c370ce70dae280a76dc844895


RESPONSE:
RESPONSE:
Line 34: Line 39:
<pre>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<url>[...]</url>
<downloadinfo>
  <url>[...]</url>
  <mimetype>[...]</mimetype>
  <type>ORIGINAL</type>
</downloadinfo>
</pre>
</pre>


[[Category:API component]]
[[Category:API component]]

Latest revision as of 08:07, 7 May 2021

Partner component to get the download URL for any work. The returned URL is only valid for a limited time.

Work must allow download or evaluation.

You must be a Safe Creative partner to use this component.

Info

  • Component name: work.download
  • Signature: Requires signature using the shared key's private key
  • Timestamp: Requires ztime parameter
  • API trust level: Partner

Parameters

  • sharedkey*: Your application shared key
  • ztime*: Z-Timestamp
  • code*: Work code

* Required parameter

Returns

  • url: Download URL
  • mimetype: Mime Type
  • type: What will be downloaded from the URL
    • ORIGINAL: The original work
    • EVALUATION: An evaluation version of the work

Example

REQUEST:

https://api.safecreative.org/v2/
?component=work.download
&sharedkey=zy9x4ol0ctg3btyswq7b5wi9
&code=1003030120266
&ztime=1271749826106
&signature=3b2d5552b5cd969c370ce70dae280a76dc844895

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<downloadinfo>
  <url>[...]</url>
  <mimetype>[...]</mimetype>
  <type>ORIGINAL</type>
</downloadinfo>