← Back to Home

Program Analysis API

API version: v1 · Last updated: September 2026

The Hoorbit Program Analysis API lets you submit legacy program source code — AS/400 RPG, RPGLE, COBOL, or CL — and receive back a structured analysis: complexity scoring, dependency mapping, and modernization recommendations. It is the same engine our consulting team uses during AS/400 modernization engagements, exposed as a REST API for enterprise clients under an executed SOW or MSA.

Need the full reference, including SDK examples, webhooks, and best practices? Download the complete product documentation.

Download PDF Documentation

Base URL

https://api.hoorbit.com/v1

Authentication

All requests must include your API key as a bearer token in the Authorization header. API keys are issued from your account dashboard after subscribing to an API Services plan.

Authorization: Bearer hb_live_xxxxxxxxxxxxxxxxxxxxxxxx

Submit a program for analysis

POST/v1/analyze

Submits a program's source code for asynchronous analysis. Returns immediately with a request ID you can use to poll for the result.

Request body

FieldTypeRequiredDescription
program_namestringYesA label for the program being analyzed
languagestringYesOne of: RPG, RPGLE, COBOL, CL
sourcestringYesBase64-encoded program source code
callback_urlstringNoWebhook URL notified when analysis completes
curl -X POST https://api.hoorbit.com/v1/analyze \ -H "Authorization: Bearer hb_live_xxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "program_name": "ORDENTRY", "language": "RPGLE", "source": "SEUAODAOAJAOKDLASKD...base64..." }'

Response — 202 Accepted

{ "id": "an_8f3c1a2b9d", "status": "queued", "program_name": "ORDENTRY", "submitted_at": "2026-09-20T14:32:00Z" }

Retrieve an analysis result

GET/v1/analyze/{id}

Returns the current status of a submitted analysis, and the full result once processing is complete.

curl https://api.hoorbit.com/v1/analyze/an_8f3c1a2b9d \ -H "Authorization: Bearer hb_live_xxxxxxxxxxxxxxxxxxxxxxxx"

Response — 200 OK (completed)

{ "id": "an_8f3c1a2b9d", "status": "completed", "program_name": "ORDENTRY", "result": { "lines_of_code": 4820, "complexity_score": 72, "dependencies": ["CUSTMAST", "ORDHDR", "ORDDTL"], "modernization_recommendations": [ "Extract embedded SQL into a dedicated data access module", "Replace hardcoded display-file logic with a service layer", "Isolate business rules from I/O operations for API readiness" ], "estimated_effort_hours": 46 }, "completed_at": "2026-09-20T14:33:12Z" }

List recent analyses

GET/v1/analyze

Returns a paginated list of analyses submitted by your account. Supports limit and cursor query parameters.

Analysis status values

StatusMeaning
queuedReceived and waiting to be processed
processingAnalysis is currently running
completedAnalysis finished; result is available
failedAnalysis could not be completed; see error field

Error codes

HTTP statusCodeMeaning
400invalid_requestMissing or malformed request field
401unauthorizedMissing or invalid API key
404not_foundNo analysis exists with the given ID
413payload_too_largeSource exceeds the 5 MB submission limit
429rate_limitedToo many requests; see rate limits below
500internal_errorUnexpected server error; safe to retry

Rate limits

Rate limits are enforced per API key and reset on a rolling one-minute window. Current usage is returned in the X-RateLimit-Remaining response header.

PlanRequests/minuteMonthly analysis calls
Basic3010,000
Standard120100,000
EnterpriseCustomUnlimited

Webhooks

If you provide a callback_url when submitting an analysis, Hoorbit sends a POST request to that URL with the same payload returned by the GET endpoint once the analysis reaches a terminal status (completed or failed).

Support

For API access, integration help, or to report an issue, contact support@hoorbit.com.