Use the bundled HAPI JAR as the authority for available Cloud HAPI bytecode signatures. The normal lookup command reads class files with javap; it does not load or execute HAPI classes.
Required workflow
- Read the target product guidance from
scriptrunner-platform-guidancefirst. - Find a class when necessary:
sms-hapi-lookup --product jira --search Issuessms-hapi-lookup --product confluence --search Pages
- Inspect every class used by generated HAPI code:
sms-hapi-lookup --product jira com.adaptavist.hapi.cloud.jira.issues.Issuessms-hapi-lookup --product confluence com.adaptavist.hapi.cloud.confluence.pages.Pages
- Use
--member <name>to narrow large classes. The command follows HAPI superclasses and@DelegatesTotargets by default; with--depth 0it still names them under "Related but not expanded" so nothing is hidden. - Inspect return types before chaining. Run a separate lookup for a returned HAPI class when its members are not already shown.
- Pair signature evidence with the bundled ScriptRunner documentation for behaviour, examples, permissions, and platform constraints. A method's presence does not prove it is appropriate in every script context.
- Validate the final Groovy with
sms-groovy-check --platform cloud --product jira|confluence --context <context>.
Commands
sms-hapi-lookup <class>— inspect an FQCN or an unambiguous simple class name.sms-hapi-lookup <class> --member <name>— show matching members and related delegate types.sms-hapi-lookup --search <term> [--product jira|confluence]— search the bundled class index.sms-hapi-lookup --version— print the exact artifact coordinate and SHA-256.sms-hapi-lookup --self-test— verify that Java can inspect Jira and Confluence classes at the baked VM paths; the runtime entrypoint runs this automatically.sms-hapi-lookup <class> --raw— print verbosejavapmetadata for difficult generic or annotation questions.
Interpretation rules
- Prefer exact observed signatures over memory or examples written for another HAPI version.
- Closure parameters annotated with
@DelegatesToexpose the delegate class's public methods inside the closure. - Ignore Groovy compiler plumbing such as
getMetaClass,setMetaClass,$getLookup, and__$stMC; the normal command filters it. - Always follow up on classes listed under "Related but not expanded"; the depth and size limits never hide names, only member detail.
- Groovy plumbing classes (closures, anonymous classes, trait helpers) are hidden from normal search but remain addressable by exact FQCN for diagnostics.
- This artifact covers Jira Cloud and Confluence Cloud. It is not a Jira or Confluence Data Center Java API reference.
- Never modify, execute, upload, or replace the bundled JAR. Do not pass untrusted option-like text as a class name.
Artifact
- Coordinate:
com.adaptavist.scriptrunner.cloud:hapi:0.2.104 - Version:
0.2.104 - SHA-256:
15a925b32e27cd1ff77d7f2d62b1855b2b3115160ba78354f94e058252dcec74 - Indexed HAPI and API model classes: 3631
- JAR:
assets/hapi-0.2.104.jar - Class index:
assets/classes.json - Machine-readable provenance:
assets/artifact.json