A Directus interface extension for triggering API calls from the UI.
- Support common HTTP methods. GET, POST, PUT, PATCH, DELETE.
- API calls are authenticated automatically.
- Dynamic URL. Use micromustache to generate dynamic URL based on the current values of the item.
- Disable trigger based on the current values of the item.
npm i directus-extension-api-trigger-interface
- Go to Settings, create a new field with type alias.
- In the Interface panel, choose API Trigger interface. There are 2 options:
- Layout: Display the button list vertically or horizontally.
- Triggers: A list of trigger.
- Label: label of the button
- Size: size of the button
- Type: style of the button
- Icon: icon of the button
- URL: API endpoint
- Method: Method of the API call
- Reload: If enabled, reload the browser if call succeeded
- Disabled Conditions: disable the button if the conditions are met.
- Only works for same domain APIs.
- Allow to disable authentication.
- Call external APIs.
- Reduce budnle size.