Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
puja
Contributor II
Contributor II

Start and Stop Qlik Compose project using REST API

Hi Team,

Can you please guide me the process to start and stop Qlik Compose project using RESTAPI?

Thanks,

Pooja

 

 

Labels (1)
1 Solution

Accepted Solutions
TimGarrod
Employee
Employee

To execute a task via REST API - you must call 2 API's.  - 1. Login and 2. Run Task.

Login API (link to help)  example.   Where 'DDDDDuDDDDDD=' is the base64 encoded domain/user:password value to authenticate to EM.

curl -i -k --header "Authorization: Basic DDDDDDuDDDDDDDDDDDDDD=" https://localhost/attunityenterprisemanager/api/v1/login

Executing that will provide a session ID which must be used in the Run Task API call .

  • In the example below
    • my Compose server is registered in EM as 'Compose'
    • My tasktask in Compose is called 'Sales Source' in a project called ComposeDW. 
    • The task name (as described in documentation) should be constructed as TASKNAME__PROJECT  (2 underscores) and if you have special characters in the task name, you must obv. url encode them (hence the %20 for the space in my task name)

 

curl -i -k -X POST --header "EnterpriseManager.APISessionID: a9nOpbs6aIyGnLAvP5IXCQ" --header "Content-Length: 0" https://localhost/attunityenterprisemanager/api/v1/servers/Compose/tasks/Sales%20Source__ComposeDW?a...

 

View solution in original post

7 Replies
shashi_holla
Support
Support

Hi @puja 

I did not find any RestAPI available currently to start and stop the Compose storage tasks. But we can control the tasks using the Command Line.

Thank you,

Dana_Baldwin
Support
Support

Hi @puja 

If you would like to see a RestAPI added for this, please submit your enhancement request here: https://community.qlik.com/t5/Ideas/idb-p/qlik-ideas

TimGarrod
Employee
Employee

Hi,   Enterprise Manager provides REST API's that can be used to start and stop Compose tasks.  
The API is RunTask - https://help.qlik.com/en-US/enterprise-manager/November2022/Content/EnterpriseManager/EnterpriseMana... 


Additionally Compose has a CLI to help automate start and stop of tasks if you do not wish to have EM deployed in your environment.

puja
Contributor II
Contributor II
Author

Thanks Tim for the update.

I tried to run the compose task as mentioned in the compose URL, that's not working.

Also, I don't see any example specific to compose project in that link.

Can you please guide me to provide an example for the same?

 

 

puja
Contributor II
Contributor II
Author

Hi Tim,

any chance to share the example of compose project being started by REST API?

Thanks,

TimGarrod
Employee
Employee

To execute a task via REST API - you must call 2 API's.  - 1. Login and 2. Run Task.

Login API (link to help)  example.   Where 'DDDDDuDDDDDD=' is the base64 encoded domain/user:password value to authenticate to EM.

curl -i -k --header "Authorization: Basic DDDDDDuDDDDDDDDDDDDDD=" https://localhost/attunityenterprisemanager/api/v1/login

Executing that will provide a session ID which must be used in the Run Task API call .

  • In the example below
    • my Compose server is registered in EM as 'Compose'
    • My tasktask in Compose is called 'Sales Source' in a project called ComposeDW. 
    • The task name (as described in documentation) should be constructed as TASKNAME__PROJECT  (2 underscores) and if you have special characters in the task name, you must obv. url encode them (hence the %20 for the space in my task name)

 

curl -i -k -X POST --header "EnterpriseManager.APISessionID: a9nOpbs6aIyGnLAvP5IXCQ" --header "Content-Length: 0" https://localhost/attunityenterprisemanager/api/v1/servers/Compose/tasks/Sales%20Source__ComposeDW?a...

 

puja
Contributor II
Contributor II
Author

Thanks a lot Tim

This solution is working fine.