Skip to main content

plone.restapi is a RESTful hypermedia API for Plone.

Project description

https://secure.travis-ci.org/plone/plone.restapi.png?branch=master https://coveralls.io/repos/github/plone/plone.restapi/badge.svg?branch=master Code Health https://readthedocs.org/projects/pip/badge/ https://img.shields.io/pypi/v/nine.svg

Introduction

plone.restapi is a RESTful hypermedia API for Plone.

RESTful Hypermedia API

REST stands for Representational State Transfer. It is a software architectural principle to create loosely coupled web APIs.

Most web APIs have a tight coupling between client and server. This makes them brittle and hard to change over time. It requires them not only to fully document every small detail of the API, but also write a client implementation that follows that specification 100% and breaks as soon as you change any detail.

A hypermedia API just provides an entry point to the API that contains hyperlinks the clients can follow. Just like a human user of a regular website, that knows the initial URL of a website and then follows hyperlinks to navigate through the site. This has the advantage that the client just needs to understand how to detect and follow links. The URL and other details of the API can change without breaking the client.

Documentation

http://plonerestapi.readthedocs.org

Roadmap

https://github.com/plone/plone.restapi/milestones

Live Demo

Heroku live demo:: http://stormy-headland-44390.herokuapp.com/Plone/

Design Decisions

  • A truly RESTful API (Hypermedia / HATEOAS / Linked-data)

  • JSON is the main target format, support other formats (HTML, XML) later

  • Use HTTP headers (to set format and versioning, also provide URL-based option to make it easier for people to try it out)

  • No versioning, version in the HTTP header can be added later

  • Field names just map over (we will not try to clean up attributes or enforce naming standards like pep8 (e.g. isPrincipiaFoldish -> is_folderish)

Software Quality

  • 100% Test Coverage

  • 100% PEP8 compliant

Further Reading

Standards

License

The project is licensed under the GPLv2.

Contributors

Note: place names and roles of the people who contribute to this package

in this file, one to a line, like so:

  • Timo Stollenwerk, Original Author

  • Thomas Buchberger

  • Lukas Graf

  • Víctor Fernández de Alba

  • Paul Roeland

  • Mikel Larreategi

Changelog

1.0a11 (2017-03-24)

Bugfixes:

  • Remove zope.intid dependency from copy/move endpoint. Remove plone.api dependency from principals endpoint. Make ChoiceslessRelationListSchemaProvider available only if z3c.relationfield is installed. This fixes https://github.com/plone/plone.restapi/issues/288 [erral]

  • Remove unittest2 imports from tests. [timo]

  • Add Products.PasswortResetTool to dependencies. This dependency is gone in Plone 5.1. [timo]

  • Make import of LocalrolesModifiedEvent conditional, so plone.restapi doesn’t prevent Plone 4.3 deployments < 4.3.4 from booting. [lgraf]

1.0a10 (2017-03-22)

New Features:

  • Add @sharing endpoint. [timo,csenger,sneridagh]

  • Add @vocabularies endpoint. [timo,csenger,sneridagh]

  • Add @copy and @move endpoints. [buchi,sneridagh]

  • Docs: Convert all HTTP examples to use sphinxcontrib-httpexample. [lgraf]

  • Add ‘addable’ attribute to the @types endpoint. It specifies if the content type can be added to the current context. See https://github.com/plone/plone.restapi/issues/173. [jaroel]

  • Add support for named IJsonSchemaProvider adapter to target a single field in a schema. This allows us to prevent rendering all choices in relatedItems. See https://github.com/plone/plone.restapi/issues/199. [jaroel]

  • Add review_state to the folderish summary serializer. [sneridagh]

  • Add @principals endpoint. It searches for principals and returns a list of users and groups that matches the query. This is aimed to be used in the sharing UI widget or other user/groups search widgets. [sneridagh]

  • Add reset-password action to the @users endpoint. https://github.com/plone/plone.restapi/issues/158 [timo,csenger]

Bugfixes:

  • Fix coveralls reporting. [timo]

  • Return correct @id for folderish objects created via POST. [lgraf]

  • Fix timezone-related failures when running tests through coverage. [witsch]

  • @search endpoint: Also prefill path query dict with context path. This will allow users to supply an argument like path.depth=1, and still have path.query be prefilled server-side to the context’s path. [lgraf]

  • Overhaul JSON schema generation for @types endpoint. It now returns fields in correct order and in their appropriate fieldsets. [lgraf]

  • Add missing id to the Plone site serialization, related to issue #186. [sneridagh]

  • Add missing adapter for IBytes on JSONFieldSchema generator. This fixes the broken /@types/Image and /@types/File endpoints. [sneridagh]

  • Fix addable types for member users and roles assigned locally on @types endpoint. [sneridagh]

1.0a9 (2017-03-03)

New Features:

  • Make date and datetime fields provide a ‘widget’ attribute. [timo]

  • Add documentation for types endpoint schema. [timo]

  • Add basic groups CRUD operations in @groups endpoints [sneridagh]

  • Make @types endpoint include a ‘mode’ attribute. This fixes https://github.com/plone/plone.restapi/issues/198. [timo]

Bugfixes:

  • Fix queries to ensure ordering of container items by getObjectPositionInParent. [lgraf]

1.0a8 (2017-01-12)

New Features:

  • Add simple user search capabilities in the GET @users endpoint. [sneridagh]

Bugfixes:

1.0a7 (2016-12-05)

Bugfixes:

1.0a6 (2016-11-30)

New Features:

  • Introduce dedicated permission required to use REST API at all (assigned to everybody by default). [lgraf]

Bugfixes:

  • When token expires, PAS plugin should return an empty credential. [ebrehault]

1.0a5 (2016-10-07)

Bugfixes:

1.0a4 (2016-10-05)

New Features:

  • Make POST request return the serialized object. [timo]

  • Include ‘id’ attribute in responses. [timo]

1.0a3 (2016-09-27)

New Features:

  • Add @users endpoint. [timo]

Bugfixes:

  • Fix bug where disabling the “Use Keyring” flag wasn’t persisted in jwt_auth plugin. [lgraf]

1.0a2 (2016-08-20)

New Features:

  • Implements navigation and breadcrumbs components [ebrehault]

  • Add widget and support for RichText field in @types component. [ebrehault]

  • Add fieldsets in @types [ebrehault]

Bugfixes:

  • Disable automatic CSRF protection for @login and @login-renew endpoints: If persisting tokens server-side is enabled, those requests need to be allowed to cause DB writes. [lgraf]

  • Documentation: Fixed parameter ‘data’ to JSON format in JWT Authentication documentation [lccruz]

  • Tests: Fail tests on uncommitted changes to docs/source/_json/ [lgraf]

  • Tests: Use freezegun to freeze hard to control timestamps in response dumps used for documentation. [lgraf]

  • Tests: Limit available languages to a small set to avoid excessive language lists in response dumps used for documentation. [lgraf]

1.0a1 (2016-07-14)

  • Initial release. [timo,buchi,lukasgraf,et al.]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plone.restapi-1.0a11.tar.gz (331.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page