putToolsActivation method

Future<ActivationSet?> putToolsActivation(
  1. ActivationReq activationReq
)

Switches tools on and off for the caller's org and project, and answers with the resulting activated set.

Switches tools on and off for the caller's org and project, and answers with the resulting activated set. It is the ONE write path that turns skills, plugins and connectors into callable tools — an unactivated tool is listed by discovery but refused 403 at dispatch. Activate is applied before Deactivate, so a name in both lists ends up off. More than 256 toggles in one request is refused 413.

Parameters:

Implementation

Future<ActivationSet?> putToolsActivation(ActivationReq activationReq,) async {
  final response = await putToolsActivationWithHttpInfo(activationReq,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivationSet',) as ActivationSet;

  }
  return null;
}