Megaleecher.Net

Making technology work for you...

Get Your Free Subscription By Email:

Rapidshare API Completed, Ready For External Beta Testing

RapidshareIn an interesting development leading one-click file-hoster Rapidshare.Com announced public release of Rapidshare Application Programming Interface (API) meant for developers to create Rapidshare based applications, As per the official statement the Rapidshare API is now completed and will get released to public for external beta testing soon once complete API documentation is finished.

Rapidshare API will let programmers utilize RapidShare internal functions to create powerful applications based around the service via a simple and handy format.

Comments

thanks for rapidshare news

RapidShare API - Last update: 19th May 2009

This is the final technical documentation to the RapidShare API for coders.

If you are no programmer: Technical means, this documentation's purpose is solely to give coders (people creating cool tools) a documentation on how to
implement the back-end API in their tools, so their programs get even cooler and easier to be created, so you can use RapidShare even more comfortably.
If you know a good coder, do not hesitate to advise him or her of this documentation.

Since RapidShare is always extending its functionality, new routines will be added from time to time and existing routines will be adjusted slightly.
We will take care that existing routines will not be changed too much, so that existing programs keep running. Tell us if you are missing an API call
and we will see what we can do.

Routines giving back many values are subject of many changes. For example the routine getaccountdetails_v1 returns many key-value pairs. Those pairs
might be sorted differently in the future. Some values might disappear, new values may appear. Make sure your program can handle this changes without
a need for an update. If a value disappears, you should assume a "0" value. If a new value appears, your program should just ignore it. Your program
must not rely on the sort-order of the list.

In case we plan major adjustments, we will create a different function-call for it. This is reflected by the appendix "_v1" "_v2" etc. However, if there
are security issues by design in existing functions, we reserve the right to disable or change existing functions without prior notice. So check back
here from time to time.

WARNING: Since RapidShare serves a very large community, programming errors in popular tools might cause an unwanted DDOS attack to the RapidShare servers.
When programming tools, always keep in mind that your tool might be used by millions of people at the same time. So make sure you do not kill our API servers,
which might cause some big financial issues on your side. Always make sure your program STOPS retrying a failed request after 3 tries. Always make sure you
do not make more API calls than necessary. Our servers use a IP-based credit system, which will ban a IP making very many small requests or just a few
unnecessary big requests. Everything you do will add POINTS to your IP address. If you exceed a certain point limit, API calls are denied for 30 minutes.
If you exceed this limit multiple times, your account is banned as well. This especially happens with listfiles_v1 abuses on accounts having many files.
How many points your calls will add to your balance depend heavily on the routine you call. For example calling nextuploadserver_v1 adds nearly no points
to your balance, while listfiles_v1 is certainly the most expensive routine if you have many files in your account and you request a very detailed list.

http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine (finalpoints=points)
or https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine (finalpoints=points*2 (this means using SSL doubles points!))

Additional parameters can be added via http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=subroutine&param1=value1&param2=value2

In case you get an error, the reply always starts with "ERROR: " followed by a plain string telling you what is wrong. You should always check this.
The best is if you just output the string to the user. The string is self-explanatory and every user should know what went wrong.

Be careful when giving too many wrong passwords. The password brute-force protection will block your IP when you enter too many wrong passwords and/or killcodes.
This protection has nothing to do with the point system mentioned above and works independently.

subroutine=nextuploadserver_v1
Description: Gives the next available upload server to use without fearing rejection.
Parameters: None
Reply fields: 1:The upload server. Complete it with rs$uploadserver.rapidshare.com
Reply format: integer

subroutine=getapicpu_v1
Description: Gives the current api cpu value for your IP address. If you reach 30000 points, all further API requests from your IP will be blocked.
Every minute the server will subtract 1000 points from your balance. This routine is for debugging purposes only and may disappear in the future.
Parameters: None
Reply fields: 1:How many points you already have.
Reply format: integer

subroutine=checkincomplete_v1
Description: You need this to resume an incomplete file. You can try without it, but you might get rejected if the file is invalid.
This routine needs the file ID and the kill code for authentication.
Parameters: fileid=The file ID in question
killcode=The killcode of the file ID
Reply fields: 1:The size already saved on the server. You should use this to resume the upload, so you know where to start.
Reply format: integer

