Work.attachfile: Difference between revisions
Jump to navigation
Jump to search
w>Jguillo Created page with 'Attaches a file to a work. File must be first uploaded using the upload components work.upload.lookup and then work.upload.begin, work.upload.chunk and [[work.uploa…' |
m 4 revisions imported |
||
(3 intermediate revisions by one other user not shown) | |||
Line 11: | Line 11: | ||
* '''Timestamp:''' Requires [[ztime parameter]] | * '''Timestamp:''' Requires [[ztime parameter]] | ||
* '''Authorization level:''' MANAGE | * '''Authorization level:''' MANAGE | ||
* '''API trust level''': Standard | |||
= Parameters = | = Parameters = | ||
Line 27: | Line 28: | ||
** '''state:''' ready | ** '''state:''' ready | ||
= | = Example = | ||
REQUEST: | REQUEST: | ||
Line 40: | Line 41: | ||
&'''ztime'''=1271749851064 | &'''ztime'''=1271749851064 | ||
&'''signature'''=26ecbbf2e886483516a42314979323db5cb69804 | &'''signature'''=26ecbbf2e886483516a42314979323db5cb69804 | ||
RESPONSE: | RESPONSE: |
Latest revision as of 08:07, 7 May 2021
Attaches a file to a work.
File must be first uploaded using the upload components work.upload.lookup and then work.upload.begin, work.upload.chunk and work.upload.commit or upload servlet, in the same way you would upload a work for registering. You will obtain an upload ticket to be used in this component
'File attachment' professional service must be active for the authorizing user.
Info
- Component name: work.attachfile
- Signature: Requires signature using the authorization key's private key
- Timestamp: Requires ztime parameter
- Authorization level: MANAGE
- API trust level: Standard
Parameters
- authkey*: Authorization key
- ztime*: Z-Timestamp
- public: 1 if the attachment is public (downloadable from the work public page). Not public by default.
- title*: Title of the attached file
- uploadticket*: Upload ticket obtained from work.upload.commit or upload servlet
- workcode*: Work code
* Required parameter
Returns
- restvalueresponse
- state: ready
Example
REQUEST:
https://api.safecreative.org/v2/ ?component=work.attachfile &authkey=1i5g2aaf2bz09lyo867cuimqg &public=1 &title=A+simple+attachment &uploadticket=HvWIbGj7anDefJK3tQHdPxp1swnY9x54Mr1xXCq40dg7SmFtNlOA6931SkqRyTtSaI-pk7zPbNymk_FIfu7EeH13-jBJKxHkZGJCVUsXd7S8gBqH8j-m8h18abRL1HIGOW1TiInUVAvf9uQoVbgbS-sLKCDM3BvZDO0rVJtv4wak5drfsxULmR6bc51phHvcRWVHcof1Des4FMh9dZKXCwVg_AypY2zq &workcode=1004200146116 &ztime=1271749851064 &signature=26ecbbf2e886483516a42314979323db5cb69804
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?> <restvalueresponse> <state>ready</state> </restvalueresponse>