Configuration API

Save KB

Creates a kb. The created kb will have the same name as the uploaded file

POST/rest/kb/
 Query parameters None
 Header auth-token:token from authentication
 Header/Parameter  tenant
 Body
  • Kb: multipart with the kb file
  • overwrite: (optional) id of another kb that have to be replaced with the new one. All KBA will be updated with the new reference. The old KB will not be deleted.
Returns {"result":"ok"}
Required role ADMIN
Managed errors 401: insufficient privileges

Example request

curl 'http://localhost:8080/mwp/rest/kb/'
-H 'Content-Type: multipart/form-data; boundary=----FormBoundaryR2Yh2znDrIMulFX0'
-H 'auth-token: 183d762a-0a10-41a0-8323-ef9a761ade60' -H 'tenant:default'
--data-binary $'
------FormBoundaryR2Yh2znDrIMulFX0\r\nContent-Disposition: form-data; name="kb"; filename="Order Handling.mplx"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n
------FormBoundaryR2Yh2znDrIMulFX0--\r\n'

Example request

curl 'http://localhost:8080/mwp/rest/kb/' -H "auth-token:775866eb-1608-4c8e-b349-e25212a336c3.local" -H "tenant:default" -X POST -F "kb=@new.mplx;filename=fran" -F "comment=the comment"

Example response

{  
   "result":"ok"
}

Feedback