subroutine=renamefile_v1
Description: Renames a file to something else. Be aware that your users will not be able to download the file anymore by using the old link!
Parameters: fileid=The file ID in question
killcode=The killcode of the file ID
newname=A new name for the file. Invalid characters will automatically be converted to "_"
Reply fields: 1:OK
Reply format: string

subroutine=movefilestorealfolder_v1
Description: Moves one or more files to a RealFolder. (files parameter limited to 10000 bytes)
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
files=comma separated list of file ids
realfolder=ID of the RealFolder
Reply fields: 1:OK
Reply format: string

subroutine=renamerealfolder_v1
Description: Renames an existing RealFolder.
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
realfolder=ID of the RealFolder
newname=New name of the RealFolder (limited to 100 chars.)
Reply fields: 1:OK
Reply format: string

subroutine=deletefiles_v1
Description: Deletes one or more files forever. (files parameter limited to 10000 bytes)
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
files=comma separated list of file ids, or ONE RealFolder ID. This deletes all files in the RealFolder ID
Reply fields: 1:OK
Reply format: string

subroutine=addrealfolder_v1
Description: Adds a new RealFolder
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
name=Name of the folder (Max. 100 byte)
parent=ID of parent folder. 0=root
Reply fields: 1:RealFolder ID
OR
1:-1 (if no space left, it returns -1)
Reply format: integer

subroutine=delrealfolder_v1
Description: Deletes an existing RealFolder (without the files, so just the RealFolder entry)
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
realfolder=ID of the RealFolder
Reply fields: 1:OK
Reply format: string

subroutine=moverealfolder_v1
Description: Changes the parent ID of an existing RealFolder
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
realfolder=ID of the RealFolder
newparent=New parent ID
Reply fields: 1:OK
Reply format: string

subroutine=listfiles_v1
Description: Lists all files in a given format in a given RealFolder or in all RealFolders. Warning: Flooding the server with this routine will block your IP!
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
realfolder=ID of the real folder to list files from. 0=root all=All folders
filename=Optional. Give a filename to get only results where filename=$filename. Good for finding dupes.
fields=A comma separated list of database columns you want to receive. You will always receive the fileid.
Example: fields=downloads,size will reply many lines in the format "$fileid,$downloads,$size\n"
The following file columns are available: downloads,lastdownload,filename,size,killcode,serverid,type,x,y,realfolder,bodtype
The following history columns are available: uploadtime,ip,md5hex
Warning: History columns will always be appended after the file columns. Do NOT use them if you don't need to, since this will boost your points!
Example: fields=size,filename,md5hex,killcode,ip,x,y will result in "$size,$filename,$killcode,$x,$y,$md5hex,$ip
Format: Everything is human readable except timestamps, which are unix timestamps (integers).
order=Reply will be ordered by this column. All file columns are valid. (optional. Avoid this parameter to pay less penalty points!)
desc=0 or 1. 1 means, the result will be ordered descending. (optional)
Reply fields: 1:fileid
2:dynamically adjusted
OR
"NONE" (if no results, it returns "NONE")
Reply format: integer,fields (fields depending on fields you request)

subroutine=listrealfolders_v1
Description: Returns all available RealFolders and their topology.
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
Reply fields: 1:RealFolder ID
2:Parent RealFolder ID
3:Name of the folder
OR
"NONE" (if no results, it returns NONE)
Reply format: integer,integer,string

subroutine=getaccountdetails_v1
Description: Returns key-pair values for the specific account. Warning: The order may change, and we will probably add more return values in the future.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=password of the login
Reply fields: 1:key 2:value
Reply format: string=string or integer\n...
Reply example: TYPE=PREM:
accountid=$accountid
servertime=$time
addtime=$addtime
validuntil=$validuntil
username=$username
directstart=$directstart
protectfiles=$protectfiles
rsantihack=$rsantihack
plustrafficmode=$plustrafficmode
mirror=$mirror
mirror2=$mirror2
mirror3=$mirror3
jsconfig=$jsconfig
email=$email
lots=$lots
points=$points
curfiles=$curfiles
curspace=$curspace
bodkb=$bodkb
prempoints=$prempoints
premkbleft=$premkbleft
TYPE=COL:
accountid=$accountid
servertime=$time
addtime=$addtime
username=$username
email=$email
jsconfig=$jsconfig
rsantihack=$rsantihack
lots=$lots
points=$points
curfiles=$curfiles
curspace=$curspace
prempoints=$prempoints

subroutine=setaccountdetails_v1
Description: Changes the settings of an account. Every parameter is mandatory except "newpassword". Thus, not transmitting a parameter means setting it to "".
Enabled RSAntiHAck causes a block if you try to change email, username, password or plustrafficmode.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
newpassword=Sets a new password. Optional. Skipping this will not change the password at all.
email=Email address to use. Mandatory. Skipping results in an error.
username=Optional username to use. If skipped, the username alias will be deleted.
mirror=2 character mirror in segment 1. Skipping results in random mirror selection. Ignored on type=col
mirror2=2 character mirror in segment 2. Skipping results in random mirror selection. Ignored on type=col
mirror3=2 character mirror in segment 3. Skipping results in random mirror selection. Ignored on type=col
directstart=1 or 0. Downloads will start instantly. Skipping this means setting it to 0. Ignored on type=col
jsconfig=A custom value, which can be set as you like. Max. 64 alphanumeric characters.
plustrafficmode=Modes valid are 0=No auto conversion. 1=Only TrafficShare conversion. 2=Only RapidPoints conversion. 3=Both conversions available. Ignored on type=col
Reply fields: 1:OK
Reply format: string

subroutine=enablersantihack_v1
Description: Enabled the RS AntiHack mode. This mode is highly recommended for every account, as it makes account manipulations impossible without unlocking it first.
Calling this routine gives an error if no valid e-mail has been saved by the user.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
Reply fields: 1:OK
Reply format: string

subroutine=disablersantihack_v1
Description: Disables the RS AntiHack mode, so the user can change the account settings again.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
unlockcode=The unlock code as seen in the e-mail sent by enablersantihack.
Reply fields: 1:OK
Reply format: string

subroutine=sendrsantihackmail_v1
Description: Sends the e-mail again containing the unlock code. It is the same e-mail as you called enablersantihack.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
Reply fields: 1:OK
Reply format: string

subroutine=filemigrator_v1
Description: Access to the powerful file migrator to move files between different accounts and account types. LinkLists also supported.
Please notice that every transfer is logged. If you use this function to break the general user agreement, your account will be closed.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
srcaccount=Login of the source account
srcpassword=Password of the source account
srcrealfolder=The RealFolder ID to move in the source account. If given, only files in this RealFolder will be moved.
targetaccount=Login of the target account
targetpassword=Password of the target account
targetrealfolder=The RealFolder ID in the target account. All files will be moved in this RealFolder in the target account.
movetype=freecol OR freeprem OR colcol OR colprem OR premcol OR premprem OR llpremprem (premcol for example moves files from a premium account to a collector's account)
fileids=What files to move. Either "*" for all files, or a comma separated list of file IDs.
If movetype is freecol or freeprem, fileids has to be like: fileids=fFILEIDkKILLCODEfFILEIDkKILLCODE and (ony then) it is limited to 100 files per run.
Reply fields: IF MOVETYPE=LLPREMPREM
1:Number of moved link lists
ELSE
1:Number of moved files
2:Files in source account before action
3:Space in source account before action
4:Files in target account before action
5:Space in target account before action
6:Files in source account after action
7:Space in source account after action
8:Files in target account after action
9:Space in target account after action
Reply format: IF MOVETYPE=LLPREMPREM
integer
ELSE
integer,integer,integer,integer,integer,integer,integer,integer,integer

subroutine=newlinklist_v1
Description: Creates a new LinkList.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
foldername=The name of the new LinkList
folderheadline=A headline for the new LinkList
nickname=Your nick name to display in the LinkList view mode
folderpassword=An optional folder password visitors have to enter before being able to browse your LinkList
Reply fields: 1:LinkList ID
Reply format: string

subroutine=editlinklist_v1
Description: Edits an existing LinkList. Keeping any value empty means deleting the value.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
folderid=The ID of the existing LinkList
foldername=The new name of the LinkList
folderheadline=A new headline for the LinkList
nickname=A new nick name to display in the LinkList view mode
folderpassword=An optional folder password visitors have to enter before being able to browse your LinkList
Reply fields: 1:OK
Reply format: string

subroutine=getlinklist_v1
Description: Receives a full list of all available link lists OR details about a specific link list.
Parameters: type=col or prem (Collector's account or Premium account.)
login=ID or username
password=Password of the login
folderid=LinkList ID. Set this to receive the first reply field group. Do not set this to receive the second reply field group.
withsubfolders=1 gives also all sub-folders if folderid is empty.
Reply fields: 1:Subfolder ID
2:File ID
3:Filename (HTML encoded)
4:Size (in bytes)
5:Description
6:Addtime (HTML encoded)
OR (if folderid is empty)
1:Folder ID
2:Name (HTML encoded)
3:Headline (HTML encoded)
4:Views
5:Last view (unix timestamp)
6:Folder password (HTML encoded)
7:Nick (HTML encoded)
Reply format: string,integer,string,integer,string,integer\n...
OR (if folderid is empty)
string,string,string,integer,integer,string,string\n...

subroutine=copyfilestolinklist_v1
Description: Copys several files to the given LinkList. Please notice that the files are not copied, but a link entry is generated in the LinkList pointing to the respective file.
This is an easy way to avoid calling newlinklistentry_v1 for many files. It takes the size and the filename and saves it in the link-list for every file ID you provide.
Please notice that the files have to be in your respective zone in order to be copied to your LinkList.
Parameters: type=col or prem
login=ID or username
password=Password of the login
folderid=The folder ID to copy the files to
subfolderid=The sub-folder ID to copy the files to (0=root, default is 0)
files=A comma separated list of file IDs
Reply fields: 1:OK
Reply format: string

subroutine=newlinklistsubfolder_v1
Description: Creates a new LinkList sub-folder.
Parameters: type=col or prem
login=ID or username
password=Password of the login
folderid=The folder ID to create the entry in
subfolderid=The sub-folder ID to create the entry in
newsubfoldername=A reasonable sub-folder name
newsubfolderpassword=An optional numeric access password for that sub-folder.
newsubfolderdescription=An optional description
Reply fields: 1:New sub-folder ID
Reply format: string

subroutine=deletelinklist_v1
Description: Deletes an existing LinkList. Please notice that it will not delete the files itself, just the LinkList alone.
Parameters: type=col or prem
login=ID or username
password=Password of the login
folderid=The folder ID to delete
Reply fields: 1:OK
Reply format: string

subroutine=deletelinklistentries_v1
Description: Deletes LinkList entries. Also supports deleting sub folders. Be careful that it is possible to delete sub-folders without deleting the links itself!
A messed up LinkList can always be completely deleted with deletelinklist_v1.
Parameters: type=col or prem
login=ID or username
password=Password of the login
folderid=The folder ID to delete entries from
subfolderid=The sub-folder ID to delete entries from. Defaults to 0 (root).
files=The comma-separated file IDs to delete. Notice that sub-folders are file IDs less than 1000.
Reply fields: 1:OK
Reply format: string

subroutine=editlinklistentry_v1
Description: Edits a LinkList entry. If length of file ID is <= 3, it is a folder and you may edit description and password. If it is >= 4, it is a file and you may only change the description.
Parameters: type=col or prem
login=ID or username
password=Password of the login
folderid=The folder ID containing the file-id
subfolderid=The sub-folder ID containing the file-id. Defaults to 0 (root).
fileid=The file ID to modify.
newdescription=The new description of the file or sub LinkList.
newpassword=The new access password of the sub LinkList. Only valid if you edit a sub LinkList.
Reply fields: 1:OK
Reply format: string

subroutine=trafficsharetype_v1
Description: Sets a new TrafficShare type for a list of files. (files parameter limited to 10000 bytes)
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
files=comma separated list of file ids
trafficsharetype=0,1,2 (0=off 1=on 2=on with encryption)
Reply fields: 1:OK
Reply format: string

subroutine=masspoll_v1
Description: Saves your vote on a running mass poll.
Parameters: type=col or prem (Collector's account or Premium account)
login=ID or username
password=password of the login
pollid=ID of the poll
vote=Your vote (number between 1 and 250)
Reply fields: 1:OK
Reply format: string

subroutine=checkfiles_v1
Description: Gets status details about a list of given files. (files parameter limited to 10000 bytes. filenames parameter limited to 100000 bytes.)
Parameters: files=comma separated list of file ids
filenames=comma separated list of the respective filename. Example: files=50444381,50444382 filenames=test1.rar,test2.rar
incmd5=if set to 1, field 7 is the hex-md5 of the file. This will double your points! If not given, all md5 values will be 0
Reply fields: 1:File ID
2:Filename
3:Size (in bytes. If size is 0, this file does not exist.)
4:Server ID
5:Status (0=File not found 1=File OK 2=File OK (direct download) 3=Server down 4=File abused 5=Anonymous file locked, because it has more than 10 downloads already)
6:Short host (Use the short host to get the best download mirror: http://rs$serverid$shorthost.rapidshare.com/files/$fileid/$filename)
7:md5 (See above.)
Reply format: integer,string,integer,integer,integer,string,string

subroutine=trafficsharelogs_v1
Description: Gets detailed download logs for your offered TrafficShare files. To make this work, you first have to enable logging for the respective TrafficShare files. No logs are generated by default.
Parameters: type=col or prem (Collector's account senseless here)
login=ID or username
password=password of the login
fileid=ID of the file
Reply fields: 1: Start time, unix timestamp
2: Stop time, unix timestamp (You can easily calculate the download speed. If this is 0, then the client is still downloading.)
3: IP as integer
4: Size of the whole file in bytes
5: Starting position of the download
6: How many bytes the client has really downloaded
Reply format: integer,integer,integer,integer,integer,integer

subroutine=downloadlogs_v1
Description: Gets detailed download logs for your offered files. To make this work, you first have to enable logging for the respective files. No logs are generated by default.
Please notice that every TrafficShare download costs 50 KB traffic to pay for CPU and DB usage. If you enable logging, you will pay 100 KB traffic per request for CPU and DB usage.
Parameters: type=col or prem (Collector's account senseless here)
login=ID or username
password=password of the login
starttime=Start time to get logs for, unix timestamp
endtime=End time to get logs for, unix timestamp (you will never get more than 1000 records. Reply is "ORDER BY starttime LIMIT 1000")
Reply fields: 1: Unix timestamp (You will get timestamp intervals every 10 minutes. Holes WILL exist if you use less than 1 MBit (128 KB/sec) or if we experience server problems.)
2: KB/sec (How many KB/sec you have used in the past 10 minutes.)
Reply format: integer,integer

subroutine=buylots_v1
Description: Exchanges RapidPoints to lots. You will get one lot for 50 RapidPoints. You can not own more than 50.000 lots.
Parameters: type=col or prem
login=ID or username
password=password of the login
newlots=How many new lots to buy
Reply fields: 1: Number of lots you have now. (old+new)
Reply format: integer

subroutine=sendmail_v1
Description: You may send an e-mail to someone to inform him/her about a file you have just uploaded. E-mail sending is restricted and has several anti-spam methods included.
Parameters: name=YOUR name
comment=A comment you want to attach to your e-mail. HTML will be filtered.
email1=First e-mail address to send to
email2=Second e-mail address (optional)
email3=Third e-mail address (optional)
withkillcode1=1 means that e-mail #1 will also receive the delete links for the files. Optional.
withkillcode2=1 optional
withkillcode3=1 optional
fileid1=File ID 1 to inform the receiver about
killcode1=The killcode for fileid1 (required)
fileidX=Same as above. Supported up to fileid10.
killcodeX=Supported up to killcode10.
Reply fields: 1: OK
Reply format: string

When i click on extend rapidpro, this is the message i get.

ERROR: apiextendrapidpro blocked by RSAntiHack.

What can I do?

hi

i bought an account rapid for my premium account

and i received an error whose said that i need to extend my rapidpro

what can i do?

greetings and Thanks

Emiliano

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.