Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
NakulanR
Partner - Creator
Partner - Creator

APIs using POST requests (RunTask, StopTask) don't seem to work

Hi Support,

In trying to use the QEM APIs to automate the stopping and starting of some Replicate tasks, we are able to successfully perform any of the GET requests like GetTaskList or GetTaskDetails, but can't call the RunTask or StopTask APIs (which use POST requests). The errors we are sometimes seeing are: "'option' is not recognized as an internal or external command" when running the curl command provided in the documentation.

Have there been any changes as to how the RunTask and StopTask API calls work which have not been reflected in the API guide?

 

*On a side note, when trying to create a support case in the case portal for Qlik Enterprise Manager, the 'Product Area' field doesn't seem to have any options (see below)

NakulanR_0-1733104473139.png

 

 

Regards,
Nak

Labels (3)
1 Solution

Accepted Solutions
NakulanR
Partner - Creator
Partner - Creator
Author

Hi @Shai_E ,

 

I believe I have found the cause of the issue. It's the ampersand (&) character as part of the query. Escaping the ampersand with a caret (^) character resolves the issue. The following Qlik article highlights the issue and presents the fix: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Enterprise-Manager-API-Escape-Character...

 

Regards,

Nak

View solution in original post

3 Replies
Shai_E
Support
Support

Hi @NakulanR ,

How does your curl request look like the one thats failing and what is the full error that you are getting?

NakulanR
Partner - Creator
Partner - Creator
Author

Hi @Shai_E ,

The curl request is the standard Start Task request like below:

curl -i -k -X POST --header "EnterpriseManager.APISessionID: xxxxxxxxxxxxxx" --header "Content-Length: 0" https://<URL>/attunityenterprisemanager/api/v1/servers/<Replicate Server>/tasks/<Task Name>?action=run&option=RELOAD_TARGET

 The error we see is: "'option' is not recognized as an internal or external command"

 

Regards,

Nak

NakulanR
Partner - Creator
Partner - Creator
Author

Hi @Shai_E ,

 

I believe I have found the cause of the issue. It's the ampersand (&) character as part of the query. Escaping the ampersand with a caret (^) character resolves the issue. The following Qlik article highlights the issue and presents the fix: https://community.qlik.com/t5/Official-Support-Articles/Qlik-Enterprise-Manager-API-Escape-Character...

 

Regards,

Nak