Post

1 follower Follow
0
Avatar

Jira Integration Manuel Sync from Clarizen API using Custom Action

Hi,
I try to execute a Custom Action with the Clarizen API, but the Custom Action is not executed through the API.
It works perfectly from Clarizen Custom Action Button when I'm logged into Clarizen application.

Custom Action at User level : SyncJiraIntegration
The Custom Action does only Open an URL on "Success" : https://integrationeu.clarizentb.com/Sync/ClarizenEntry/Jira/CustomAction/Task/all?clarizenOrgId={Organization.ExternalID}&sessionId={GetSessionId()}&userId={$ExternalID}&customActionName=SyncNow
==> This starts the Clarizen2Jira Integration synchronization.

I Try to execute this CustomAction from the Clarizen API, but it is not working and I have no error message :
1st command:
Curl -X POST -d '{userName: "myname@mycompany.com", password: "XXXXX"}' https://apie.clarizentb.com/V2.0/services/authentication/login
==> this gives me the following results : {"sessionId":"xxxxxxx-xxxx-4a80-a46d-ff230300bab3_xxxxxxx","userId":"xxxxxxxx-15de-48be-9a84-xxxxxxxxxxxx","organizationId":"xxxxxxxxx-0c8d-4ca3-9b33-xxxxxxxxxxxx","serverTime":"2019-12-18T13:06:47.1093090Z","licenseType":"Full"}

2nd command:
Curl -H "Authorization: Session xxxxxxx-xxxx-4a80-a46d-ff230300bab3_xxxxxxx" "https://apie.clarizentb.com/V2.0/services/data/executeCustomAction?targetId=/user/xxxxxxxx-15de-48be-9a84-xxxxxxxxxxxx&customAction=SyncJiraIntegration"
This 2nd command should start the Clarizen2Jira Integration Sync, but it does not.
I have the following result :
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 271 100 271 0 0 117 0 0:00:02 0:00:02 --:--:-- 118{"message":"https://integrationeu.clarizentb.com/Sync/ClarizenEntry/Jira/CustomAction/Task/all?clarizenOrgId=xxxxxxxxx-0c8d-4ca3-9b33-xxxxxxxxxxxx&sessionId=xxxxxxx-xxxx-4a80-a46d-ff230300bab3_xxxxxxx&userId=xxxxxxxx-15de-48be-9a84-xxxxxxxxxxxx&customActionName=SyncNow"}


I tried also this syntax with same result :
curl -H "Authorization: Session xxxxxxx-xxxx-4a80-a46d-ff230300bab3_xxxxxxx" https://apie.clarizentb.com/V2.0/services/data/executeCustomAction -d "{'targetId': '/user/xxxxxxxx-15de-48be-9a84-xxxxxxxxxxxx','customAction': 'SyncJiraIntegration'}"

Could you please help me resolve this problem ?

Thanks in advance.
Best regards,
Patrick

Patrick Lartigau

Please sign in to leave a comment.