REST API for Joomla 3.0 [closed] - api

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
I'm currently using the Joomla 3.3.6 and need to find a REST API to access the content information, user information and etc. I already tried to use the following REST API, which is developed by TechJoomla, but unable to find a proper documentation about the sample requests, authentication process and so on.
https://techjoomla.com/rest-api-for-joomla
And also i considered the jbackend REST API which is developed as an extension for joomla which seems to be a paid extension.
After lot of googling i'm still struggling to find a REST API to access the Joomla content. Please help me with this issue.
Thank you in advance.

I ran into the same issue as well which is why I ended up developing a RESTful API for Joomla 3.4.x, powered by the Slim PHP micro-framework. Please note that this is a commercial Joomla package.
The package includes the following:
Services Control Panel component
Joomla "services" add-on library which includes a version of Slim v2.6.2 (along with several other libraries) obtain via composer and normally found in the vendor folder. More on this later...
Services Joomla Plugin
Services REST Plugin
Services Slim Configuration Plugin
Slim JSON API View plugin
Slim JSON API Middleware plugin
You might ask, "What is the point of all these plugins?"
The answer is that it allows for compartmentalization of functionality of the core components and opens the door for an easily extensible services routes architecture. Note that new plugins could easily be added with Joomla ACL restricting access to those new routes, for example.
The Services Control Panel allows for creation of tokens on a per-user basis (or even multiple tokens per Joomla user). It also allows the end user to configure the Slim micro-framework parameters and even include a threshold for the API rate-limiting functionality (currently based on requests-per-minute). Actually, that part is totally awesome as it provides live feedback on the state of the API rate threshold within the response header.
The cAPI Core package ("cAPI", short for "Constant API" because everything needs a product name...) is just that - a core package. There is a host of add-ons currently in development, the first one being a secure LDAP JSON API (which connects to Microsoft Active Directory), with lots more cool add-ons to come.
The whole point of all this is to say that, basically, your request has been answered and now a commercially supported solution has finally arrived. Plus, instead of reinventing the wheel, I based the extension on a popular, existing micro-framework (Slim), making it easier for developers to work with or develop on the core, pluggable, framework.
So, you get the best of Joomla (robust ACL, advanced plugin architecture, wealth of extensions) and Sim (proven, standards-compliant, mature RESTful PHP micro-framework), all in one easy to install package.
Exposing a website via an easily queryable API should not be taken lightly. I would hope anyone choosing to do this would implement 100% HTTPS access and security-harden their server(s).
You can find more information here: http://getcapi.org
Hope this gets you going in the right direction.
One more thing:
I read over your question again and read that part about your need to access users and content. These were actually the first service endpoints I worked on:
/api/v1/user/
- Can be used to log a user in and out and returns the activated Joomla session in the response
- This also provides for multimodal authentication (both via token in header or username & password in URL string). Basically, it works with your needs.
- You force a user logout like this:
/api/v1/user/logout/username/joomlasessionid
Basically, this is tailor-made for driving remote services or, say iOS or Android apps.
(GET,POST,PUT,DELETE) /api/v1/content/...
- Provides ability to create, retrieve, update and delete content
(GET,POST,PUT,DELETE) /api/v1/category/...
- Provides ability to create, retrieve, update and delete categories
Also,
/api/v1/user/login/(username)/(password)
/api/v1/user/logout/(username)/(joomlasessionid)
/api/v1/user/profile
/api/slim/routes
and more...
Additional information on available methods can be found here:
http://learn.getcapi.org/api-methods
It should go without saying that all cAPI Core package improves are included in the annual subscription fee. Add-ons are (will be) billed and supported separately. Now listed in the Joomla Extensions Directory (JED) https://extensions.joomla.org/extensions/extension/capi-core-rest-api.
Update 2016-03-28
As of cAPI v1.2.1 new methods have been added to allow CRUD for Joomla user and group management. In addition, I am working on a sandbox cluster at http://getcapi.io to allow potential customers to fully test out the APIs capabilities before subscribing.
Update 2016-09-18
As of cAPI v1.2.5 new methods have been added to allow CRUD actions on API tokens. The API has also been updated with doc-blocks which can auto-generate a Swagger.json. cAPI includes both a back-end and front-end view for accessing the complete API docs generated by Swagger UI.
Finally, https://getcapi.io along with demo1.getcapi.io and demo2.getcapi.io are now live and allow visitors to test the API docs. Soon, they will be configured to auto-reset so that accounts can be distributed to customers so they may fully test the API on their own.

I would recommend jBackend for this.
Further details are discussed at https://joomla.stackexchange.com/questions/10306/creating-an-api-for-a-joomla-extension/10307#10307

You might find this helpful Create Your First RESTful Web Service For Joomla! 3 With Lumen - Introduction

Related

postman collection sharing options for an enterprise?

I recently developed a new REST API for a company. I've created a Postman collection including some sample requests for real-world scenarios. I need to share this collection with other members of the organization.
I found a "Publish Docs" menu option for Postman collections which is pretty cool. It publishes web pages of the documentation and then displays the url for where the documentation can be accessed:
https://documenter.getpostman.com/view/1401123/RWML234Hd
One issue is that the documentation is publicly available to anyone who has the url. Meaning that anyone on the internet could potentially access the documentation. This is a corporate API and should only be accessible within the organization.
Another issue is that it appears that the published url changes every time I "Publish Docs." That's a problem b/c I need to provide a static url for Postman examples on the corporate intranet page listing API resources. My manager won't spend any money on this. I like the documentation feature but:
The documentation should have a static url
The documentation should not be accessible by anyone on the internet who gets a hold of the url
Would I need to pay license costs to satisfy the 2 requirements listed above? What would be my best free option? The default free option for me would be to save off the collection json to a shared drive on the network.
I've been asking this very question for a while now. Finally decided to implement a simple tool that generates an HTML document similar to what postman does.
hope this helps -
https://github.com/karthiks3000/postman-doc-gen

Login / Register API With Laravel 5 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
How do I can create an API with laravel 5, That will be used for login /register for mobile app? Is there any useful tutorial for this type of API.
Like when someone sends a request from a mobile application, I need to authenticate and then send the proper response against that request.
I've made a very simple version in jQuery format as for example and hosted on GitHub.
Here are all the changes from a fresh Laravel: See all changed files
Feel free to adapt to your code.
You can check the step in each commit.
Create the project (Don't forget to run php artisan make:auth)
Make login support AJAX request (instead of auto redirect) 1a47de4
Login with AJAX (submit login data via AJAX, Please CSRF token header) 80be34d
Make register support AJAX (same as step 2) 89f6dd7
Register via AJAX (Same as step 3) ab8d2d7
Use redirect path from Laravel (Bonus) 27b9a1c4
By the way, for the mobile app, you may need to use access token instead. My example is for web app session. Laravel already have the particular method already just twist a bit.
If you need to create a login register with laravel you can simply use the Heto Multi auth.. All the required details are there..
Heto Multi Auth
Hope This will be helpful
There is a popular tool named - Dingo API which is specially created for Laravel / Lumen Frameworks and is meant to provide you, a set of tools to help you easily and quickly build your own APIs.
The package provide you with these set of features:
Content Negotaition
Authentication
API Versioning
Throttling
Formated / Transformed Responses
API Blueprint Documentation
and much more.
You can find the full documentation of Dingo API here >>
Creating a REST Api on Laravel isn’t very difficult. All we need to keep in mind is that where to start and how to prepare RestFull resources. As usual, you can follow this link: Build Rest Resources With Laravel
And if you want that your API works with Mobile Applications you should use tymon/jwt-auth package.
you can find the tutorial to work with laravel and tymon/jwt-auth in this link: Create an API Server for Mobile Apps using Laravel
The tymon/jwt-auth contains:
Installation of the package.
Configuration
Creating Tokens
Authentication
And the link for tymon/jwt-auth package is:
tymon/jwt-auth package
Here is a solution that shows how to set up register/login/logout endpoints but he changes it slighlty so we don't get the nice effects of too many login attempts etc. https://www.toptal.com/laravel/restful-laravel-api-tutorial
I am still looking for a tutorial on how to do this, will share when I find.

Dropbox - any API to cli_link?

I'm using the dropboxd service under Linux, which requires you to log into their website e.g. https://www.dropbox.com/cli_link?host_id=2173bf325f94beee3b1879d2c7b49e69 to link the machine to your account.
Is there any programatic way to do this (ideally using Java)? To access the website above it seems you need to login using forms (which seems tricky to do programatically), and their basic REST API (https://www.dropbox.com/developers/core/docs) doesnt seem to cover the cli_link command.
I could write an app to do the sync using their full API, but it seems like overkill since aside from the cli_link requirement the basic dropboxd does all that I need.
The official Dropbox desktop client is unrelated to the API, though both the API and the Linux CLI require user interaction on the Dropbox web site (once per link) to authorize the linking. Also, note that automating/scraping the site itself is not allowed by the terms:
https://www.dropbox.com/terms#acceptable_use
Not really a solution for DropBox users, but in the end we just moved over to use MediaFire instead. That has a full REST API and doesnt require any manual intervention.

Google Plus API Nuget Package

I need to create posts, etc through my ASP.NET MVC 4 application.
Does anyone know decent library for Google Plus API? (Preferable as a NuGet package).
There is currently no publicly documented API that lets you automatically post to your Google+ page or stream.
There is an API that HootSuite is currently using that is slowly opening up to other vendors. See https://plus.google.com/u/0/104946722942277428266/posts/LUi2ZNyRHag for more information about what is coming and how you can sign up to request access to this. This is expected to allow you to post to a Google+ Page.
There is also the "Google+ History API" that is currently in developer preview which will allow you to create moments for a user, but they would need to manually share these moments on their stream if they choose to do so. See https://developers.google.com/+/history/ for further details.

To build an App for an Internet site without its API and Schema

I was asked to build a control-system for a Ebay-like Finnish auction-site huuto.net.
The system would reopen closed auctions by a specific rules. It would be completely external from the main site, running at an external website.
The site is however unwilling to release its API and Schema. I know no way to build such a system without knowing its API.
How do you build an internet site without its API and Schema?
You could try some form of automatic browsing: mechanize
Edit:
Examples here.
I think you're asking about building a site that interacts with another site without using a well-defined API. Is that right?
You can interact with an external site without using an official API - in order to do so, you need to imitate a normal site visitor and send your requests to the site frontend (in much the same way as a web crawler does). Tools like hpricot, mechanize and curl can help you parse the content of pages and send requests, but in doing so your system may be quite brittle. Any change to the target site might mean you have to rewrite portions of your system.
It might be possible to get the data you need by screen scraping the site. You could perform the operations you want to do by POSTing data into their forms or using a WebClient type API to make your program act like a web browser but that's likely to be an extremely brittle solution.
Honestly though, without an API, there really is no good solution.
you either need access to the database or an API, otherwise no point in even trying.