This is an old revision of the document!


Webhooks

Gives Webhook functionality to Lime CRM. Webhooks make it possible to create a subscription from an external system to events in Lime CRM. You can subscribe to new, update, delete and restore for all available Limetypes.

It is possible to list available events, current subscriptions and register a new or update an existing subscription.

To be able to call the endpoints, the user must be an Administrator or part of the dedicated Lime CRM group Webhook Users.

  • On-premise server environment.
  • Lime CRM server version 12.48 or newer.
  1. Create a group in LISA called Webhook Users.
  2. Download the latest release from GitHub (Internal access only). Unzip and put it in a folder for plugins on the application server. Please note that the files will be used also when running it, and not just for installation.
  3. In a command prompt with elevated rights, go to the folder where you put the files and run the following command. Lime crm server version < 13:
     limeplug install . 

    Lime crm server version >= 13:

     pip install -e .
  4. Restart the web server and the event handler

The base url is https://{your_lime_app_url}/{your_lime_app}/api/v1/subscription/

GET: /subscription/available/

GET: /subscription/

POST: /subscription/

One can add a secret key when creating a subscription.

request body:

{
    "events" : ["company.new", "helpdesk.update"],
    "target_url" : "https://example.org/hook/123",
    "secret": "very_secret_key" // optional 
}

Partial updates are supported, i.e just updating one, or more properties without affecting the remaining properties

PUT: /subscription/:id

request body:

{
    "events" : ["company.new"],
    "target_url" : "https://example.org/hook/123",
    "enabled": true
}

GET: /subscription/:id

response body:

{
    "id" : 1,
    "events" : ["company.new"],
    "target_url" : "https://example.org/hook/123",
    "enabled": true
}

DELETE: /subscription/:id

  • Last modified: 5 years ago
  • by Eivind Gamst