Navigation

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Example of an API call

    ChurchTools Interfaces
    1
    2
    1343
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mhuber
      mhuber ChurchToolsMitarbeiter last edited by

      As ChurchTools does the whole communication via AJAX, every function can be call via the API as well.
      E.g. https://xxx.churchtools.de/index.php?q=churchresource/ajax

      The calls always have to be sent via POST and need to contain the function name as parameter "func", e.g. func=getBookings (to get all booking) or func=getMasterData to get all needed masterdata.

      Per module there are different functions. You can look them up unter system/modulename/classes/CTModulename.class.php or at api.churchtools.de .

      Further examples for API calls:

      LOGIN
      https://xxx.churchtools.de/?q=login/ajax
      needs these parameters in the POST body:
      email
      password

      REQUEST ALL PERSONS
      https://xxx.churchtools.de/?q=churchdb/ajax&func=getAllPersonData

      1 Reply Last reply Reply Quote 0
      • mhuber
        mhuber ChurchToolsMitarbeiter last edited by mhuber

        We have created two example projects for you, which also handle login and cookie handling:

        PHP: https://github.com/churchtools/ctapidemo

        Node.js: https://github.com/churchtools/ctnodedemo

        1 Reply Last reply Reply Quote 0
        • First post
          Last post