On Mon, May 7, 2012 at 7:24 PM, Sven Adolph <sven.ado...@gmx.de> wrote:
> Hi Eduard,
> thanks for your quick answer. Using the REST resource works fine, thanks a
> lot.
>
> For future work I have one question left. I read the tutorial for creating
> an own component, but it is not clear to me how to use an component as a
> service, so that an external application can access it. e.g. that I would
> have an own url for this new component, like for the REST API. So I would be
> able to call an url like xwiki/myApi instead of xwiki/rest or
> xwiki/xmlrpc/confluence. Is it possible to create something like this?

You can write a script service [1] for your component and then use it
inside a wiki page (e.g. MyServices.Foo). You can take the input
parameters for your service from the request parameters. The following
URL would 'call' your service:
/xwiki/bin/get/MyServices/Foo?param1=value1&param2=value

Hope this helps,
Marius

[1] 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents#HFromwikipages

>
> Thanks,
> Sven
>
> Am 06.05.2012 12:31, schrieb Eduard Moraru:
>>
>> Hi Sven,
>>
>> There actually is a REST resource for querying pages with a given tag.
>> Check out the documentation on the REST API page [1]. The resource is:
>>
>> /wikis/{wikiName}/tags/{tag1}[,{tag2},{tag3}...][?start=offset&number=n]
>>
>> which returns: "The list of pages having the specified tags." [1]
>>
>> Regarding your other questions, if they are still valid, check out the
>> documentation on creating XWiki Components [2] and on creating new(custom)
>> REST resources [3] that extend the REST API.
>>
>> Thanks,
>> Eduard
>>
>> ----------
>> [1]
>>
>> http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HTagresources
>> [2] http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
>> [3]
>>
>> http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HCustomresources
>>
>> On Sun, May 6, 2012 at 12:16 AM, Sven
>> Adolph<svend...@googlemail.com>wrote:
>>
>>> Hi,
>>> I would like to access my XWiki from an external web service. The web
>>> service would send a tag to XWiki and then receive links to all pages
>>> which
>>> are tagged with the given tag.
>>> I looked at the REST-API and the XMLRPC-API but I couldn't find a way to
>>> do
>>> the task with these apis.
>>> Now i am thinking about writing my own component which would query the
>>> tag
>>> plugin and then return the results in some way.
>>> My question is how can I make a component accessible from outside Xwiki?
>>> Is
>>> there an easy way to enhance the REST or XML-RCP components or is it
>>> possible to use an script on a wikipage to forward a get-request with its
>>> paramter to the component?
>>> Is there a best practice for tasks like this?
>>>
>>> Thanks a lot&  Kind Regards,
>>>
>>> Sven
>>> _______________________________________________
>>> users mailing list
>>> users@xwiki.org
>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>
>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to