• Page 2 of 2
  • «
  • 1
  • 2
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

!
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 20 | 4:36 PM
Ed05, have you activated the use of API for the desired module?
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
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.
!
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 22 | 5:32 PM
Ed05, could you please provide a link to the page of youe site where the script can be found?
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
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
khen
Posts: 476
Reputation: 13

Message # 24 | 1:45 PM
How do I call a request of $OTHER6$ in the Board module?
Gromov
Posts: 616
Reputation: 14

Message # 25 | 6:40 AM
khen, It shouldn't be an issue if you have added 6 or more additional fields in the Ad Board -> Settings -> Entries -> after that you need to go to the Design section -> Editor -> Ad Board -> Page with full post text and associated comments -> add the code -> Save.
khen
Posts: 476
Reputation: 13

Message # 26 | 6:42 AM
Gromov, what I mean is how to request the $OTHER6$ if I'm using PHP.
Gromov
Posts: 616
Reputation: 14

Message # 27 | 1:20 PM
khen, you need to add a script to a template and set the variable as the value. I can suggest you request your manager in charge of an assistance regarding the issue, it can be a more effective solution in your case.
  • Page 2 of 2
  • «
  • 1
  • 2
Search: