为Joomla 3.0 REST API [英] REST API for Joomla 3.0

查看:1344
本文介绍了为Joomla 3.0 REST API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的Joomla 3.3.6,并需要找到一个REST API访问内容信息,用户信息等。我已经尝试使用下面的REST API,它是由TechJoomla开发的,但不能查找有关样本的请求,验证过程等一个适当的文件。

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

同时,我认为这是发展成为为Joomla的扩展,这似乎是一个付费扩展jbackend REST API。

And also i considered the jbackend REST API which is developed as an extension for joomla which seems to be a paid extension.

很多谷歌上搜索我仍然在努力寻找一个REST API来访问的Joomla内容后。请帮我这个问题。

After lot of googling i'm still struggling to find a REST API to access the Joomla content. Please help me with this issue.

感谢您提前。

推荐答案

我碰到了同样的问题,以及这就是为什么我最终发展为Joomla 3.4.x一个RESTful API,搭载了超薄的PHP微架构。请注意,这是一个商业的Joomla包。

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:


  • 服务控制面板组件

  • 的Joomla服务附加库,其中包括一个版本V2.6.2修身的(连同其他几个库),通过作曲家获得,通常在供应商文件夹中找到。在此以后...

  • 服务的Joomla插件

  • 服务REST插件

  • 服务修身配置插件

  • 修身JSON API插件查看

  • 修身JSON API中间件插件

您可能会问,什么是所有这些插件的地步?

You might ask, "What is the point of all these plugins?"

答案是,它允许核心部件的功能划分,并打开大门一种可轻松扩展服务路线架构。请注意,新的插件可以很容易地与Joomla ACL限制访问这些新航线,例如添加。

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.

服务控制面板允许建立在每个用户的基础上(或每用户的Joomla甚至多个标记)标记。它也允许最终用户配置超薄微框架参数,甚至包括用于API限速功能(目前基于请求每分钟)的阈值。其实,这部分是完全真棒,因为它提供了对响应头中的API率阈值的状态实时反馈。

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.

该CAPI Core包(CAPI,简称恒API,因为一切都需要一个产品名称......)就是这样 - 一个的核心的包。有附加组件目前正在开发,第一个是安全LDAP JSON API(它连接到Microsoft Active Directory)中,有很多更冷静的附加组件来了。

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.

所以,你得到的最好的的Joomla(强大的ACL,先进的插件架构,扩展的财富)和Sim(证明,符合标准的,成熟的RESTful PHP微架构),都在一个易于安装包。

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.

通过一个易于可查询API暴露一个网站不应该掉以轻心。我希望有人选择做这将实现100%的HTTPS访问和安全性,强化他们的服务器(S)。

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).

您可以在这里找到更多的信息: http://getcapi.org

You can find more information here: http://getcapi.org

希望这可以让你在正确的方向前进。

Hope this gets you going in the right direction.

一件事:

我又读了你的问题,也读到了你需要访问的用户和内容的一部分。这实际上是第一个服务端点对我的工作:

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 /用户/
- 可用于进出登录用户,并在响应返回激活的Joomla会议
- 这也提供了多模式身份验证(既可以通过在页眉或用户名和放标记;在URL字符串密码)。基本上,它与您的需求。
- 强制用户退出是这样的:
/ API / V1 /用户/注销/用户名/ joomlasessionid

/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

基本上,这是驱动远程服务,或者说iOS或Android应用量身订做。

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

另外,
    / API / V1 /用户/登录/(用户名)/(密码)

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

应该不用说,所有的CAPI Core包提高了包括年度订阅费。加载项(会)计费,并分别支持。

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.

更新2016年3月28日

Update 2016-03-28

作为CAPI V1.2.1的已被添加的新方法,以允许为Joomla用户和组管理CRUD。另外,我在 http://getcapi.io 工作沙盒集群上,让潜在客户能够充分测试出订阅之前的API功能。

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.

这篇关于为Joomla 3.0 REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