Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tips / Web Services

Web Services

The Web Services API for Plone (wsapi4plone) is a Zope 2 package that provides an XML-RPC Application Programming Interface (API) for the Plone.

Web Service 透過 HTTP 協定和 API 來提供軟體功能,通常是給另一個程式使用,而非直接和使用者互動。利用 URL 來存取,回傳的資料常使用 XML 或 JSON 格式,再由程式解析利用。常見的 Web Service 有 REST 和 SOAP 兩大形式協定。

最基本的 Web Service 需要實作 GetCapabilities 和 GetMap,額外可以實作 GetFeatureInfo,WMS 並沒有規範 tile,而另有 WEM Tiling Client Recommendation 來確保產生的地圖包含固定大小的 tile。OpenLayers 是支援多重圖疊的 Javascript 函式庫,應用時要先建立 HTML 檔案,載入使用者的瀏覽器後,再撰寫 Javascript 存取 OpenLayers API 來建立需要的地圖。

REST API

How It Begins API Discussion RESTful API vs HTTP API: Microsoft Case GraphQL vs REST API

JSON Content Type MIME: application/json JSONP: application/javascript Why Should Not Use text/html for JSON

JSON Server to build Fake REST API

REST plone.rest Redirect Handling plone.restapi @users endpoint @theme endpoint barceloneta-mocks Flask Example Clear a DateTime Field

Major Categories REST for Plone 2013-04-15

WebLion subversion

plone.restapi 相依關係 plone.rest PyJWT collective.jsonify

範例: plone.jsonapi.routes 新增 author 資訊

DeprecationWarning: getSiteEncoding is deprecated. Plone only supports UTF-8 currently. This method always returns "utf-8"

WSGI

Hanno Schlichting: Zope2 4.0 the main goal was to make it possible to run Zope without all of these extra protocols, so applications like Plone can decide what they want to use. And hopefully porting to Python 3 becomes easier with fewer I/O boundaries to take care of.

Packages using the API

  • msp2plone -- A Microsoft Project XML to Plone 'eXtreme Management' importer.
  • collective.contentrules.wsapi4plone -- A collection of rules for sending content from one Plone site to another on content events, such as when a content object is modified.
  • Parfait -- AtomPub WSGI middleware to enable the Atom Publication Protocol in Plone.
  • wsapi4plone.client -- An XML-RPC client built specifically to interact with Plone.
  • wsapi4plone.webslinger -- An extendable client package for importing content into Plone.
  • wsapi4plone.remotemgmt -- A Plone product for managing Plone sites from a remote application.
  • PloneBatcher -- A package for batch processing Plone content creation, extraction, and updates.

Overview of Enhancements and Bug Fixes

Specifications and Data Formats

  1. XMLRPC specification
  2. JSON specification
  3. REST specification
  4. SOAP specification
  5. Atom Publishing Protocol (APP)

Standard APIs

More Information

Related Information