ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

WebService Rest Job's URI value encodes question mark (?) character to "special characters"

book

Article ID: 213407

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM) CA Automic One Automation

Issue/Introduction

If a WebService REST login object's URI value contains a URL that has a question mark (?), during runtime the Webservice Agent encodes the question mark to the value '%3F', which causes the Job to Abort. See below example:

Example URI value

http://www.test.com/coresuite/test/jobs/executions/106.json?includeLogs=false

Error in output

WebServiceRest 4.5.2+build.547 CA Inc. Secure Application Development
Start time: 4/20/21 10:35 AM
Run ID: 18729
Job: TEST

****************************************** Start of job log ******************************************
Connect timeout set to 30 seconds
Read timeout set to:60
Using connection:TEST
Authentication type:Basic
Request:GET http://www.test.com:8080/coresuite/test/jobs/executions/106.json%3FincludeLogs=false
Request headers:{Content-Type=[application/json]}

[omitted portion of output]

An error occured - processing the response query
Response query parse error: There was an error executing the query to retrieve variables from the response.
First part of the response being processed:<!DOCTYPE html PUBLI
Error from the execution of the query:
ERROR Cannot execute query.
java.lang.IllegalArgumentException: Invalid container object
Used script:
$.jobExecution.status
******************************************* End of job log *******************************************
Job Aborted: : There was an error executing the query to retrieve variables from the response.
First part of the response being processed:<!DOCTYPE html PUBLI
Error from the execution of the query:
ERROR Cannot execute query.

 

Cause

This may be a bug in RA WebService REST. Currently under reviewed.

KE will be updated once more information is available

Environment

Release : 9.3

Component : APPLICATIONS MANAGER, Automation Engine REST API

Resolution

Resolution under further review.

Workaround

Use Query Parameters to append the required value to the URI Endpoint value. For example:

1. Change the URI value:
From -http://www.test.com/coresuite/test/jobs/executions/106.json?includeLogs=false
To - http://www.test.com/coresuite/test/jobs/executions/106.json

2. Edit the Job, go to the Headers & Query Parameters

3. Add a new Query Parameter using the following value:
Parameter - includeLogs
Value - false

Notice that the URI Endpoint value will change:
From -http://www.test.com/coresuite/test/jobs/executions/106.json
To - http://www.test.com/coresuite/test/jobs/executions/106.json?includeLogs=false