How to update context parameter with empty string using MetaServlet API

Question

How do you update myContextName using a TAC MetaServletCaller script? Because using "context":{"myContextName":""} fails with the following error:

 

{"error":"Missing value at character 144","returnCode":2}

 

Answer

Use single quotes instead of double quotes, as shown below:

 

Windows:

./MetaServletCaller.bat --tac-url=<URL> --json-params={'authUser':'test@company.com','authPass':'test','actionName':'updateTask','taskId':3,'context':{'myContextName':''}}

 

Linux: (wrap the entire JSON string in double-quotes so you can use single quotes inside the string)

./MetaServletCaller.sh --tac-url=<URL> --json-params="{'authUser':'test@company.com','authPass':'test','actionName':'updateTask','taskId':3,'context':{'myContextName':''}}"
Version history
Revision #:
2 of 2
Last update:
‎08-20-2019 10:58 AM
Updated by:
 
Contributors