Reputation: 1
How to do Veracode health check API? I am having API credentials generated and stored in credentials file. I also got the HMAC authentication part . How do I test this hmac and initial connection nwith veracode ? Can someone please provide steps ?
Upvotes: 0
Views: 618
Reputation: 301
You don't say how you're calling the API, so I'll provide a couple of paths to get started:
Using HTTPie with the Veracode Authentication Library. Installation for this is documented in the Veracode Help Center. Once installed and the credentials file is created, you can simply call the Health Check endpoint at the command line:
http --auth-type=veracode_hmac "https://api.veracode.com/healthcheck/status"
Note that the return from this API call has no body; you'll either get a 200
or an error.
Using Python. There is sample code in the veracode-api-py library (source on Github, available in PyPi) that shows calling the HealthCheck API. Once you've installed the library on your local system you should be able to do something like this:
from veracode_api_py import VeracodeAPI as vapi
vapi().healthcheck()
The function will throw an exception if the health check does not return successfully.
Upvotes: 1