Get Advisor Rule Objects (Reserved)
RESERVED: The keyword RESERVED annotation means that the API is available for use but is not yet part of the officially supported specification. Its behavior, interface, or output may change in future releases without backward compatibility guarantees.
Returns the paginated, rule-specific rows for one Advisor rule — the objects (and, depending on the rule, the related caller objects) that make it an occurrence in this application.
URI
GET /rest/applications/{application}/advisors/rules/{id}/objects?migration={migration}&version={version}&limit={limit}&skip={skip}&sortBy={sortBy}&order={order}
Use the existing authentication and x-user-tenant header. The application name must be URL-encoded when necessary and cannot contain quote or backquote characters. This endpoint is available in Unified builds only.
| Parameter | Meaning |
|---|---|
migration, version |
Required — retain these from GET /steps or POST /tree, same as GET /rules/:id/details |
limit |
Required, must be positive |
skip |
Optional, defaults to 0, must be non-negative |
sortBy |
Optional. Valid values depend on the rule’s own row template (see below); an unsupported value returns 400, not a silently-ignored sort |
order |
Optional, ASC or DESC, defaults to ASC |
Response
Illustrative response (values are examples):
{
"total": 42,
"limit": 20,
"skip": 0,
"results": [
{
"objects": [
{"aipid": "obj-123", "graphId": "4:abcd:9001", "name": "MyClass", "fullName": "pkg.MyClass", "type": "Class", "role": "affected"}
],
"values": {
"linesOfCode": 120,
"numberOfTransaction": 3,
"tags": []
}
}
]
}
| Field | Meaning |
|---|---|
total |
Count of matching rows for this rule, before pagination — not a count of distinct affected objects, since a row can reference more than one object (see objects[].role below) |
results[].objects |
One or more object references for this row. Every row has exactly one "affected" reference; call/missing-call templates additionally have one "caller" reference |
results[].objects[].aipid |
The stable, portable object identifier used by the existing object/dependency/tagging APIs. Omitted for a "caller" reference if the rule’s own data does not identify it (see the deliberate addition noted below) |
results[].objects[].graphId |
A Neo4j element reference, present only so it can be passed as objectId to POST /rules/:id/graph in the same session. It is not a stable, portable identifier — do not persist it or compare it across sessions; it is not guaranteed to survive a database restore or version upgrade |
results[].values |
Row-specific metrics and tags. Exact keys depend on the rule’s template — see below |
This endpoint dispatches to one of five row shapes, matching the rule’s own stored template (default, inbound calls, outbound calls, missing objects, or violations). A rule whose stored configuration is missing the extra parameters its own template needs falls back to the default shape, matching the service’s own fallback behavior — this is not an error.
A rule not found for the given id/version, not reachable from an Advisor hierarchy named migration, or not present in application, returns 404. Standard API errors apply for invalid application identifiers, missing tenants, missing/invalid migration/version/limit/skip/order, and database failures.
Deliberate corrections versus the source query:
sortBy/orderare validated against a fixed, per-template allowlist of real, supported columns instead of being written directly into the query text. The source formats the request’s raw sort column and direction straight into the Cypher string for every one of its five table templates — a SQL/Cypher-injection-shaped defect that is not safe to port as-is.- The rule is required to be reachable from an Advisor node named
migration, and the object match is scoped byversionand requires theObjectPropertylabel — the same corrections already made forGET /rules/:id/details,POST /tree, andPOST /steps/rules, for the same reasons. - The caller/caller-equivalent object’s identifier (
callerAipIdinternally) is additionally collected for the three templates that reference one. The source only collects a display name for it, leaving that reference unidentifiable; this is a strictly additive change — it does not alter which rows match, how they are ordered, or the count. annotations(linked-document metadata) are not returned. Porting that lookup faithfully would mean re-deriving a nontrivial Document/Tag traversal shared across all five templates, and no decision has been made yet on whether it belongs in this slice; it is left out entirely rather than returned as a misleading always-empty placeholder.tags(TAGGED_WITH) is real, fetched data and is included.