Work.upload.commit: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
No edit summary
m 4 revisions imported
 
(One intermediate revision by one other user not shown)
Line 26: Line 26:
** '''uploadticket''': Upload ticket
** '''uploadticket''': Upload ticket


= Sample =
= Example =
REQUEST:
REQUEST:



Latest revision as of 08:07, 7 May 2021

Ends an upload-by-chunk process. You must send the SHA-1 hash of the uploaded file to checksum the upload.

This component must be called on an upload API server returned by work.upload.lookup.

This components returns an uploadticket to be used on other components like work.register.

Info

  • Component name: work.upload.commit
  • Signature: Requires signature using the authkey's private key
  • Timestamp: Requires ztime parameter
  • Authorization level: ADD
  • API trust level: Standard
  • API server: Upload server returned by work.upload.lookup

Parameters

  • authkey*: Authorization key of the work owner
  • ztime*: Z-Timestamp
  • uploadid*: Upload ID obtained from work.upload.lookup
  • length*: Uploaded file size
  • checksum*: Uploaded file SHA-1 hash

* Required parameter

Returns

  • workuploadcommit
    • uploadticket: Upload ticket

Example

REQUEST:

https://upload01.safecreative.org/v2/
?component=work.upload.commit
&authkey=1i5g2aaf2bz09lyo867cuimqg
&checksum=9f9e051a32f6a773335a0cc1d4cf94d17b49faa6
&length=14
&uploadid=3c33a96c-7743-43d0-9614-db70fa46d3ad
&ztime=1271749837035
&signature=f53cf9e21778719e599f6ad39bd85924ecb0bc23

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<workuploadcommit>
  <uploadticket>HvWIbGj7anAW8Nm6LoroakJAPHUjtW_CcZMI8QUOQ1jV2lkRW-jU27ukjPxRvTKk2bL0rOuFow2yiJtmLSvK_9iXZzC_c1CkcJYOSb0Kq8XOzk_CovkO4cfzzNa9NouQVeYoyO6UAXod9xI05wGlboss2jDrN974Z5qgSIjVTLtxDg1mdUFevdbdJXoJr_8T6NJEk3ZnlBXxgq3eEz7NvjvDKp_TDBWuj0UaUOJe_PtcMO0sHrZ5GIfM0yTPHSNE</uploadticket>
</workuploadcommit>