Hi,
What is the process to publish a KnowledgeArticle via the Web API? I have been able to successfully post a KnowledgeArticle in draft state, but need to move it to Published state. Here is my code to publish in draft state in C#
JObject jObject = new JObject(); jObject["content"] = kba.Content; jObject["title"] = kba.Title; jObject["createdon"] = DateTime.Now; jObject["modifiedon"] = DateTime.Now; jObject["knowledgearticleviews_date"] = DateTime.Now; jObject["rating_date"] = DateTime.Now; jObject["knowledgearticleid"] = Guid.NewGuid().ToString(); jObject["description"] = kba.Description; var client = new RestClient(Settings.DynamicsApiUrl + "/knowledgearticles"); var request = new RestRequest(Method.POST); request.AddParameter("authorization", string.Format("Bearer " + _authToken), ParameterType.HttpHeader); request.AddParameter("application/json", jObject.ToString(), ParameterType.RequestBody); request.RequestFormat = DataFormat.Json; request.AddBody(jObject.ToString()); IRestResponse response = client.Execute(request); if (!response.IsSuccessful) throw new Exception(response.Content);
*This post is locked for comments