Validate projectKey and scenarioId before calling API to run scenario

mahbh2001
Level 1
Validate projectKey and scenarioId before calling API to run scenario

Hi 

I want to configure my application to run scenarios in Dataiku.

How can I validate projectKey and scenarioId as valid strings for configuration?

I want to reject any malformed value upfront rather than calling expensive API.

 

regards

Mahesh

 

0 Kudos
1 Reply
AlexT
Dataiker

Hi,

You could do some regex validation initially like  "/^\w+$/" for project key and /^[A-Za-z0-9_]+$/ for scenario ID.

This would not validate if the project key and scenario ID actually exist. You would need to make an API call to determine that. 

Thanks

0 Kudos