Items‎ > ‎

bluemelon.items.exists

checks if an item exists among the authenticated user items and returns its id 

Authentication:

Yes (see here for details)

Arguments:

(required) long : size - the size of the item in bytes
(required) string : md5 - the MD5 hash of the file (a 32 digit hexadecimal number generated by the MD5 hash function having the file content as its input)
(required) string : publickey - the public key of an application
(required) string : token - the access token

Request Example:

http://www.bluemelon.com/api/rest/{api_sign}/
?method=bluemelon.items.exists&size=944236&md5=526926A491BD63FF6CD9D63005927547&publickey={publickey}&token={token}

Response Example:

<rsp status="ok" onrequest="bluemelon.items.exists">
<content>
<itemInfo>
<item id="62520" date="2009-04-05 11:12:06.0 CEST" filename="Lili (6).jpg" size="944236" etag="526926a491bd63ff6cd9d63005927547"
type="IMAGE" subtype="JPEG" title="Lili+%286%29.jpg" />
<itemcontainedin>
<folder id="1485" />
</itemcontainedin>
</itemInfo>
</content>
</rsp>

Error Codes:

4 - "Missing parameter"
5 - "Invalid parameter"
9 - "User not found"
11 - "Item not found"
12 - "Application not found"
14 - "Invalid accessToken"
16 - "Access token timed out.You must relogin."
17 - "Invalid call signature size"
18 - "Invalid call signature"
20 - "Missing api_sign"
603 - "Account recently expired or deleted"

Comments