From 99a462a3148e9200963603295a10e1544b588a17 Mon Sep 17 00:00:00 2001 From: Simon Fredsted Date: Thu, 25 Apr 2024 19:51:23 +0200 Subject: [PATCH] Add "Execute Custom Actions" endpoint --- docs/api/custom-actions.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/api/custom-actions.md b/docs/api/custom-actions.md index d75046a..345ec9e 100644 --- a/docs/api/custom-actions.md +++ b/docs/api/custom-actions.md @@ -212,7 +212,7 @@ r = requests.post('https://webhook.site/token/7d63959e-4fec-49bd-90dc-a461572282 "request.hostname": "webhook.site", "request.size": 0, "request.type": "web", - "request.ip": "86.52.35.76", + "request.ip": "127.0.0.1", "request.user_agent": "Paw/3.3.5 (Macintosh; OS X/11.6.2) GCDHTTPRequest", "request.url": "https://webhook.site/7fc77812-9efe-41b6-9365-e2c1fb5feb62", "request.method": "POST", @@ -222,26 +222,22 @@ r = requests.post('https://webhook.site/token/7d63959e-4fec-49bd-90dc-a461572282 } ``` -### Delete Custom Action +### Execute Custom Actions * Can require authentication. -**DELETE** `/token/:token_id/actions/:action_id` +**POST** `/token/:token_id/request/:request_id/execute` -### Toggle Custom Actions +Runs all Custom Actions for a specific token and request and returns the output. -* Can require authentication. +#### Response -***PUT*** `/token/:token_id/actions/toggle` +`200 OK` -This endpoint toggles whether actions are enabled on a specific token. +*See [Test Custom Action](#test-custom-action) endpoint.* -#### Response +### Delete Custom Action -`200 OK` +* Can require authentication. -```json -{ - "enabled": true -} -``` +**DELETE** `/token/:token_id/actions/:action_id` \ No newline at end of file