Accept the current version of the terms and conditions.
@return | Currently accepted version of the terms and conditions. |
---|
POST /api/accept_terms/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<terms_version>Currently accepted version of the terms and conditions.</terms_version>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ACCEPT_TERMS_FATAL_1</code>
<message>Access denied.</message>
</response>
Activate the given user account.
@param | string | code | The activation code sent to the user by an email message. |
---|---|---|---|
@return | The user authentication/session token (WST). |
POST /api/activate/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
code={The activation code sent to the user by an email message.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<token>The user authentication/session token (WST).</token>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ACTIVATE_FATAL_1</code>
<message>Invalid code.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ACTIVATE_FATAL_2</code>
<message>Session cannot be created.</message>
</response>
Add a new comment to the given file.
@param | string | file_ident | The file identifier. |
---|---|---|---|
@param | string | body | The body of the comment. |
POST /api/add_file_comment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
file_ident={The file identifier.}&body={The body of the comment.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_FATAL_2</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_FATAL_3</code>
<message>Comment cannot be saved.</message>
</response>
Add a vote to the given file comment. In order to vote a user has to be authenticated. A single user can vote only once for a single comment.
@param | string | file_comment_ident | The file comment identifier. |
---|---|---|---|
@param | int | type | The type of the vote (0 -> negative, 1 -> positive). |
POST /api/add_file_comment_vote/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
file_comment_ident={The file comment identifier.}&type={The type of the vote (0 -> negative, 1 -> positive).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_VOTE_FATAL_1</code>
<message>You have to be authenticated in order to vote.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_VOTE_FATAL_2</code>
<message>File comment not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_VOTE_FATAL_3</code>
<message>You have already voted.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_COMMENT_VOTE_FATAL_4</code>
<message>Vote cannot be saved.</message>
</response>
Add a vote to the given file.
@param | string | file_ident | The file identifier. |
---|---|---|---|
@param | int | type | The type of the vote (0 -> negative, 1 -> positive). |
POST /api/add_file_vote/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
file_ident={The file identifier.}&type={The type of the vote (0 -> negative, 1 -> positive).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_VOTE_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_VOTE_FATAL_2</code>
<message>You have already voted.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_FILE_VOTE_FATAL_3</code>
<message>Vote cannot be saved.</message>
</response>
Add a new feedback message.
@param | string | subject | The subject of the feedback message. |
---|---|---|---|
@param | string | message | The contents of the feedback message. |
@param | string | [optional] The user's email address. | |
@param | string | name | [optional] The user's name. |
@param | string | uri | [optional] The URI from which the feedback was sent. |
POST /api/add_user_message/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
subject={The subject of the feedback message.}&message={The contents of the feedback message.}&email={[optional] The user's email address.}&name={[optional] The user's name.}&uri={[optional] The URI from which the feedback was sent.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_USER_FEEDBACK_1</code>
<message>User feedback cannot be added.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_USER_FEEDBACK_2</code>
<message>Missing email address.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ADD_USER_FEEDBACK_3</code>
<message>Missing message body.</message>
</response>
Get available billing country list.
@return | The list of a billing country. |
---|
POST /api/billing_country/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<country>
<name>The country name.</name>
<tin_regexp>The country id.</tin_regexp>
<id>The country id.</id>
</country>
</response>
Get the current user billing's details.
@return | The current user billing's details. |
---|
POST /api/billing_details/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<billing_detail>
<company_name>The billing company name</company_name>
<email>The billing email</email>
<crn>The billing company identification number</crn>
<vat_number>The billing vat identification number</vat_number>
<address1>The billing address1</address1>
<address2>The billing address2</address2>
<zip>The billing zipcode</zip>
<city>The billing city</city>
<region>The billing state/region</region>
<country>The billing country</country>
<specific_symbol>The billing specific symbol</specific_symbol>
<created>The billing details created</created>
</billing_detail>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>BILLING_DETAILS_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>BILLING_DETAILS_FATAL_2</code>
<message>Not found.</message>
</response>
Get the billing's details from ARES.
@param | int | ic | identification number |
---|---|---|---|
@return | The billing's details from ARES. |
POST /api/billing_details_from_ares/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ic={identification number}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<ares_detail>
<name>The billing name</name>
<in>The billing identification number</in>
<tin>The billing tax identification number</tin>
<addr_street>The billing street name</addr_street>
<addr_street_nr>The billing street number</addr_street_nr>
<addr_house_nr>The billing house number</addr_house_nr>
<addr_zip>The billing zipcode</addr_zip>
<addr_city>The billing city</addr_city>
<addr_country>The billing country</addr_country>
</ares_detail>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>BILLING_DETAILS_FROM_ARES_1</code>
<message>Access denied.</message>
</response>
Get the billing's details from VIES.
@param | int|string | vat | identification number |
---|---|---|---|
@param | string | country | (optional) country code ( [A-Z]{2} ) |
@return | The billing's details from VIES. |
POST /api/billing_details_from_vies/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
vat={identification number}&country={(optional) country code ( [A-Z]{2} )}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<vies_detail>
<name>The company name</name>
<tin>The billing vat identification number</tin>
<addr1>The company address</addr1>
<addr_city>The company city</addr_city>
<addr_zip>The company zipcode</addr_zip>
<addr_country>The company country</addr_country>
<valid>is valid vat number</valid>
</vies_detail>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>BILLING_DETAILS_FROM_VIES_1</code>
<message>Access denied.</message>
</response>
Get the billing's list of payments.
@param | int | offset | [optional] The list offset. |
---|---|---|---|
@param | int | limit | [optional] The maximum of listed files. |
@return | The billing's list of payments. |
POST /api/billing_payments/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
offset={[optional] The list offset.}&limit={[optional] The maximum of listed files.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<payment>
<source>Is voucher or payment</source>
<payment_id>The ID of the payment</payment_id>
<user_id>The identification of user</user_id>
<created>Date and Time of payment created</created>
<amount>The payment amount</amount>
<months>The number of pay mounths</months>
<extra_days>The bonus extra days</extra_days>
<confirmed_at>Date and Time confirmation of payment</confirmed_at>
<aborted>Is payment aborted ?</aborted>
<currency>The currency of payment</currency>
<file>The url of invoice file</file>
</payment>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>BILLING_PAYMENTS_FATAL_1</code>
<message>Access denied.</message>
</response>
Cancel given file upload.
@param | string | file_ident | The file identifier. |
---|
POST /api/cancel_upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
file_ident={The file identifier.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CANCEL_UPLOAD_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CANCEL_UPLOAD_FATAL_2</code>
<message>Invalid or no file identifier.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CANCEL_UPLOAD_FATAL_3</code>
<message>Upload already finished.</message>
</response>
Clear a file password.
@param | string | ident | The identifier of the file which password should be cleared. |
---|
POST /api/clear_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file which password should be cleared.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CLEAR_FILE_PASSWORD_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CLEAR_FILE_PASSWORD_FATAL_2</code>
<message>File not found.</message>
</response>
Clear the download history of the current user.
@param | int[] | ids | [optional] The list of IDs of the records to be deleted. |
---|
POST /api/clear_history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ids={[optional] The list of IDs of the records to be deleted.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CLEAR_HISTORY_FATAL_1</code>
<message>History cannot been cleared.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CLEAR_HISTORY_FATAL_2</code>
<message>Access denied.</message>
</response>
Confirm an SMS payment.
@param | string | code | The SMS payment confirmation code. |
---|
POST /api/confirm_sms_payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
code={The SMS payment confirmation code.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CONFIRM_SMS_PAYMENT_FATAL_1</code>
<message>Invalid code.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CONFIRM_SMS_PAYMENT_FATAL_2</code>
<message>Message not yet delivered.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CONFIRM_SMS_PAYMENT_FATAL_3</code>
<message>Missing payment.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CONFIRM_SMS_PAYMENT_FATAL_4</code>
<message>Code already used.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CONFIRM_SMS_PAYMENT_FATAL_5</code>
<message>Payment cancelled.</message>
</response>
Create a new folder.
@param | string | path | The path to the folder. Parent folders are created automatically if necessary. |
---|---|---|---|
@param | int | private | Tells whether the folder should be private (0 -> no, 1 -> yes). |
@return | The identifier of the newly created folder and its sanitized name. |
POST /api/create_folder/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
path={The path to the folder. Parent folders are created automatically if necessary.}&private={Tells whether the folder should be private (0 -> no, 1 -> yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<ident>The identifier of the newly created folder.</ident>
<name>Sanitized name of the newly created folder.</name>
<path>The path to the newly created folder.</path>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CREATE_FOLDER_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>CREATE_FOLDER_FATAL_4</code>
<message>Folder cannot be created.</message>
</response>
Remove the given file from the download queue.
@param | string | ident | The identifier of the file. |
---|
POST /api/dequeue_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>DEQUEUE_FILE_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>DEQUEUE_FILE_FATAL_2</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>DEQUEUE_FILE_FATAL_3</code>
<message>File cannot be DEQUEUEd.</message>
</response>
Get the list of user comments for the given file.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | string | password | [optional] The file password digest SHA1(MD5_CRYPT(password)). |
@return | The list of user comments for the given file. |
POST /api/file_comments/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&password={[optional] The file password digest SHA1(MD5_CRYPT(password)).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<comment>
<ident>The identifier of the comment.</ident>
<created>The date and time when the comment was created.</created>
<body>The body of the comment.</body>
<username>The username of the user who sent the comment.</username>
<positive_votes>The number of positive votes.</positive_votes>
<negative_votes>The number of negative votes.</negative_votes>
</comment>
</response>
Tell whether or not the given file exists.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@return | 1 if the given file exists, 0 otherwise. |
POST /api/file_exists/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<exists>1 if the given file exists, 0 otherwise.</exists>
<downloadable>1 if the given file is currently downloadable, 0 otherwise.</downloadable>
</response>
Get information about the given file.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | string | password | [optional] File password digest SHA1(MD5_CRYPT(password)). |
@param | int | maybe_removed | [optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes). |
@return | Information about the given file. |
POST /api/file_info/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&password={[optional] File password digest SHA1(MD5_CRYPT(password)).}&maybe_removed={[optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<name>The name of the file.</name>
<description>The description of the file.</description>
<size>The size of the file in bytes.</size>
<type>The extension of the file.</type>
<adult>Tells whether the file is an explicit adult content (0 -> No, 1 -> Yes).</adult>
<queued>Tells whether the file is queued for later download.</queued>
<positive_votes>The number of positive votes.</positive_votes>
<negative_votes>The number of negative votes.</negative_votes>
<available>Tells whether the file is available for download (0 -> No, 1 -> Yes).</available>
<password>Tells whether or not the file is password protected (0 -> No, 1 -> Yes).</password>
<removed>Tells whether or not the file was removed (0 -> No, 1 -> Yes).</removed>
<removed_at>When the file was removed.</removed_at>
<removal_reason>Tells why the file was removed.</removal_reason>
<copyrighted>Tells if the file possibly contains a copyrighted content (0 -> No, 1 -> Yes).</copyrighted>
<stripe_count>The number of the file previews.</stripe_count>
<stripe>The URL of the file preview stripe.</stripe>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_INFO_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_INFO_FATAL_2</code>
<message>Incorrect password.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_INFO_FATAL_3</code>
<message>Non-public file, possibly copyrighted content.</message>
</response>
Get a direct download link of the given file.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | string | password | [optional] The file password digest (SHA1(MD5_CRYPT(password))). |
@param | string | download_type | [optional] The type of download (file_download, video_stream, audio_stream). |
@param | string | device_uuid | [optional] The UUID of the device which requests the download. |
@param | string | device_vendor | [optional] The vendor of the device which requests the download. |
@param | string | device_model | [optional] The model of the device which requests the download. |
@param | int | device_res_x | [optional] The horizontal resolution of the device which requests the download. |
@param | int | device_res_y | [optional] The vertical resolution of the device which requests the download. |
@param | int | force_https | [optional] Whether or not to force HTTPS protocol (0 -> No, 1 -> Yes). |
@return | A direct download link of the given file. |
POST /api/file_link/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&password={[optional] The file password digest (SHA1(MD5_CRYPT(password))).}&download_type={[optional] The type of download (file_download, video_stream, audio_stream).}&device_uuid={[optional] The UUID of the device which requests the download.}&device_vendor={[optional] The vendor of the device which requests the download.}&device_model={[optional] The model of the device which requests the download.}&device_res_x={[optional] The horizontal resolution of the device which requests the download.}&device_res_y={[optional] The vertical resolution of the device which requests the download.}&force_https={[optional] Whether or not to force HTTPS protocol (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<link>A direct download link of the given file.</link>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_LINK_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_LINK_FATAL_3</code>
<message>Incorrect password.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_LINK_FATAL_4</code>
<message>File temporarily unavailable.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_LINK_FATAL_5</code>
<message>Too many running downloads on too many devices.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_LINK_FATAL_6</code>
<message>Non-public file, possibly copyrighted content.</message>
</response>
Get password salt of the given file.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | int | maybe_removed | [optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes). |
@return | The password salt of the given file. |
POST /api/file_password_salt/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&maybe_removed={[optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<salt>The password salt of the given file.</salt>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_PASSWORD_SALT_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_PASSWORD_SALT_FATAL_2</code>
<message>No password set.</message>
</response>
Tell whether or not the given file is password protected.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | int | maybe_removed | [optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes). |
@return | 1 if the given file is password protected, 0 otherwise. |
POST /api/file_protected/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&maybe_removed={[optional] Tells whether or not the file may be removed (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<protected>1 if the given file is password protected, 0 otherwise.</protected>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILE_PROTECTED_FATAL_1</code>
<message>File not found.</message>
</response>
Get the list of a user's files and folders.
@param | string | path | The folder path. |
---|---|---|---|
@param | string | sort_by | [optional] How the list should be sorted (name, size, downloads, created). |
@param | string | sort_order | [optional] How to order items in the list (asc, desc). |
@param | int | private | [optional] Tells whether to get a list of private files/folders (0 -> No, 1 -> Yes). |
@param | string | search | [optional] A term to be searched within file/folder names. |
@param | int | include_removed | [optional] Tells whether or not to include removed items in the list (0 -> No, 1 -> Yes). |
@param | int | limit | [optional] The maximum of items loaded. |
@param | int | offset | [optional] The loaded items offset. |
@return | The list of a user's files and folders. |
POST /api/files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
path={The folder path.}&sort_by={[optional] How the list should be sorted (name, size, downloads, created).}&sort_order={[optional] How to order items in the list (asc, desc).}&private={[optional] Tells whether to get a list of private files/folders (0 -> No, 1 -> Yes).}&search={[optional] A term to be searched within file/folder names.}&include_removed={[optional] Tells whether or not to include removed items in the list (0 -> No, 1 -> Yes).}&limit={[optional] The maximum of items loaded.}&offset={[optional] The loaded items offset.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<folder>
<ident>The folder identifier.</ident>
<name>The folder name.</name>
<created>The date and time of creation.</created>
<removed>Tells whether or not the folder was removed (0 -> No, 1 -> Yes).</removed>
<removed_at>When the folder was removed.</removed_at>
<path>Path to this folder.</path>
<parent>Identifier of this folder's parent. Present only if it isn't root.</parent>
</folder>
<file>
<ident>The file identifier.</ident>
<name>The file name.</name>
<size>The file size.</size>
<downloads>The number of downloads.</downloads>
<type>The file type.</type>
<created>The date and time of creation.</created>
<state>The file state.</state>
<password>Tells whether or not the file is password protected (0 -> No, 1 -> Yes).</password>
<removed>Tells whether or not the file was removed (0 -> No, 1 -> Yes).</removed>
<removed_at>When the file was removed.</removed_at>
<path>Path to this file.</path>
<parent>Identifier of this file's parent. Present only if the parent isn't root.</parent>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILES_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILES_FATAL_2</code>
<message>No such path.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FILES_FATAL_3</code>
<message>That is not a folder.</message>
</response>
Get files from the given folder.
@param | string | ident | The identifier of the folder. |
---|---|---|---|
@param | int | limit | [optional] The maximum of items loaded. |
@param | int | offset | [optional] The loaded items offset. |
@return | The files from the given folder. |
POST /api/folder/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the folder.}&limit={[optional] The maximum of items loaded.}&offset={[optional] The loaded items offset.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<name>The name of the folder.</name>
<total>The number of found files.</total>
<size>The total size of all files in the folder.</size>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
<copyrighted>Tells if the file possibly contains a copyrighted content (0 -> No, 1 -> Yes).</copyrighted>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FOLDER_FATAL_1</code>
<message>Folder not found.</message>
</response>
Get a direct download link of the given folder (the folder contents are served in a ZIP archive).
@param | string | ident | The identifier of the folder. |
---|---|---|---|
@return | A direct download link of the given folder. |
POST /api/folder_link/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the folder.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<link>A direct download link of the given folder.</link>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FOLDER_LINK_FATAL_1</code>
<message>Folder not found.</message>
</response>
Get the list of all documented API functions.
@return | The list of all documented API functions. |
---|
POST /api/help/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<function>
<name>The name of the function.</name>
<args>The list of arguments.</args>
<desc>The description of the function.</desc>
<args_details>
<arg>
<name>Name of this argument.</name>
<type>Type of this argument.</type>
<desc>Description of this argument.</desc>
</arg>
</args_details>
<return>Description of the return value.</return>
<response>Contains individual response properties and their descriptions.</response>
<error>
<status>Error status.</status>
<code>The unique code of this error.</code>
<message>Description of this error.</message>
</error>
</function>
</response>
Get download history of a user.
@param | int | offset | The list offset. |
---|---|---|---|
@param | int | limit | The maximum of listed files. |
@return | Download history of a user. |
POST /api/history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
offset={The list offset.}&limit={The maximum of listed files.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<total>The number of all downloads in the history.</total>
<file>
<download_id>The download ID.</download_id>
<ident>The downloaded file identifier.</ident>
<name>The downloaded file name.</name>
<size>The downloaded file size.</size>
<started_at>The time when the download started.</started_at>
<ended_at>The time when the download ended.</ended_at>
<ip_address>IP address from which this download originated.</ip_address>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
<copyrighted>Tells if the file possibly contains a copyrighted content (0 -> No, 1 -> Yes).</copyrighted>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>HISTORY_FATAL_1</code>
<message>Access denied.</message>
</response>
Authenticate a user.
@param | string | username_or_email | The username or email address of the user. |
---|---|---|---|
@param | string | password | The user's password digest SHA1(MD5_CRYPT(password)). |
@param | int | keep_logged_in | Tells whether to keep the user authenticated for a longer period of time (0 -> No, 1 -> Yes). |
@return | A session security token (WST). |
POST /api/login/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
username_or_email={The username or email address of the user.}&password={The user's password digest SHA1(MD5_CRYPT(password)).}&keep_logged_in={Tells whether to keep the user authenticated for a longer period of time (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<token>A session security token (WST).</token>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>LOGIN_FATAL_2</code>
<message>Access to the beta version is restricted for selected users only.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>LOGIN_FATAL_3</code>
<message>The user account is disabled or banned.</message>
</response>
Log out the currently logged user.
POST /api/logout/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
Log out the currently logged user on all the devices.
POST /api/logout_all_devices/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>LOGOUT_ALL_DEVICES_1</code>
<message>Access denied.</message>
</response>
Log out the currently logged user on all other devices.
POST /api/logout_other_devices/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>LOGOUT_OTHER_DEVICES_1</code>
<message>Access denied.</message>
</response>
Move the given file or folder to another destination. The destination file or folder will be overwritten.
@param | string | src | The source path of the file or folder. |
---|---|---|---|
@param | string | dest | The path of the destination folder to which the file should be moved (it does not need to exist). |
@param | int | private | [optional] Tells whether or not both the source and the destination are private (0 -> No, 1 -> Yes). |
@param | int | src_private | [optional] Tells whether or not the source path is private (0 -> No, 1 -> Yes). |
@param | int | dest_private | [optional] Tells whether or not the destination folder is private (0 -> No, 1 -> Yes). |
POST /api/move_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
src={The source path of the file or folder.}&dest={The path of the destination folder to which the file should be moved (it does not need to exist).}&private={[optional] Tells whether or not both the source and the destination are private (0 -> No, 1 -> Yes).}&src_private={[optional] Tells whether or not the source path is private (0 -> No, 1 -> Yes).}&dest_private={[optional] Tells whether or not the destination folder is private (0 -> No, 1 -> Yes).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>MOVE_FILE_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>MOVE_FILE_FATAL_3</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>MOVE_FILE_FATAL_4</code>
<message>Not enough free space in the destination folder.</message>
</response>
Get the news.
@param | integer | last_id | The ID of the last received news. |
---|---|---|---|
@param | string | lang | [optional] News language (CZ, SK, PL or EN). |
@return | The news. |
POST /api/news/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
last_id={The ID of the last received news.}&lang={[optional] News language (CZ, SK, PL or EN).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<news>
<id>The news ID.</id>
<created>The date of creation.</created>
<title>The title of the news.</title>
<body>The body of the news.</body>
<link>The link.</link>
</news>
</response>
Initiate a new payment.
@param | string | method | Payment method (card, transfer, points). |
---|---|---|---|
@param | int | months | The number of months to pay for. |
@param | string | country | [optional] Country code (cz -> default or sk), currently relevant only for transfer method. |
@return | A URL to which the user should be redirected to. |
POST /api/payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
method={Payment method (card, transfer, points).}&months={The number of months to pay for.}&country={[optional] Country code (cz -> default or sk), currently relevant only for transfer method.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<url>A URL to which the user should be redirected to.</url>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>PAYMENT_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>PAYMENT_FATAL_2</code>
<message>No payment method selected.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>PAYMENT_FATAL_3</code>
<message>Unknown payment method.</message>
</response>
Get a user's download queue.
@param | int | offset | The list offset. |
---|---|---|---|
@param | int | limit | The maximum of listed files. |
@return | A user's download queue. |
POST /api/queue/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
offset={The list offset.}&limit={The maximum of listed files.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<total>The number of all downloads in the queue.</total>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<size>The size of the file.</size>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<downloaded>Tells whether or not this file was downloaded by the user (0 -> No, 1 -> Yes).</downloaded>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>QUEUE_FATAL_1</code>
<message>Access denied.</message>
</response>
Add the given file to the download queue.
@param | string | ident | The identifier of the file. |
---|
POST /api/queue_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>QUEUE_FILE_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>QUEUE_FILE_FATAL_2</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>QUEUE_FILE_FATAL_3</code>
<message>File cannot be queued.</message>
</response>
Create a new user account.
@param | string | username | New user's (nick)name. |
---|---|---|---|
@param | string | New user's email address. | |
@param | string | password | New user's password or its hash (MD5Crypt). |
@param | string | affil_id | [optional] Affiliate ID. |
@param | string | recommend | [optional] Identifier of the user who recommended WS. |
@return | The user authentication/session token (WST). |
POST /api/register/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
username={New user's (nick)name.}&email={New user's email address.}&password={New user's password or its hash (MD5Crypt).}&affil_id={[optional] Affiliate ID.}&recommend={[optional] Identifier of the user who recommended WS.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<token>The user authentication/session token (WST).</token>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>ERROR</status>
<code>REGISTER_ERROR_1</code>
<message>User has been registered but session cannot be created.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REGISTER_FATAL_1</code>
<message>Invalid credentials.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REGISTER_FATAL_2</code>
<message>User already exists.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REGISTER_FATAL_3</code>
<message>User cannot be registered.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REGISTER_FATAL_4</code>
<message>Suspicious activity detected.</message>
</response>
Starts a new remote upload.
@param | string | url | The remote file URL. |
---|---|---|---|
@param | string | uri | [optional] Alias for the file URL (use either one but not both). |
@return | Information about the remote file. |
POST /api/remote_upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
url={The remote file URL.}&uri={[optional] Alias for the file URL (use either one but not both).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<file_name>The name of the remote file.</file_name>
<file_size>The size of the remote file.</file_size>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REMOTE_UPLOAD_FATAL_3</code>
<message>Remote uploads are temporarily unavailable.</message>
</response>
Remove the given file or folder.
@param | string | ident | The identifier of the file or folder. |
---|
POST /api/remove_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file or folder.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REMOVE_FILE_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REMOVE_FILE_FATAL_2</code>
<message>File cannot be removed.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>REMOVE_FILE_FATAL_3</code>
<message>File not found.</message>
</response>
Rename the given file or folder.
@param | string | ident | The identifier of the file or folder. |
---|---|---|---|
@param | string | name | The new name of the file or folder. |
@return | The new name of the file or folder. |
POST /api/rename_file/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file or folder.}&name={The new name of the file or folder.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<new_name>The new (possibly sanitized) name of the file or folder.</new_name>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RENAME_FILE_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RENAME_FILE_FATAL_3</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RENAME_FILE_FATAL_4</code>
<message>File cannot be renamed.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RENAME_FILE_FATAL_6</code>
<message>Blacklisted file name and/or size.</message>
</response>
Reset a user password.
@param | string | email_or_username | The email address or username of the user. |
---|---|---|---|
@param | string | lang | [optional] Language. |
POST /api/reset_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
email_or_username={The email address or username of the user.}&lang={[optional] Language.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RESET_PASSWORD_FATAL_1</code>
<message>User not found.</message>
</response>
Get the list of downloads that are currently running via this user account.
@return | That list of downloads that are currently running via this user account. |
---|
POST /api/running_downloads/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<download>
<type>Type of this download.</type>
<client>
<ip_address>IP address of the client device.</ip_address>
<browser>Name and version of the client browser.</browser>
<platform>Name of the operating system on which the client browser is running.</platform>
</client>
<file>
<ident>Identifier of the file that is being downloaded.</ident>
<name>Name of the file that is being downloaded.</name>
<size>Size (in bytes) of the file that is being downloaded.</size>
<password>Tells whether or not the file is password protected (0 -> No, 1 -> Yes).</password>
<copyrighted>Tells if the file possibly contains a copyrighted content (0 -> No, 1 -> Yes).</copyrighted>
</file>
</download>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>RUNNING_DOWNLOADS_FATAL_1</code>
<message>Access denied.</message>
</response>
Get the given user's password salt.
@param | string | username_or_email | The username or email address of the user. |
---|---|---|---|
@return | The given user's password salt. |
POST /api/salt/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
username_or_email={The username or email address of the user.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<salt>The given user's password salt.</salt>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SALT_FATAL_1</code>
<message>User not found.</message>
</response>
Search files.
@param | string | what | The text to be searched within file names. |
---|---|---|---|
@param | string | sort | [optional] How the search results should be sorted (recent, rating, largest, smallest). |
@param | int | limit | [optional] The maximum of the number of found files. |
@param | int | offset | [optional] The search results offset. |
@param | string | category | [optional] The category of searched files (video, images, audio, docs, archives). |
@return | The list of found files. |
POST /api/search/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
what={The text to be searched within file names.}&sort={[optional] How the search results should be sorted (recent, rating, largest, smallest).}&limit={[optional] The maximum of the number of found files.}&offset={[optional] The search results offset.}&category={[optional] The category of searched files (video, images, audio, docs, archives).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<total>The number of found files.</total>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<queued>Tells whether the file was queued for later download.</queued>
<positive_votes>The number of positive votes.</positive_votes>
<negative_votes>The number of negative votes.</negative_votes>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
</file>
</response>
Send e-mail message with activation code to the user's e-mail address.
POST /api/send_activation_code/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SEND_ACTIVATION_CODE_1</code>
<message>Access denied.</message>
</response>
Get the current user's session history.
@return | The current user's session history. |
---|
POST /api/session_history/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<record>
<created>When the session was created.</created>
<ip_address>The IP address from which the session was created.</ip_address>
<browser>The browser from which the session was created.</browser>
<platform>Name of the operating system on which the browser is running.</platform>
<country_code>The code of the country from which the session was created.</country_code>
<country_name>The name of the country from which the session was created.</country_name>
</record>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SESSION_HISTORY_FATAL_1</code>
<message>Access denied.</message>
</response>
Set the billing's details.
@param | string | company_name | The billing name (compamy name). |
---|---|---|---|
@param | string | address1 | The billing street name. |
@param | string | address2 | The billing additional address. |
@param | string | zip | The billing zipcode. |
@param | string | city | The billing city. |
@param | string | region | The billing state/region. |
@param | string | country | The billing country. |
@param | number | crn | [optional] The billing identification number. |
@param | number | vat_number | [optional] The billing tax identification number. |
POST /api/set_billing_details/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
company_name={The billing name (compamy name).}&address1={The billing street name.}&address2={The billing additional address.}&zip={The billing zipcode.}&city={The billing city.}®ion={The billing state/region.}&country={The billing country.}&crn={[optional] The billing identification number.}&vat_number={[optional] The billing tax identification number.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_BILLING_DETAILS_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_BILLING_DETAILS_FATAL_2</code>
<message>Failed to save billing details.</message>
</response>
Set a file password.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | string | password | The file password digest (MD5_CRYPT(password)). |
POST /api/set_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&password={The file password digest (MD5_CRYPT(password)).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_FILE_PASSWORD_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_FILE_PASSWORD_FATAL_2</code>
<message>File not found.</message>
</response>
Set the current user's email address.
@param | string | The new email address of the user. |
---|
POST /api/set_user_email/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
email={The new email address of the user.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_EMAIL_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_EMAIL_FATAL_2</code>
<message>Email is already taken.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_EMAIL_FATAL_3</code>
<message>User email cannot be set.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_EMAIL_FATAL_4</code>
<message>Invalid email address format.</message>
</response>
Set the current user's password.
@param | string | old_password | The old password digest (MD5CRYPT(password)) of the user. |
---|---|---|---|
@param | string | new_password | The new password digest (MD5CRYPT(password)) of the user. |
POST /api/set_user_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
old_password={The old password digest (MD5CRYPT(password)) of the user.}&new_password={The new password digest (MD5CRYPT(password)) of the user.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_PASSWORD_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_PASSWORD_FATAL_2</code>
<message>Incorrect password.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>SET_USER_PASSWORD_FATAL_3</code>
<message>User password cannot be set.</message>
</response>
Search similar files.
@param | string | what | The text to be searched within file names. |
---|---|---|---|
@param | string | sort | [optional] How the search results should be sorted (recent, rating, largest, smallest). |
@param | int | limit | [optional] The maximum of the number of found files. |
@param | int | offset | [optional] The search results offset. |
@param | string | category | [optional] The category of searched files (video, images, audio, docs, archives). |
@return | The list of found files. |
POST /api/similar_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
what={The text to be searched within file names.}&sort={[optional] How the search results should be sorted (recent, rating, largest, smallest).}&limit={[optional] The maximum of the number of found files.}&offset={[optional] The search results offset.}&category={[optional] The category of searched files (video, images, audio, docs, archives).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<subtitles>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<queued>Tells whether the file was queued for later download.</queued>
</file>
</subtitles>
<next_episode>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<queued>Tells whether the file was queued for later download.</queued>
</file>
</next_episode>
<similar>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<queued>Tells whether the file was queued for later download.</queued>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
</file>
</similar>
</response>
Suggest file names to search.
@param | string | what | The phrase to be searched for. |
---|---|---|---|
@param | int | limit | [optional] The maximum of the number of suggestions. |
@return | The list of suggestions. |
POST /api/suggest/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
what={The phrase to be searched for.}&limit={[optional] The maximum of the number of suggestions.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<suggestion>
<value>A suggestion text value.</value>
</suggestion>
</response>
Create a new file bundle.
@param | string[] | idents | The list of identifiers of the files to be bundled. |
---|---|---|---|
@return | The identifier of the newly created file bundle. |
POST /api/tie_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
idents={The list of identifiers of the files to be bundled.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<ident>The identifier of the newly created file bundle.</ident>
</response>
Get files from the given bundle.
@param | string | ident | The identifier of the bundle. |
---|---|---|---|
@return | The files from the given bundle. |
POST /api/tied_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the bundle.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<total>The number of found files.</total>
<size>The total size of all files in the bundle.</size>
<file>
<ident>The identifier of the file.</ident>
<name>The name of the file.</name>
<type>The type of the file.</type>
<img>The preview of the file.</img>
<stripe>The preview stripe.</stripe>
<stripe_count>The number of previews in the stripe.</stripe_count>
<size>The size of the file.</size>
<password>Tells whether or not the file is password-protected (0 -> No, 1 -> Yes).</password>
<copyrighted>Tells if the file possibly contains a copyrighted content (0 -> No, 1 -> Yes).</copyrighted>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>FOLDER_FATAL_1</code>
<message>Folder not found.</message>
</response>
Get a direct download link of the given file group (all the files in the group are served in a ZIP archive).
@param | string | ident | The identifier of the file group. |
---|---|---|---|
@return | A direct download link of the given file group. |
POST /api/tied_files_link/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file group.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<link>A direct download link of the given file group.</link>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>TIED_FILES_LINK_FATAL_1</code>
<message>File group not found.</message>
</response>
Enable/disable automatic file downloads.
@return | 1 if automatic file downloads were enabled, 0 otherwise. |
---|
POST /api/toggle_auto_download/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<enabled>1 if automatic file downloads were enabled, 0 otherwise.</enabled>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>TOGGLE_AUTO_DOWNLOAD_FATAL_1</code>
<message>Access denied.</message>
</response>
Enable/disable HTTPS for file downloads.
@return | 1 if HTTPS was enabled, 0 otherwise. |
---|
POST /api/toggle_https_download/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<enabled>1 if HTTPS was enabled, 0 otherwise.</enabled>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>TOGGLE_HTTPS_DOWNLOAD_FATAL_1</code>
<message>Access denied.</message>
</response>
Process the uploaded file.
@param | string | ident | [optional] The identifier of the uploaded file. |
---|---|---|---|
@param | int | total | [optional] The total size of the uploaded file. |
@param | int | offset | [optional] The position to which seek the file pointer. |
@param | string | description | [optional] The description of the uploaded file. |
@return | The result of the operation. |
POST /api/upload/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={[optional] The identifier of the uploaded file.}&total={[optional] The total size of the uploaded file.}&offset={[optional] The position to which seek the file pointer.}&description={[optional] The description of the uploaded file.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<ident>The identifier of the uploaded file.</ident>
</response>
Get an upload progress.
@param | string | file_ident | The file identifier. |
---|---|---|---|
@return | The upload progress. |
POST /api/upload_progress/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
file_ident={The file identifier.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<uploaded_bytes>Number of uploaded bytes so far.</uploaded_bytes>
<done>Tells whether or not the file upload is done (0 -> No, 1 -> Yes).</done>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>UPLOAD_PROGRESS_FATAL_1</code>
<message>File not found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>UPLOAD_PROGRESS_FATAL_2</code>
<message>Invalid or no file identifier.</message>
</response>
Get a URL which files should be uploaded to.
@return | A URL which files should be uploaded to. |
---|
POST /api/upload_url/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<url>A URL which files should be uploaded to.</url>
</response>
Get list of all the files uploaded by a user.
@param | int | limit | [optional] The maximum items loaded. |
---|---|---|---|
@param | int | offset | [optional] The loaded items offset. |
POST /api/uploads/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
limit={[optional] The maximum items loaded.}&offset={[optional] The loaded items offset.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<file>
<ident>The file identifier.</ident>
<name>The file name.</name>
<size>The file size.</size>
<type>The file type.</type>
<uploaded>The date and time of upload.</uploaded>
<state>The file state.</state>
<downloads>The number of downloads.</downloads>
<password>Tells whether or not the file is password protected (0 -> No, 1 -> Yes).</password>
<path>The current path to the file.</path>
</file>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>UPLOADS_FATAL_1</code>
<message>Access denied.</message>
</response>
Get the current user's data.
@return | The current user's data. |
---|
POST /api/user_data/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<id>The ID of the user.</id>
<ident>The identifier of the user.</ident>
<username>The username of the user.</username>
<email>The email address of the user.</email>
<points>The number of points collected by the user.</points>
<files>The number of files the user currently has.</files>
<bytes>The total size in bytes of all the user's files.</bytes>
<score_files>The number of the user's files which have been downloaded by other users.</score_files>
<score_bytes>The total size of all the user's files which have been downloaded by other users.</score_bytes>
<private_files>The number of private files the user currently has.</private_files>
<private_bytes>The total size in bytes of all the user's private files.</private_bytes>
<private_space>The size in bytes of the user's private space.</private_space>
<tester>Tells whether the user is a tester (0 -> No, 1 -> Yes).</tester>
<vip>Tells whether the user is a VIP (0 -> No, 1 -> Yes).</vip>
<vip_days>The number of days for which the user remain a VIP.</vip_days>
<vip_hours>The number of hours for which the user remain a VIP.</vip_hours>
<vip_minutes>The number of minutes for which the user remain a VIP.</vip_minutes>
<vip_until>The date and time until which the user remain a VIP.</vip_until>
<terms_version>Currently accepted version of the terms and conditions.</terms_version>
<email_verified>Tells whether or not the user's email address is verified (0 -> No, 1 -> Yes).</email_verified>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>GET_USER_DATA_1</code>
<message>Access denied.</message>
</response>
Get the list of a user's vouchers.
@return | The list of a user's vouchers. |
---|
POST /api/user_vouchers/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<unused_voucher>
<code>The voucher code.</code>
<months>The number of months of being a VIP.</months>
<days>The number of days of being a VIP.</days>
<price>The price paid for the voucher.</price>
<currency>Currency code.</currency>
<paid>When the voucher was paid for.</paid>
<url>[optional] The URL of the voucher PDF file.</url>
</unused_voucher>
<used_voucher>
<code>The voucher code.</code>
<months>The number of months of being a VIP.</months>
<days>The number of days of being a VIP.</days>
<price>The price paid for the voucher.</price>
<currency>Currency code.</currency>
<used>When the voucher was used.</used>
<seller>The name of the voucher seller.</seller>
<url>[optional] The URL of the voucher PDF file.</url>
</used_voucher>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>USER_VOUCHERS_FATAL_1</code>
<message>Access denied.</message>
</response>
Validate the given user credentials.
@param | string | username | A username. |
---|---|---|---|
@param | string | An email address. | |
@param | string | password | Password hashed by md5crypt algorithm (if you absolutely must you can send plain text). |
@param | string | password_again | Password hashed by md5crypt algorithm (if you absolutely must you can send plain text). |
@return | The validation results. |
POST /api/validate_credentials/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
username={A username.}&email={An email address.}&password={Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).}&password_again={Password hashed by md5crypt algorithm (if you absolutely must you can send plain text).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<email_exists>Tells whether the given email address already exists or not (0 -> No, 1 -> Yes).</email_exists>
<username>Tells whether the given username is valid (0 -> No, 1 -> Yes).</username>
<email>Tells whether the given email address is valid (0 -> No, 1 -> Yes).</email>
<password>Tells whether the given password is valid (0 -> No, 1 -> Yes).</password>
<password_again>Tells whether the given passwords match (0 -> No, 1 -> Yes).</password_again>
</response>
Verify a file password.
@param | string | ident | The identifier of the file. |
---|---|---|---|
@param | string | password | The file password digest (SHA1(MD5_CRYPT(password))). |
@return | 1 if the given file password digest (SHA1(MD5_CRYPT(password))) is correct, 0 otherwise. |
POST /api/verify_file_password/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the file.}&password={The file password digest (SHA1(MD5_CRYPT(password))).}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<correct>1 if the given file password digest (SHA1(MD5_CRYPT(password))) is correct, 0 otherwise.</correct>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VERIFY_FILE_PASSWORD_FATAL_1</code>
<message>File not found.</message>
</response>
Get currently running voucher campaign.
POST /api/voucher_campaign/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
Apply the given voucher code.
@param | string | code | The code of the voucher to be applied. |
---|
POST /api/voucher_payment/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
code={The code of the voucher to be applied.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_1</code>
<message>Access denied.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_10</code>
<message>The given voucher was cancelled at Slevomat.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_11</code>
<message>The given voucher expired at Slevomat.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_12</code>
<message>The voucher campaign has not started yet at Slevomat.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_2</code>
<message>No such voucher exists.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_3</code>
<message>The given voucher was already used.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_4</code>
<message>Voucher limit for this campaign exceeded.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_5</code>
<message>Voucher was cancelled.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_6</code>
<message>Unknown Slevomat error.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_7</code>
<message>No such voucher found at Slevomat.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_8</code>
<message>The given voucher has not been paid at Slevomat.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>VOUCHER_PAYMENT_FATAL_9</code>
<message>The given voucher was refunded at Slevomat.</message>
</response>
Creates a new request to create a ZIP archive containing files from the given folder.
@param | string | ident | The identifier of that folder. |
---|---|---|---|
@return | A new request to create a ZIP archive containing files from the given folder. |
POST /api/zip_folder/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of that folder.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<method>The request HTTP method.</method>
<url>The request target URL.</url>
<body>The request body.</body>
<skipped>
<file>
<path>The path of this file in the archive.</path>
<size>The size of this file in bytes.</size>
<reason>The reason why this file was skipped.</reason>
</file>
</skipped>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ZIP_FOLDER_FATAL_1</code>
<message>No such folder found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ZIP_FOLDER_FATAL_2</code>
<message>Too many running downloads on too many devices.</message>
</response>
Creates a new request to create a ZIP archive containing the given tied files.
@param | string | ident | The identifier of the bundle. |
---|---|---|---|
@return | A new request to create a ZIP archive containing the given tied files. |
POST /api/zip_tied_files/ HTTP 1.1
Host: webshare.cz
Accept: text/xml; charset=UTF-8
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
ident={The identifier of the bundle.}
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>OK</status>
<method>The request HTTP method.</method>
<url>The request target URL.</url>
<body>The request body.</body>
<skipped>
<file>
<path>The path of this file in the archive.</path>
<size>The size of this file in bytes.</size>
<reason>The reason why this file was skipped.</reason>
</file>
</skipped>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ZIP_TIED_FILES_FATAL_1</code>
<message>No such tie found.</message>
</response>
HTTP/1.0 200 OK
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0"?>
<response>
<status>FATAL</status>
<code>ZIP_TIED_FILES_FATAL_2</code>
<message>Too many running downloads on too many devices.</message>
</response>