lfreleng-actions/🛠️ Test API/Service Availability

Tests an HTTP/HTTPS API endpoint for service availability

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 8, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: lfreleng-actions/http-api-tool-docker@12a062c2289831b79166269340ffb44fa2c113e9 # v1.0.7

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
deployDeployment method: "uvx" (default, fast) or "docker" (containerized)nouvx
python_versionPython version (Note: uvx manages Python automatically; this input is ignored for deploy=uvx)no3.11
use_local_codeUse locally installed package instead of uvx/PyPInofalse
urlURL of API server/interface to checkyes
auth_stringAuthentication string, colon separated username/passwordno
service_nameName of HTTP/HTTPS API service testednoAPI Service
initial_sleep_timeTime in seconds between API service connection attemptsno1
max_delayMaximum delay in seconds between retriesno30
retriesNumber of retries before declaring service unavailableno3
expected_http_codeHTTP response code to accept from the API serviceno200
regexVerify server response with regular expressionno
show_header_jsonDisplay response header as JSON in action outputnofalse
curl_timeoutMaximum time in seconds for cURL to wait for a responseno5
http_methodHTTP method to use (GET, POST, PUT, etc.)noGET
request_bodyData to send with POST/PUT/PATCH requestsno
content_typeContent type of the request bodynoapplication/json
request_headersCustom HTTP headers sent in JSON formatno
verify_sslVerify SSL certificatesnotrue
ca_bundle_pathPath to CA bundle file for SSL verificationno
include_response_bodyInclude response body in outputs (base64 encoded)nofalse
follow_redirectsFollow HTTP redirectsnotrue
max_response_timeMaximum acceptable response time in secondsno0
connection_reuseReuse connections between requestsnotrue
debugEnables debugging outputnofalse
fail_on_timeoutFail the action if response time exceeds max_response_timenofalse
namedescription
time_delayNumber of seconds waiting for service availability/failure
response_http_codeHTTP response code received from the server
response_header_jsonHTTP response header as JSON
response_header_sizeHTTP response header size in bytes
response_body_sizeHTTP response body size in bytes
regex_matchWhether the regular expression matched the server reply
response_body_base64Response body base64 encoded (when include_response_body set)
total_timeTotal time for the request in seconds
connect_timeTime to establish connection in seconds
response_time_exceededWhether response time exceeded maximum acceptable time