Rest api webservice

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
jconesa
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2022 10:27 am

Rest api webservice

Post by jconesa » Fri Sep 23, 2022 10:46 am

Good.
Could someone tell me how to create a module in joomla to connect with an API that returns a JSON and be able to show it graphically in joomla as an article, for example:??
Thank you

User avatar
mjparadac
Joomla! Hero
Joomla! Hero
Posts: 2488
Joined: Mon Oct 29, 2012 3:58 pm

Re: Rest api webservice

Post by mjparadac » Fri Sep 23, 2022 4:50 pm

Hello

You could take a look at this extension:
https://extensions.joomla.org/extension/rest-api/

Hope this helps.
Joomla Community Ambassador for A2 Hosting | A2 Hosting - Our speed, your success | https://www.a2hosting.com/joomla-hosting

jconesa
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2022 10:27 am

Re: Rest api webservice

Post by jconesa » Mon Sep 26, 2022 5:52 am

I already have that component installed but it only gives me the option to create Token with several options but not to configure an external connection to an API.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2906
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Rest api webservice

Post by SharkyKZ » Mon Sep 26, 2022 6:05 am

Unless there's already an extension for a specific API you have in mind, you'll have to code it yourself. Use the HTTP library to make requests https://api.joomla.org/cms-3/namespaces ... .Http.html. The rest depends on your use case.

jconesa
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Sep 23, 2022 10:27 am

Re: Rest api webservice

Post by jconesa » Mon Sep 26, 2022 6:16 am

Well I don't know if I explained myself well. this is to display content from an external API to Joomla. Or show it on my Joomla site. Anyway, I'm going to try what you suggest to see if it works for me.
Thank you very much.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2906
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Rest api webservice

Post by SharkyKZ » Mon Sep 26, 2022 6:31 am

Yes, I understood. But the code for such extension depends heavily on the remote API. So there's no single extension that can consume all the APIs in the world. You'll have to read the documentation of your specific API first to figure out how to use it. And then implement it in Joomla.

There are plenty of extensions on JED that use specific remote APIs. For example, weather extensions (https://extensions.joomla.org/tags/weather/) that connect to OpenWeatherMap, Yahoo Weather and similar services.


Locked

Return to “General Questions/New to Joomla! 3.x”