updateKnowledgeBaseTemplateUri method

Future<UpdateKnowledgeBaseTemplateUriResponse> updateKnowledgeBaseTemplateUri({
  1. required String knowledgeBaseId,
  2. required String templateUri,
})

Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Wisdom using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter knowledgeBaseId : The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

Parameter templateUri : The template URI to update.

Implementation

Future<UpdateKnowledgeBaseTemplateUriResponse>
    updateKnowledgeBaseTemplateUri({
  required String knowledgeBaseId,
  required String templateUri,
}) async {
  final $payload = <String, dynamic>{
    'templateUri': templateUri,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/knowledgeBases/${Uri.encodeComponent(knowledgeBaseId)}/templateUri',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateKnowledgeBaseTemplateUriResponse.fromJson(response);
}