Skip to main content

API reference

Use this page when you write an integration, or when you have a LicOps response and want to know what it means. The other pages in this section show each request in the task it belongs to.

The API browser on every LicOps host​

Every LicOps deployment serves an interactive reference, generated from the running build, at:

http://<licops-host>:8100/swagger

Use it for the exact schemas of your build. Most of what it lists is for operating the Router. The admission endpoints in the following section are the ones integrations call.

Restrict access to ports 8100 and 8101

Ports 8100 and 8101 are administration interfaces. Allow access to them only from your administration network and from the hosts that submit jobs, and do not publish them to the internet. Publish only the license ports your clients use. See System requirements.

Admission endpoints​

Base path: http://<licops-host>:8100/api/v1/admission-controller. Requests and responses are JSON, field names are camelCase, and values such as decision are strings. The following table lists the endpoints:

MethodPathSuccessOther answers
POST/admit200 with a decision400 for an invalid body, or for a session ID reused with a different vendor, feature, or seat count. 503 during cold start, with Retry-After.
POST/dispatch200 with a license server400 for an invalid body. 404 for an unknown session. 503 with ThrottleDeferred and Retry-After, or with NoCapacityAtDispatch.
POST/release200, always400 for an invalid body.
GET/availability200, alwaysNone

Admit​

The following table lists the fields of the request:

FieldRequiredDescription
sessionIdYesAn ID you generate, normally a UUID. Use it for all three requests of one job. A repeated admit with the same ID returns the original answer while the session is valid. A denied admit is not stored.
vendorYesThe pool's vendor daemon name. Exact match, including case.
featureYesThe pool's feature name. Exact match, including case. Send spaces as spaces.
userNoWho submitted the job. Recorded, and available to admission rules.
hostNoWhere the job was submitted from. Recorded, and available to admission rules as client host.
totalQuantityNoSeats to admit. At least 1. The default is 1. All of them come from one server.
jobDetailsNoJob context recorded with the seat: clusterName, account, queue, jobName, declaredRuntimeSeconds, and on Kubernetes namespace and podName. Each field is optional. It never changes the decision.

The response:

FieldDescription
decisionAdmit or Deny.
sessionIdYour session ID on Admit, or null on Deny.
expiresAtOn Admit, when the seat lapses if the job is not dispatched by then.
reasonOn Deny, why. See Deny reasons.

A 503 during cold start carries a problem document with type, title, status, and traceId, and a Retry-After header.

Deny reasons​

The following table lists the deny reasons, what happened, and what to do:

ReasonWhat happenedWhat to do
NoServerAvailableNo healthy server serves this vendor and feature.Check the spelling against GET /api/v1/stats first. Then check whether the pool's servers are down.
NoCapacityThe servers are reachable, but none has enough free seats for the request.Queue the job and try again later.
ConstraintBlockedServers have free seats, but every one of them is capped by a reservation or blocked during the current period.Wait for seats under the cap to free up, or change the reservation. See Cap seats on a schedule.
PolicyDeniedAn admission rule with Deny the request matched.Intended. Check the rules under LicOps Configuration.
StaleSnapshotLicOps has not received fresh figures from OpenLM Platform, so its counts are not reliable.Restore the OpenLM Platform sync. Retrying does not help until then. See Troubleshooting.
ContentionExhaustedNo longer returned.Nothing. The value remains for compatibility with older clients.

Dispatch​

The following table lists the fields of the request:

FieldRequiredDescription
sessionIdYesThe ID you sent to admit.
executionNodeIpYesThe IP address of the node that runs the job. With checkout routing, LicOps uses it to match the node's checkouts to this session.
jobIdNoYour scheduler's job ID. Recorded.
jobDetailsNoAs for admit. A value here replaces the admit value field by field. Leaving it out keeps the admit values.

The response:

FieldDescription
hostName, portThe license server to check out from. For a three-server redundant license server, its first machine.
licenseFileThe value to use for LM_LICENSE_FILE, as port@host. For a three-server redundant license server, all three machines, comma-separated. Use it exactly as returned.
fallbackTargetsThe pool's other healthy servers, each with its own hostName, port, and licenseFile.

A 404 has an empty body: the session does not exist or has ended. A 503 has a plain-text body: ThrottleDeferred when a Throttle rule is pacing checkouts, or NoCapacityAtDispatch when the session's server failed and no other server in the pool has a free seat. After ThrottleDeferred, the seat is still held: wait for Retry-After and dispatch again. After NoCapacityAtDispatch, LicOps has released the session and sends no Retry-After: admit again with a new session ID.

Release​

The request takes only sessionId. The response always has status 200, and its state is one of:

StateMeaning
ReleasedThis request returned the seat.
AlreadyClosedThe session had already ended. Nothing to do.
NotFoundNo such session exists. Nothing to do.

Availability​

GET /availability returns every pool LicOps knows and every server behind it, including servers that are down, with the figures admission itself uses. It changes nothing.

FieldDescription
lastPlatformSyncTime, lastReconcileTimeWhen LicOps last received figures from OpenLM Platform, and last corrected its counts with them.
coldStarttrue until LicOps has its first figures. Admit answers 503 meanwhile.
staleForAdmissiontrue when the figures are too old to trust. Admit denies with StaleSnapshot meanwhile.
pools[]One entry per pool, with vendor, feature, the totals total, used, reserved, and free over the servers admission can use, and largestAdmittableRequest: the most seats one request could get right now.
pools[].servers[]One entry per server, with isHealthy, the seat counts, and constraints.
pools[].servers[].constraints[]Each reservation cap on the server: its limit, the seats held under it, and the headroom left. A limit of 9223372036854775807 means no cap is in force.

free is not rounded up to zero. A negative value means LicOps admitted more seats on that server than it had, usually seats from jobs that never released them.

Endpoints for operating LicOps​

The following table lists the endpoints for operating LicOps:

MethodPathWhat it does
GET/api/v1/statusWhether LicOps is configured, its listen ports, and its sync with OpenLM Platform in configurationManagement.
GET/api/v1/statsEvery pool and server with live seat counts. The source of the exact vendor and feature names.
GET/api/v1/rules/router-admissionThe admission rules LicOps is applying, including the built-in ones. Read-only: rules are defined in OpenLM Platform.
GET/api/v1/platform/serversThe license servers LicOps received from OpenLM Platform. Answers 503 until it has them.
GET, PUT/api/v1/admission-controller/platform-credentialsRead or store the OpenLM Platform connection. The secret reads back masked.
POST/api/v1/admission-controller/platform-credentials/check-connectionTests the credential in the request body, not the stored one.
GET/readyzWhich listen ports are bound against which are wanted. Answers 503 until LicOps has its configuration.
GET/health/ready, /health/live, /health/startThe standard OpenLM health checks.

Defaults​

The following table lists the default settings:

SettingDefaultWhat it means for you
API port8100The port in every address on this page.
LicOps listen port30001For checkouts routed through LicOps. It speaks the FlexLM protocol, not HTTP.
Admit timeout15 minutesA job not dispatched within this loses its seat.
Dispatch timeout2 hoursA started job keeps its seat this long without a release.
Cold-start Retry-After10 secondsHow long to wait after a cold-start 503.
OpenLM Platform figuresAbout every 10 secondsHow often LicOps corrects its counts. After about 30 seconds without fresh figures, admit denies with StaleSnapshot.

To change the timeouts, see Set the session timeouts.

The documentation team might draft this page using a large language model. A technical writer reviews every page and verifies it against the product before publishing it. A human makes the final decision.