Work.changethumbnail
Changes the thhumbnail of a work.
The thumbnail image can be specified:
- with an upload ticket obtained from a previous upload (see work.upload.lookup)
- with an url where the image will be downloaded from
Using an upload ticket is a synchronous operation, the thumbnail will be changed as soon as the call ends. If you use an url, the call will end immediately and the download will be queued. Once the thumbnail is downloaded, it will be changed in the work.
The work must be in REGISTERED or PRE_REGISTERED state. If the work is PRE_REGISTERED and the work file is changed, the custom thumbnail will be lost and a new thumbnail will be generated from the new file.
If you are a partner, you can register a work as a copyright information provider (or informer). The authorizing user will be registered as informer and you must provide the authors' and copyright holders' names (see How to: Register a work as a copyright info provider).
Info
- Component name: work.changethumbnail
- Signature: Requires signature using the authkey's private key
- Timestamp: Requires ztime parameter
- Authorization level:
- MANAGE
- API trust level: Standard
Parameters
- authkey*: Authorization key
- ztime*: Z-Timestamp
- workcode*: Code of the work you want to modify
- uploadticket: upload ticket obtained from work.upload.commit or the upload servlet
- url: URL of the image to be used as thumbnail
You must use either the url or uploadticket parameters, but not both.
Returns
- restvalueresponse
- state: ready
Example
REQUEST:
https://api.safecreative.org/v2/ ?component=work.changethumbnail &authkey=1cae00nyf3z3ooi6hdcgqnmc5 &url=https%3A%2F%2Fgateway.pinata.cloud%2Fipfs%2FQmZP3nkJiAFyLAkRgZjcqjJWVg53ZyqfueftUzmB8g7Mio &workcode=2204200018744 &ztime=1650435290212 &signature=101e7fc8bc1c142a02141b3a369dd0572e381f75
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?> <restvalueresponse> <state>ready</state> </restvalueresponse>