postBotRunsByRunidStopWithHttpInfo method
Stop terminates one of the caller org's own bot runs and reports its terminal state.
Stop terminates one of the caller org's own bot runs and reports its terminal state. The own-key guard is the org: it is the caller's validated org, never theirs to choose, and the runtime resolves the run id UNDER it. A run belonging to another tenant is not among this org's runs, so it answers absent — the same 404 a nonexistent id gets, which is what keeps this from being an oracle. Absence is honoured ONLY when the runtime answers it. A runtime that does not serve stop reports nothing about the run, and reporting "stopped" on that basis would be a stop that cannot fail — so it is a 502.
Note: This method returns the HTTP Response.
Parameters:
- String runId (required):
RunID is the run to stop, as the bot runtime named it. It is read from the URL — the
{runId}segment the router matched on — and a body carrying a different id cannot redirect the stop.
Implementation
Future<Response> postBotRunsByRunidStopWithHttpInfo(String runId,) async {
// ignore: prefer_const_declarations
final path = r'/v1/bot/runs/{runId}/stop'
.replaceAll('{runId}', runId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}