REST Message from Workflow Being Truncated

chrisshellhamme
Tera Expert

I have created a REST message to an in-house created API.   When I test the message using the test functionality from the HTTP Method, it works as expected, however when I call it from a Workflow using the REST Message WF Activity the endpoint URL is being truncated.   The URL is 132 characters long, but it is being truncated at 120 characters.

Is there some setting that needs to be changed to allow a REST message with an endpoint longer than 120 characters to be submitted from a workflow?

Thanks in advance,

Chris

1 ACCEPTED SOLUTION

Ok, It seem to be something related to the URL limit that browser can handle? I am not very sure about it, may be you should try sending the message in a Run script activity after calling the API.



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


View solution in original post

5 REPLIES 5

Alikutty A
Tera Sage

Hi Chris,



In the workflow activity variable table (wf_activity_variable), You can search for Label=REST Endpoint and modify the max length of its variable to 200. It should update the size of endpoint in your workflow rest message as well.



I also checked the endpoint on Rest Message record is 200 characters long.



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Hi Allykutty,



Thanks for your reply.



I'm not actually using that field in the WF activity.   The endpoint is being supplied by the REST Message that I had created previously.   I am only passing variables to the REST message:



find_real_file.png


The current value for the length of the REST Endpoint field in my system is 100, however the message that is hitting the API is 120 characters long.



Thanks



Chris


Ok, It seem to be something related to the URL limit that browser can handle? I am not very sure about it, may be you should try sending the message in a Run script activity after calling the API.



Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Thanks for the suggestion Alikutty, and I apologize for misspelling your name in my previous post.   The call to the API via the scripted REST message was successful and not truncated.   I think I will open an Incident in HI because this does seem to be an issue when using the workflow activity, but the scripted method is a good workaround.



For reference on the scripted REST message:



Scripting Outbound REST - ServiceNow Wiki