Missing Parameter "scriptName" in setSessionManagementMethod API call

8 views
Skip to first unread message

ZAP User

unread,
Sep 28, 2022, 9:34:09 AM9/28/22
to OWASP ZAP Developer Group
Hi,

I have successfully created the context for Juiceshop application. I'm using the session management script for Juiceshop and it works good.

Now, I'm trying to automate it via API calls.

I don't want to import the context, but use API calls to set the scriptBasedSessionManagement.

When I try to set it, I'm getting the below error

{"code":"missing_parameter","message":"Missing Parameter","detail":"scriptName"}

I have tried various options but no luck. I'm not sure on the format to set the scriptName in methodConfigParams attribute.

http://localhost:8081/JSON/sessionManagement/action/setSessionManagementMethod/?contextId=2&methodName=scriptBasedSessionManagement&methodConfigParams=%7B%22scriptName%22%3A%22Juiceshop-session%22%7D


I tried with below options and tried URL encoding as well but no luck.
{"scriptName":"Juiceshop-session"}
[{"scriptName":"Juiceshop-session"}]
"scriptName":"Juiceshop-session"

Kindly let me know how to achieve this via api.

Thanks

psiinon

unread,
Sep 28, 2022, 9:38:22 AM9/28/22
to OWASP ZAP Developer Group
I honestly dont recommend doing it this way :)
Either:
  • Export your context from the ZAP desktop.
  • Import it via the API.
or
Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages