Page 2 of 2«12
uCoz Community » Additional Services » PHP and API on uCoz » Basic API in uCoz (How to use basic API)
Basic API in uCoz
Natashko
Posts: 3366
Reputation: 171
Message # 1 | 3:21 PM
How to use basic API

GENERAL INFORMATION

Basic API is an interface of data receiving from the pages of a user's website. It is a GET-only interface that allows to receive only data (pages) of website modules, i.e. it works with guest (unauthorized user) permissions. At the moment it is available in 11 modules: blog, board, dir, gb, load, news, photo, publ, stuff, forum, index. To enable API, go to Control Panel -> Settings -> Common Settings -> Allow API usage.



It is disabled by default.


HOW TO USE

The format of the data, given to API is XML-RPC. All requests to the interface are performed by means of GET requests. You can use the function as follows:

http://SITE_ADDRESS/api/MODULENAME/ANYRELPATH

where:
SITE_ADDRESS – the URL of a user's website where API is used;
MODULENAME – website module;
ANYRELPATH – any module page where API usage is allowed.

So it is actually enough to add /api/ between the website address and the name of the module to use the interface (if it is enabled for the website).

Example

For example, in order to receive a web page:

http://win.ucoz.com/news/contest_for_best_uid_me_profile/2013-12-18-17

it is enough to send a GET request to:

http://win.ucoz.com/api....2-18-17


VZ
Posts: 189
Reputation: 3
Message # 16 | 8:00 PM
Can we use unlimited number of requests with this API or the uAPI?
Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them.
Sunny
Posts: 9296
Reputation: 456
Message # 17 | 1:52 PM
VZ, the uAPI limit is not more than 1500 requests per 1 hour/1 website/1 token.
I'm not active on the forum anymore. Please contact other forum staff.
OrFeAsGr
Posts: 12
Reputation: 0
Message # 18 | 6:32 PM
Thanks for this smile It really helped me with a GET biggrin biggrin smile smile
http://humanity.ucoz.com <<< Humanity I.R.C Bot Services & mIRC Help
Ed05
Posts: 556
Reputation: 7
Message # 19 | 0:10 AM
On my site api wont work. What is going on? I try to call page with <?$PHPCODE$("http://somewebsite.com/php/page.php")?>
and i dont get anything on my site. i used example php code http://phpexample.ucoz.com/publ/receiving_an_article/1-1-0-4

!
bigblog
REEEEEE
Posts: 1334
Reputation: 63
Message # 20 | 4:36 PM
Ed05, have you activated the use of API for the desired module?
i breathe... sometimes
Ed05
Posts: 556
Reputation: 7
Message # 21 | 5:30 PM
bigblog, yes,i activated in all modules. im trying to use it in provided way but i get only blank page. is there any detailed example,how to call it. wich code we need to put in html to call the api. maybe i wrong somewhere. i use like in exaple above but it wont work.
!
bigblog
REEEEEE
Posts: 1334
Reputation: 63
Message # 22 | 5:32 PM
Ed05, could you please provide a link to the page of youe site where the script can be found?
i breathe... sometimes
Ed05
Posts: 556
Reputation: 7
Message # 23 | 8:16 PM
Since 24hrs no one look into the problem (i did not get notification) i deleted link.
!
Post edited by Ed05 - Friday, 2016-03-11, 5:30 PM
uCoz Community » Additional Services » PHP and API on uCoz » Basic API in uCoz (How to use basic API)
Page 2 of 2«12
Search: