HTTP 400 error on API call

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

HTTP 400 error on API call

L0 Member



I'm trying to inject custom policies using API call , however before doing that i need to create "Saved search" , that is later used as described in


So i tried simple curl-based call to create (actually update an existing saved search as advised in prisma API doc) 


curl -v --request POST --url

--header 'accept: application/json; charset=UTF-8'

--header 'content-type: application/json'

--header 'x-redlock-auth: my_JWT_goes_here'

--data '{"cloudType":"AWS","saved":false,"query":"config where ='\''aws-ec2-describe-security-groups'\'' and cloud.account = \"Sample AWS Account\""}'


But i get :

< HTTP/2 400

< x-redlock-status: [{"i18nKey":"bad_request","severity":"error","subject":null}]
< server: Jetty(9.4.24.v20191120)


In Prisma cloud web console audit logs i see:

"''(with role 'System Admin':'System Admin') failed to save the search."


I guess im missing some mandatory parameters in my query. Anyone got an idea whats wrong with this query? 


L0 Member

Ok i moved one step further. Now i get HTTP 500 🙂


It looks that i was missing mandatory "name" parameter (this sounds reasonable to have config Query name as a required parameter). 



Unfortunately API docs , do not mention anything about that this field is mandatory.



So now i get HTTP 500 error (internal server error)


'x-redlock-status': '[{"i18nKey":"internal_error","severity":"error","subject":null}]'


I invoke POST against URL (where suffix of the url ismy successfuly invoked search Query id):


My HTTP request body  :


{"cloudType":"aws","searchType":"config","description":"","saved":true,"query":"config where = 'aws-ec2-describe-subnets'","name":"MySavedQueryName-1"}


My HTTP headers:


{'accept'"application/json; charset=UTF-8",
               'x-redlock-auth': HERE_MY_JWT,
                'User-Agent''Python3.7 script'
What im missing here?

L4 Transporter

Greetings LChelek,


I hope that this note finds you well! I know that it has been a while since you had posted this question but I wanted to see if you still potentially needed any help. Thank you for your time and I hope that you have a good remainder of your day.


Kind Regards,

J. Avery King

J. Avery King | Prisma Cloud | Customer Success Engineer
  • 2 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!