API documentation
The back office's REST API, described in OpenAPI 3.1: what a partner, a mobile app or another site can read.
The REST API of the Payload back office, read-only: every published collection is exposed without authentication, in Payload’s format (docs, totalDocs, page, totalPages…). Writing requires a session or an API key; draft content never leaves without a session. Files (images, PDF) are served under /api/<collection>/file/<name>.
Base URL: https://demo.rhanb.com/api Download the OpenAPI document (JSON) · Licence Ouverte 2.0 (Etalab open licence; fictitious demonstration data)
Example:
curl "https://demo.rhanb.com/api/actualites?limit=3&sort=-datePublication&depth=0"- GET
/pagespagesList: Pages
The editorial pages, with their tree and their blocks.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/pages/{id}pagesRead: Page
Parameters Name Type Description id integer - GET
/actualitesactualitesList: News
The published news.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/actualites/{id}actualitesRead: News item
Parameters Name Type Description id integer - GET
/agendaagendaList: Events
The events of the calendar.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/agenda/{id}agendaRead: Event
Parameters Name Type Description id integer - GET
/servicesservicesList: Services
The town services of the directory.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/services/{id}servicesRead: Town service
Parameters Name Type Description id integer - GET
/eluselusList: Elected officials
The members of the town council.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/elus/{id}elusRead: Elected official
Parameters Name Type Description id integer - GET
/equipementsequipementsList: Facilities
The town’s facilities, with their position on the map.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/equipements/{id}equipementsRead: Facility
Parameters Name Type Description id integer - GET
/demarchesdemarchesList: Procedures
The procedures and their steps.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/demarches/{id}demarchesRead: Procedure
Parameters Name Type Description id integer - GET
/documentsdocumentsList: Documents and acts
Acts and publications; restricted documents do not appear without a session.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/documents/{id}documentsRead: Document
Parameters Name Type Description id integer - GET
/themesthemesList: Themes
The shared taxonomy.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/themes/{id}themesRead: Theme
Parameters Name Type Description id integer - GET
/sitessitesList: Sites and mini-sites
The main site and the mini-sites.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/sites/{id}sitesRead: Site
Parameters Name Type Description id integer - GET
/mediasmediasList: Media library
The media library: metadata and image sizes.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/medias/{id}mediasRead: Media
Parameters Name Type Description id integer - GET
/redirectionsredirectionsList: Redirections
The active redirections.
Parameters Name Type Description limit integer Number of documents per page. page integer sort string Sort field; prefixed with - for descending order (e.g. -datePublication). where object Filter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than… depth integer Depth to which relations are resolved. locale fr | en Language of the localised fields. - GET
/redirections/{id}redirectionsRead: Redirection
Parameters Name Type Description id integer - GET
/openapi.jsonmetaThis description
- GET
/santemetaThe back office’s health probe