API call in shared library jenkins that uses organization certificate

I’m using an API that uses my organizations certificate. I want to fetch response after making API call to that API, in my shared library project(in groovy).

In MAC terminal, using the curl command by specifing cert type as p12 with password, I am able to retrieve the response of that API.
Curl command - curl --cert-type P12 --cert cert_p12_path:cert_password --request GET API_url

But how can I fetch the API(works with certificate) response in shared library which is being used in jenkins?

Can someone please help me with this?

Hello @swsing :wave:

I’m not so sure this can be applicable to a shared library, but here is a video about using curl in a Jenkins pipeline.