How can I add a webservice

Permalink
I have a possibility to connect a concrete5 portal, authenticate a user, send data and get data. This shold be done automatically by an application running on an other concrete5 portal.

My first idear was to make a single page. But then I send the data, user and password and the result will be a page (html).

How can I implement a webservice to get xml or is it possible to get xml on a single page?

Has anybody a idear?

GunterSchmitt
 
FaganSystems replied on at Permalink Reply
FaganSystems
Hi Gunter,
There are a number of options open to you. When I need to do this I have built a secure api using a restful custom built interface. Its secure because api takes a c5 user and password and returns a token, this allows permissions to be assigned to the logged in user.
From there you can send the api an action and get a response.
I build mine with JSON encoded xml which is used in both supplying and returning data.

I am hoping to find the time to package this up as a C5 starter kit, but I have no timescales for this.

Getting it working is a bit of a challenge but once its working it is very versatile.

Hope that gives you some ideas.

FS
mnakalay replied on at Permalink Reply
mnakalay
I for one definitely ++++++++11111111 the packaging you mentionned.

It would be great to have
Gondwana replied on at Permalink Reply
Gondwana
While I don't fully understand the question, I might have achieved something similar. I've deployed a c5 site that calls fitbit web APIs via OAUTH2. I used a single page with $_GET to receive the API callback data. That's probably not very concretey, but it works.

AJAX would be another possibility.