Query SAP Cloud ALM analytics
calm_analyticsQuery SAP Cloud ALM analytics providers for tenant-wide totals and grouped breakdowns across defects, tasks, tests, features, and projects using filters; returns counts, not sorted records.
Instructions
Query an SAP Cloud ALM analytics provider (Defects, Tasks, Tests, Features, Projects, Metrics, ...). Supports $filter, and aggregates: it is the tool for tenant-wide totals and breakdowns. It does NOT sort — $orderby is ignored, so sort the records yourself. Every provider spans the whole tenant, so this is how you count without naming a project: count_only=true for a total, group_by="status" for a breakdown (Defects: "defectStatus"). Tasks covers user stories, defects and requirements; filter them by type CODE, e.g. filter="typeID eq 'CALMUS'" (the type text is silently ignored).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | OData $top — maximum number of records | |
| skip | No | OData $skip — records to skip | |
| count | No | Return the total as "@count" ALONGSIDE the records (OData resources and analytics only). For a total without the records, use count_only instead | |
| filter | No | OData $filter, e.g. "status eq 'CIPDFCTOPEN'" | |
| period | No | Analytics time window, sent inside $filter. Format <L|C><n><H|D|W|M|Y>, e.g. "L1D" (last day) or "C1M" (current month). Counting defaults to "C1D" so each record is counted once | |
| select | No | OData $select — comma-separated field list | |
| group_by | No | Comma-separated field name(s) to break the count down by, e.g. "status" or "projectName,status". Returns {total, groups:[{value,count}]} instead of records. Also the quickest way to discover which values a field actually takes | |
| provider | Yes | Analytics provider (e.g. Defects, Tasks, Tests). Every provider spans the whole tenant, so this is the only way to count without naming a project. It aggregates but does not sort: the service ignores $orderby, so never present its output as sorted | |
| count_only | No | Return ONLY the total number of matching records, no records at all. Use this for every "how many ...?" question — the answer is a few hundred bytes instead of hundreds of KB. Works for every resource and provider | |
| resolution | No | Analytics bucket size, sent inside $filter: D, W, M or Y. A record appears once per bucket, so a wide window with a small bucket multiplies the count. Counting defaults to "D" | |
| group_limit | No | Maximum groups returned by group_by (default 50); the rest fold into otherCount |