Run scenario API REST POSTMAN

Solved!
cbimou
Level 2
Run scenario API REST POSTMAN

Hi dear,

Based on this document https://doc.dataiku.com/dss/api/10.0/rest/#scenarios, I'm trying to launch my scenario called MONITORING via API REST. My scenario doesn't have a specific trigger so I didn't enter the trigger information.

I'm working in POSTMAN and my request looks like this one (which doesn't work unfortunately):

 
 

Could someone please help me to launch my script properly?

Thanks in advance

 

Charlotte

0 Kudos
1 Solution
cbimou
Level 2
Author

Hi @AlexT ,

 

Thank you very much, your suggestion was very helpful.

I just added /public/api and the API key for my project and it worked fine.

Thanks for your help and thanks to you too @tgb417 

 

Best regards

View solution in original post

5 Replies
tgb417

@cbimou 

A few quick questions.  What edition of Dataiku are you using.  If I remember correctly. the community/free edition does not have scenarios and apis enabled.  These are some of the functions only available to paid versions.

Also have you gotten anything to work through the api or is this your first attempt to use the API.   Iโ€™m wondering if this is an authentication, security, setup challenge. Or some kind of firewall style challenge.  

If you have been using the api to date successfully, and you are having challenges I would recommend that you share some details with the support team.  Iโ€™ve found them very helpful.  

Also answering these questions here my help others provide some further insights. 

 

--Tom
0 Kudos
cbimou
Level 2
Author

Hello Dear @tgb417 

Thank you for your answer.

I use a paid version (designer node and automation node) of dataiku. Regarding API calls, this is my first time. I'm used to make API calls via Python to launch a scenario and everything works.

But for the past few days, I've been trying to do the same action either via postman or via lunix command line by doing a curl -X POST https:... and nothing works. As you said, maybe it's an authentication problem?

 

0 Kudos
tgb417

@cbimou ,

As a paid user, I'd invite you to just put in a support ticket.  The support team is great.  They can help you check out your security setup and configuration.   That is likely to be the fastest way to a solution.  You can find the help ticket system Upper Right Menu (?) icon -> Get Help -> Open a Ticket.  They will ask you for some detailed information about what you are doing, trying to do, and maybe some log details as part of a diagnostic dump. However, they have been great help to me.

--Tom

--Tom
AlexT
Dataiker

Hi @cbimou ,

Not sure if you got a chance to open a support ticket as Tom suggested. 

The "405 Not Allowed"  would usually indicate the base URL you are requesting is denied by DSS or an intermediate proxy. If it was a permission issue you would usually see something like  "Action forbidden".

Looking at the URL in your screenshot I believe you are missing /public/api from the Base URL which would cause the 405 Not allowed. 

 https://doc.dataiku.com/dss/latest/publicapi/rest.html#the-rest-api

I've tested the following request should work given the API Key and Permission are also ok :

Screenshot 2022-01-29 at 14.37.33.png

Let me know if that helps. 

 

 

cbimou
Level 2
Author

Hi @AlexT ,

 

Thank you very much, your suggestion was very helpful.

I just added /public/api and the API key for my project and it worked fine.

Thanks for your help and thanks to you too @tgb417 

 

Best regards