archastro.platform.v1.resources.automations
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: b17ebd7df67f 4 5from __future__ import annotations 6 7from typing import Any, TypedDict 8 9from ...runtime.http_client import HttpClient, SyncHttpClient 10from ...types.automations import AutomationRun 11 12 13class AutomationInvokeInput(TypedDict, total=False): 14 "Invoke an automation" 15 16 idempotency_key: str | None 17 "Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one." 18 payload: dict[str, Any] | None 19 "Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails." 20 21 22class AsyncAutomationResource: 23 def __init__(self, http: HttpClient): 24 self._http = http 25 26 async def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 27 """ 28 Invoke an automation 29 Triggers a single run of an automation that has `type: "invoked"`. Returns 30 the resulting automation run object, which you can use to poll or display 31 run status. 32 Both server-to-server (secret key) and user (publishable key + JWT) auth 33 are supported. The automation's `invoke_auth` setting controls which auth 34 modes are accepted; requests using an unsupported mode are rejected with 35 403. For server-to-server callers the run executes under the identity 36 configured in the automation's `run_as_user` or `run_as_agent` fields. For 37 authenticated user callers the invoking user's identity is used 38 automatically. 39 If you supply an `idempotency_key`, a second request with the same key 40 returns the existing run rather than creating a new one. 41 42 Args: 43 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 44 input: Request body. 45 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 46 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 47 48 Returns: 49 The automation run created by this invocation. 50 """ 51 return await self._http.request( 52 f"/api/v1/automations/{automation}/invoke", 53 method="POST", 54 body=input, 55 response_type=AutomationRun, 56 ) 57 58 59class AutomationResource: 60 def __init__(self, http: SyncHttpClient): 61 self._http = http 62 63 def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 64 """ 65 Invoke an automation 66 Triggers a single run of an automation that has `type: "invoked"`. Returns 67 the resulting automation run object, which you can use to poll or display 68 run status. 69 Both server-to-server (secret key) and user (publishable key + JWT) auth 70 are supported. The automation's `invoke_auth` setting controls which auth 71 modes are accepted; requests using an unsupported mode are rejected with 72 403. For server-to-server callers the run executes under the identity 73 configured in the automation's `run_as_user` or `run_as_agent` fields. For 74 authenticated user callers the invoking user's identity is used 75 automatically. 76 If you supply an `idempotency_key`, a second request with the same key 77 returns the existing run rather than creating a new one. 78 79 Args: 80 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 81 input: Request body. 82 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 83 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 84 85 Returns: 86 The automation run created by this invocation. 87 """ 88 return self._http.request( 89 f"/api/v1/automations/{automation}/invoke", 90 method="POST", 91 body=input, 92 response_type=AutomationRun, 93 )
14class AutomationInvokeInput(TypedDict, total=False): 15 "Invoke an automation" 16 17 idempotency_key: str | None 18 "Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one." 19 payload: dict[str, Any] | None 20 "Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails."
Invoke an automation
23class AsyncAutomationResource: 24 def __init__(self, http: HttpClient): 25 self._http = http 26 27 async def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 28 """ 29 Invoke an automation 30 Triggers a single run of an automation that has `type: "invoked"`. Returns 31 the resulting automation run object, which you can use to poll or display 32 run status. 33 Both server-to-server (secret key) and user (publishable key + JWT) auth 34 are supported. The automation's `invoke_auth` setting controls which auth 35 modes are accepted; requests using an unsupported mode are rejected with 36 403. For server-to-server callers the run executes under the identity 37 configured in the automation's `run_as_user` or `run_as_agent` fields. For 38 authenticated user callers the invoking user's identity is used 39 automatically. 40 If you supply an `idempotency_key`, a second request with the same key 41 returns the existing run rather than creating a new one. 42 43 Args: 44 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 45 input: Request body. 46 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 47 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 48 49 Returns: 50 The automation run created by this invocation. 51 """ 52 return await self._http.request( 53 f"/api/v1/automations/{automation}/invoke", 54 method="POST", 55 body=input, 56 response_type=AutomationRun, 57 )
27 async def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 28 """ 29 Invoke an automation 30 Triggers a single run of an automation that has `type: "invoked"`. Returns 31 the resulting automation run object, which you can use to poll or display 32 run status. 33 Both server-to-server (secret key) and user (publishable key + JWT) auth 34 are supported. The automation's `invoke_auth` setting controls which auth 35 modes are accepted; requests using an unsupported mode are rejected with 36 403. For server-to-server callers the run executes under the identity 37 configured in the automation's `run_as_user` or `run_as_agent` fields. For 38 authenticated user callers the invoking user's identity is used 39 automatically. 40 If you supply an `idempotency_key`, a second request with the same key 41 returns the existing run rather than creating a new one. 42 43 Args: 44 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 45 input: Request body. 46 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 47 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 48 49 Returns: 50 The automation run created by this invocation. 51 """ 52 return await self._http.request( 53 f"/api/v1/automations/{automation}/invoke", 54 method="POST", 55 body=input, 56 response_type=AutomationRun, 57 )
Invoke an automation
Triggers a single run of an automation that has type: "invoked". Returns
the resulting automation run object, which you can use to poll or display
run status.
Both server-to-server (secret key) and user (publishable key + JWT) auth
are supported. The automation's invoke_auth setting controls which auth
modes are accepted; requests using an unsupported mode are rejected with
- For server-to-server callers the run executes under the identity
configured in the automation's
run_as_userorrun_as_agentfields. For authenticated user callers the invoking user's identity is used automatically. If you supply anidempotency_key, a second request with the same key returns the existing run rather than creating a new one.
Arguments:
- automation: Automation ID (
auto_...) orlookup_keyof the automation to invoke. - input: Request body.
- input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one.
- input.payload: Arbitrary input data passed to the automation. Validated against the automation's
input_schemawhen one is configured; the request is rejected with 422 if validation fails.
Returns:
The automation run created by this invocation.
60class AutomationResource: 61 def __init__(self, http: SyncHttpClient): 62 self._http = http 63 64 def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 65 """ 66 Invoke an automation 67 Triggers a single run of an automation that has `type: "invoked"`. Returns 68 the resulting automation run object, which you can use to poll or display 69 run status. 70 Both server-to-server (secret key) and user (publishable key + JWT) auth 71 are supported. The automation's `invoke_auth` setting controls which auth 72 modes are accepted; requests using an unsupported mode are rejected with 73 403. For server-to-server callers the run executes under the identity 74 configured in the automation's `run_as_user` or `run_as_agent` fields. For 75 authenticated user callers the invoking user's identity is used 76 automatically. 77 If you supply an `idempotency_key`, a second request with the same key 78 returns the existing run rather than creating a new one. 79 80 Args: 81 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 82 input: Request body. 83 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 84 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 85 86 Returns: 87 The automation run created by this invocation. 88 """ 89 return self._http.request( 90 f"/api/v1/automations/{automation}/invoke", 91 method="POST", 92 body=input, 93 response_type=AutomationRun, 94 )
64 def invoke(self, automation: str, input: AutomationInvokeInput) -> AutomationRun: 65 """ 66 Invoke an automation 67 Triggers a single run of an automation that has `type: "invoked"`. Returns 68 the resulting automation run object, which you can use to poll or display 69 run status. 70 Both server-to-server (secret key) and user (publishable key + JWT) auth 71 are supported. The automation's `invoke_auth` setting controls which auth 72 modes are accepted; requests using an unsupported mode are rejected with 73 403. For server-to-server callers the run executes under the identity 74 configured in the automation's `run_as_user` or `run_as_agent` fields. For 75 authenticated user callers the invoking user's identity is used 76 automatically. 77 If you supply an `idempotency_key`, a second request with the same key 78 returns the existing run rather than creating a new one. 79 80 Args: 81 automation: Automation ID (`auto_...`) or `lookup_key` of the automation to invoke. 82 input: Request body. 83 input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one. 84 input.payload: Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails. 85 86 Returns: 87 The automation run created by this invocation. 88 """ 89 return self._http.request( 90 f"/api/v1/automations/{automation}/invoke", 91 method="POST", 92 body=input, 93 response_type=AutomationRun, 94 )
Invoke an automation
Triggers a single run of an automation that has type: "invoked". Returns
the resulting automation run object, which you can use to poll or display
run status.
Both server-to-server (secret key) and user (publishable key + JWT) auth
are supported. The automation's invoke_auth setting controls which auth
modes are accepted; requests using an unsupported mode are rejected with
- For server-to-server callers the run executes under the identity
configured in the automation's
run_as_userorrun_as_agentfields. For authenticated user callers the invoking user's identity is used automatically. If you supply anidempotency_key, a second request with the same key returns the existing run rather than creating a new one.
Arguments:
- automation: Automation ID (
auto_...) orlookup_keyof the automation to invoke. - input: Request body.
- input.idempotency_key: Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one.
- input.payload: Arbitrary input data passed to the automation. Validated against the automation's
input_schemawhen one is configured; the request is rejected with 422 if validation fails.
Returns:
The automation run created by this invocation.