From d449eca002e76128c1021fb7c6b776c0c3d2199f Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Tue, 18 Nov 2025 15:45:56 +0100 Subject: [PATCH 1/6] add trigger doc --- paths/automations/trigger.yaml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 paths/automations/trigger.yaml diff --git a/paths/automations/trigger.yaml b/paths/automations/trigger.yaml new file mode 100644 index 00000000..31d8b9f2 --- /dev/null +++ b/paths/automations/trigger.yaml @@ -0,0 +1,44 @@ +--- +summary: Trigger an automation +description: | + Trigger an automation. +operationId: automation/trigger +tags: +- Automations +parameters: +- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" +- "$ref": "../../parameters.yaml#/account_id" +- "$ref": "../../parameters.yaml#/id" +responses: + '200': + description: OK + content: + application/json: + schema: + "$ref": "../../schemas/automation.yaml#/automation" + headers: + X-Rate-Limit-Limit: + "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" + X-Rate-Limit-Remaining: + "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" + X-Rate-Limit-Reset: + "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" + '400': + "$ref": "../../responses.yaml#/400" + '404': + "$ref": "../../responses.yaml#/404" + '429': + "$ref": "../../responses.yaml#/429" +x-code-samples: +- lang: Curl + source: |- + curl "https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger" \ + -u USERNAME_OR_ACCESS_TOKEN + -X POST + -H 'Content-Type: application/json' +- lang: CLI v2 + source: |- + phrase automations trigger \ + --account_id \ + --id \ + --access_token From d8330c0aeec070f1f0d829d3deaa161a4f560978 Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Tue, 18 Nov 2025 15:48:30 +0100 Subject: [PATCH 2/6] add path --- paths.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paths.yaml b/paths.yaml index a6584f39..dd102871 100644 --- a/paths.yaml +++ b/paths.yaml @@ -725,6 +725,8 @@ "/accounts/{account_id}/automations/{automation_id}": get: "$ref": "./paths/automations/show.yaml" + post: + "$ref": "./paths/automations/trigger.yaml" patch: "$ref": "./paths/automations/update.yaml" delete: From 5be4d6a71c4c0054bf7c76319118e509c68da1a1 Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Tue, 18 Nov 2025 15:50:37 +0100 Subject: [PATCH 3/6] rebuild clients --- doc/compiled.json | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/doc/compiled.json b/doc/compiled.json index 46fd61a1..9f2d1f68 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -28541,6 +28541,67 @@ } ] }, + "post": { + "summary": "Trigger an automation", + "description": "Trigger an automation.\n", + "operationId": "automation/trigger", + "tags": [ + "Automations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/account_id" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/automation" + } + } + }, + "headers": { + "X-Rate-Limit-Limit": { + "$ref": "#/components/headers/X-Rate-Limit-Limit" + }, + "X-Rate-Limit-Remaining": { + "$ref": "#/components/headers/X-Rate-Limit-Remaining" + }, + "X-Rate-Limit-Reset": { + "$ref": "#/components/headers/X-Rate-Limit-Reset" + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "429": { + "$ref": "#/components/responses/429" + } + }, + "x-code-samples": [ + { + "lang": "Curl", + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger\" \\\n -u USERNAME_OR_ACCESS_TOKEN\n -X POST\n -H 'Content-Type: application/json'" + }, + { + "lang": "CLI v2", + "source": "phrase automations trigger \\\n--account_id \\\n--id \\\n--access_token " + } + ] + }, "patch": { "summary": "Update an automation", "description": "Update an existing automation.\n\nFor feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).\n", From 272b82ea5687d8329f9f48f638a1120909e78c9d Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Wed, 19 Nov 2025 15:03:24 +0100 Subject: [PATCH 4/6] change resp to no content --- paths/automations/trigger.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/paths/automations/trigger.yaml b/paths/automations/trigger.yaml index 31d8b9f2..353408f6 100644 --- a/paths/automations/trigger.yaml +++ b/paths/automations/trigger.yaml @@ -10,19 +10,8 @@ parameters: - "$ref": "../../parameters.yaml#/account_id" - "$ref": "../../parameters.yaml#/id" responses: - '200': - description: OK - content: - application/json: - schema: - "$ref": "../../schemas/automation.yaml#/automation" - headers: - X-Rate-Limit-Limit: - "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" - X-Rate-Limit-Remaining: - "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" - X-Rate-Limit-Reset: - "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" + '204': + "$ref": "../../responses.yaml#/204" '400': "$ref": "../../responses.yaml#/400" '404': From 7b57be82c5714834e521fbbdfbc30d96de1e5002 Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Wed, 19 Nov 2025 15:10:48 +0100 Subject: [PATCH 5/6] rebuild clients --- doc/compiled.json | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 9f2d1f68..f49a8564 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -28560,26 +28560,8 @@ } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/automation" - } - } - }, - "headers": { - "X-Rate-Limit-Limit": { - "$ref": "#/components/headers/X-Rate-Limit-Limit" - }, - "X-Rate-Limit-Remaining": { - "$ref": "#/components/headers/X-Rate-Limit-Remaining" - }, - "X-Rate-Limit-Reset": { - "$ref": "#/components/headers/X-Rate-Limit-Reset" - } - } + "204": { + "$ref": "#/components/responses/204" }, "400": { "$ref": "#/components/responses/400" From 9b055e006afe3d06332b181163f741402e1d559e Mon Sep 17 00:00:00 2001 From: anthonyshchang Date: Wed, 19 Nov 2025 15:24:28 +0100 Subject: [PATCH 6/6] fix path --- doc/compiled.json | 88 ++++++++++++++++++++++++----------------------- paths.yaml | 5 +-- 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index f49a8564..f30b9b88 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -28541,49 +28541,6 @@ } ] }, - "post": { - "summary": "Trigger an automation", - "description": "Trigger an automation.\n", - "operationId": "automation/trigger", - "tags": [ - "Automations" - ], - "parameters": [ - { - "$ref": "#/components/parameters/X-PhraseApp-OTP" - }, - { - "$ref": "#/components/parameters/account_id" - }, - { - "$ref": "#/components/parameters/id" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger\" \\\n -u USERNAME_OR_ACCESS_TOKEN\n -X POST\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase automations trigger \\\n--account_id \\\n--id \\\n--access_token " - } - ] - }, "patch": { "summary": "Update an automation", "description": "Update an existing automation.\n\nFor feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).\n", @@ -28892,6 +28849,51 @@ } ] } + }, + "/accounts/{account_id}/automations/{automation_id}/trigger": { + "post": { + "summary": "Trigger an automation", + "description": "Trigger an automation.\n", + "operationId": "automation/trigger", + "tags": [ + "Automations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/account_id" + }, + { + "$ref": "#/components/parameters/id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "400": { + "$ref": "#/components/responses/400" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "429": { + "$ref": "#/components/responses/429" + } + }, + "x-code-samples": [ + { + "lang": "Curl", + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/automations/:id/trigger\" \\\n -u USERNAME_OR_ACCESS_TOKEN\n -X POST\n -H 'Content-Type: application/json'" + }, + { + "lang": "CLI v2", + "source": "phrase automations trigger \\\n--account_id \\\n--id \\\n--access_token " + } + ] + } } } } diff --git a/paths.yaml b/paths.yaml index dd102871..a16e6459 100644 --- a/paths.yaml +++ b/paths.yaml @@ -725,8 +725,6 @@ "/accounts/{account_id}/automations/{automation_id}": get: "$ref": "./paths/automations/show.yaml" - post: - "$ref": "./paths/automations/trigger.yaml" patch: "$ref": "./paths/automations/update.yaml" delete: @@ -737,3 +735,6 @@ "/accounts/{account_id}/automations/{automation_id}/deactivate": post: "$ref": "./paths/automations/deactivate.yaml" +"/accounts/{account_id}/automations/{automation_id}/trigger": + post: + "$ref": "./paths/automations/trigger.yaml"