How to use restful api to create new knowledge document?

  • KM03773841
  • 29-Jan-2021
  • 08-Jun-2021

Summary

How to use restful api to create new KM?

Question

How to use restful api to create new KM?

Answer

1.related action:addimportdocument
2.related process:document.importdocument

URLhttp://10.0.0.11:9620/SM/9/rest/knowledges

方法:post
body:{'Knowledge':{'doctype':'reference','categories':['reference'],'status':'external','title':'test by artist'}}
responsed message:
{
  "Knowledge": {
    "categories": ["KM039T"],
    "category": "reference",
    "creationdate": "2019-03-19T20:16:01+08:00",
    "doctype": "reference",
    "expirationdate": "2020-03-18T20:16:01+08:00",
    "generatedcats": ["reference"],
    "hotnews": false,
    "id": "KM0658",
    "id.alias": "KM0658",
    "status": "external",
    "title": "test by artist"
  }