Skip to content
Demonstration site of EURL rhanb. All content is fictitious. About this demonstration
AubrignyTown website (demonstration)
Français

Public inquiry into the local development plan From 26 October to 27 November, have your say on the revised local plan. Read the notice

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/pagespages

    List: Pages

    The editorial pages, with their tree and their blocks.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/pages/{id}pages

    Read: Page

    Parameters
    NameTypeDescription
    idinteger
  • GET/actualitesactualites

    List: News

    The published news.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/actualites/{id}actualites

    Read: News item

    Parameters
    NameTypeDescription
    idinteger
  • GET/agendaagenda

    List: Events

    The events of the calendar.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/agenda/{id}agenda

    Read: Event

    Parameters
    NameTypeDescription
    idinteger
  • GET/servicesservices

    List: Services

    The town services of the directory.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/services/{id}services

    Read: Town service

    Parameters
    NameTypeDescription
    idinteger
  • GET/eluselus

    List: Elected officials

    The members of the town council.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/elus/{id}elus

    Read: Elected official

    Parameters
    NameTypeDescription
    idinteger
  • GET/equipementsequipements

    List: Facilities

    The town’s facilities, with their position on the map.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/equipements/{id}equipements

    Read: Facility

    Parameters
    NameTypeDescription
    idinteger
  • GET/demarchesdemarches

    List: Procedures

    The procedures and their steps.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/demarches/{id}demarches

    Read: Procedure

    Parameters
    NameTypeDescription
    idinteger
  • GET/documentsdocuments

    List: Documents and acts

    Acts and publications; restricted documents do not appear without a session.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/documents/{id}documents

    Read: Document

    Parameters
    NameTypeDescription
    idinteger
  • GET/themesthemes

    List: Themes

    The shared taxonomy.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/themes/{id}themes

    Read: Theme

    Parameters
    NameTypeDescription
    idinteger
  • GET/sitessites

    List: Sites and mini-sites

    The main site and the mini-sites.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/sites/{id}sites

    Read: Site

    Parameters
    NameTypeDescription
    idinteger
  • GET/mediasmedias

    List: Media library

    The media library: metadata and image sizes.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/medias/{id}medias

    Read: Media

    Parameters
    NameTypeDescription
    idinteger
  • GET/redirectionsredirections

    List: Redirections

    The active redirections.

    Parameters
    NameTypeDescription
    limitintegerNumber of documents per page.
    pageinteger
    sortstringSort field; prefixed with - for descending order (e.g. -datePublication).
    whereobjectFilter, with the syntax where[field][operator]=value; operators: equals, contains, in, greater_than, less_than…
    depthintegerDepth to which relations are resolved.
    localefr | enLanguage of the localised fields.
  • GET/redirections/{id}redirections

    Read: Redirection

    Parameters
    NameTypeDescription
    idinteger
  • GET/openapi.jsonmeta

    This description

  • GET/santemeta

    The back office’s health probe