Creare un webhook

Per creare un webhook, usare il metodo POST. Il corpo POST deve contenere opzioni specifiche in formato JSON.

Componente Descrizione

Metodo HTTP

POST

URL

https://host/fmi/odata/versione/nome-database/Webhook.Aggiungi

host – nome host FileMaker Cloud o FileMaker Server

versione – versione OData, sempre v4

nome-database – nome del database ospitato

Esempio: /fmi/odata/v4/GestContatti/Webhook.Aggiungi

Parametri

Esempio JSON:

Copia
{
  "webhook": "https://mio.esempio.com:8080/webhook",
  "headers": {
    "Content-Type": "applicazione/json"
  }, 
  "tableName": "miaTabella",
  "notifySchemaChanges": Vero,
  "select": "ChiavePrimaria,CreatoDa",
  "filter": "CreatoDa eq 'Admin'",
  //FileMaker Cloud
  "maxFailedAttempts": "10"
}

Note 

  • FileMaker Cloud: maxFailedAttempts si applica al webhook creato. L'impostazione di maxFailedAttempts su 0 indica che non c'è un massimo e che il webhook riproverà a inviare il payload a tempo indeterminato finché il payload non verrà ricevuto correttamente o finché il webhook non verrà eliminato. I nuovi tentativi vengono registrati nel file fmodata.log.