> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/cost-management-agent-apis/commitment-orchestrator/commitment-orchestrator-events-apis.md).

# Commitment Orchestrator Events APIs

This contains APIs to fetch commitment orchestrator events data.

## List event logs

> Obtains list of events and the count of their occurences grouped by date

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[{"name":"Commitment Orchestrator Events APIs","description":"This contains APIs to fetch commitment orchestrator events data."}],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v1/events/chart":{"post":{"tags":["Commitment Orchestrator Events APIs"],"summary":"List event logs","description":"Obtains list of events and the count of their occurences grouped by date","operationId":"EventsChart","parameters":[{"name":"account_id","description":"Account Identifier for the Entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountIdentifier","description":"Account Identifier for the Entity","in":"query","required":true,"schema":{"type":"string"}},{"name":"start_date","in":"query","required":true,"schema":{"type":"string","description":"Start time of the period"}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"End time of the period"}}],"requestBody":{"description":"Optional filters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventsFilter"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsChartsSuccessResponse"}}}},"400":{"description":"Invalid status value","content":{}}}}}},"components":{"schemas":{"EventsFilter":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"group_by":{"type":"string"},"service":{"type":"string","enum":["Amazon Relational Database Service","Amazon Elastic Compute Cloud - Compute"],"default":"Amazon Elastic Compute Cloud - Compute","description":"Service to fetch the details for."}}},"EventsChartsSuccessResponse":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Specifies if the operation is successful"},"errors":{"type":"string","description":"Specifies the error if the operation failed"},"response":{"type":"object","properties":{"total":{"type":"integer"},"pages":{"type":"integer"},"events":{"type":"array","items":{"$ref":"#/components/schemas/ChartResponse"}}}}}},"ChartResponse":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"},"event_type":{"type":"string"}}}}}}
```

## List auto-renewal events

> Returns auto-renewal activities (upcoming and completed) for the account, filtered by date range and optional cloud account, regions, and AWS service. Used to annotate charts such as Compute Coverage when savings or coverage dip around RI/SP renewals. If start\_date and end\_date are omitted, the server defaults to the last 30 days (UTC).

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[{"name":"Commitment Orchestrator Events APIs","description":"This contains APIs to fetch commitment orchestrator events data."}],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v1/events/renewal_events":{"post":{"tags":["Commitment Orchestrator Events APIs"],"summary":"List auto-renewal events","description":"Returns auto-renewal activities (upcoming and completed) for the account, filtered by date range and optional cloud account, regions, and AWS service. Used to annotate charts such as Compute Coverage when savings or coverage dip around RI/SP renewals. If start_date and end_date are omitted, the server defaults to the last 30 days (UTC).","operationId":"RenewalEvents","parameters":[{"name":"account_id","description":"Account Identifier for the Entity","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Date range and optional filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewalEventsRequest"}},"*/*":{"schema":{"$ref":"#/components/schemas/RenewalEventsRequest"}}},"required":false},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewalEventsSuccessResponse"}}}},"400":{"description":"Invalid request (e.g. invalid date format or end_date before start_date)","content":{}}}}}},"components":{"schemas":{"RenewalEventsRequest":{"type":"object","properties":{"cloud_account_ids":{"type":"array","items":{"type":"string"},"description":"When non-empty, only renewal events for these cloud accounts are returned"},"start_date":{"type":"string","format":"date","description":"Start of filter range (YYYY-MM-DD). Defaults to 30 days before today (UTC) when omitted."},"end_date":{"type":"string","format":"date","description":"End of filter range (YYYY-MM-DD). Defaults to today (UTC) when omitted."},"regions":{"type":"array","items":{"type":"string"},"description":"When non-empty, only events whose region matches one of these values"},"service":{"type":"string","description":"AWS service type; defaults to Amazon Elastic Compute Cloud - Compute when omitted","enum":["Amazon Elastic Compute Cloud - Compute","Amazon Relational Database Service"],"default":"Amazon Elastic Compute Cloud - Compute"}}},"RenewalEventsSuccessResponse":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Specifies if the operation is successful"},"errors":{"type":"string","description":"Specifies the error if the operation failed","nullable":true},"response":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/RenewalEvent"},"description":"Auto-renewal events in the requested range and filters"}}}}},"RenewalEvent":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Activity row identifier"},"cloud_account_id":{"type":"string"},"region":{"type":"string"},"status":{"type":"string","description":"Activity status (e.g. pending, complete)"},"expiry_date":{"type":"string","format":"date","description":"Reservation expiry date from activity metadata (YYYY-MM-DD)"},"renewal_scheduled_at":{"type":"string","format":"date-time","nullable":true,"description":"Present when status indicates renewal scheduling completed; mirrors last update time"},"updated_at":{"type":"string","format":"date-time","description":"When the activity was last updated"},"description":{"type":"string","description":"Human-readable activity description"}}}}}}
```

## RI recommendation cooldown schedule

> Returns the configured minimum interval between RI recommendation engine runs and when the next run becomes eligible, based on the latest completed approval transaction for the account and service.

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[{"name":"Commitment Orchestrator Events APIs","description":"This contains APIs to fetch commitment orchestrator events data."}],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v1/events/ri_recommendation_schedule":{"get":{"tags":["Commitment Orchestrator Events APIs"],"summary":"RI recommendation cooldown schedule","description":"Returns the configured minimum interval between RI recommendation engine runs and when the next run becomes eligible, based on the latest completed approval transaction for the account and service.","operationId":"RIRecommendationSchedule","parameters":[{"name":"account_id","description":"Account Identifier for the Entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"service","description":"AWS Service type","in":"query","required":false,"schema":{"type":"string","enum":["Amazon Elastic Compute Cloud - Compute","Amazon Relational Database Service","Amazon ElastiCache"],"default":"Amazon Elastic Compute Cloud - Compute"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RIRecommendationScheduleSuccessResponse"}}}},"400":{"description":"Invalid parameters","content":{}}}}}},"components":{"schemas":{"RIRecommendationScheduleSuccessResponse":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Specifies if the operation is successful"},"errors":{"type":"string","description":"Specifies the error if the operation failed"},"response":{"$ref":"#/components/schemas/RIRecommendationSchedule"}}},"RIRecommendationSchedule":{"type":"object","properties":{"minIntervalDays":{"type":"integer","description":"Minimum calendar days after the last completed RI approval transaction before a non-force recommendation run proceeds"},"lastTransactionAt":{"type":"string","format":"date-time","description":"Omitted when no qualifying completed approval transaction exists (e.g. recommendation job never ran or none completed yet). Otherwise, updated time of the latest transaction used for cooldown."},"nextEligibleAt":{"type":"string","format":"date-time","description":"Earliest time a non-force run clears the cooldown; omitted when there is no prior transaction or cooldown is disabled"},"isEligibleNow":{"type":"boolean","description":"Whether a non-force recommendation run would not be skipped for cooldown reasons"},"lastRunCompletedAt":{"type":"string","format":"date-time","description":"When the latest completed RI recommendation engine job finished for this cloud account and service"},"recommendationsGenerated":{"type":"integer","description":"Number of RI recommendations enqueued in that last completed run"},"noNewRecommendationsReason":{"type":"string","description":"When no new recommendations were produced, machine-readable reason (e.g. target_coverage_achieved, guardrails_validation_failed, pending_jobs_or_cooldown, recommendation_cooldown, no_forecast_data)"},"noNewRecommendationsReasonMessage":{"type":"string","description":"Default English explanation for the UI when noNewRecommendationsReason is set; clients may localize using noNewRecommendationsReason as the key"}}}}}}
```
