> 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-user-approval-apis.md).

# Commitment Orchestrator User Approval APIs

## List of Commitment transactions with filtering options

> List of commitment related transactions with advanced filtering options

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v2/approvals/list":{"post":{"tags":["Commitment Orchestrator User Approval APIs"],"summary":"List of Commitment transactions with filtering options","description":"List of commitment related transactions with advanced filtering options","operationId":"ApprovalsListV2","parameters":[{"name":"account_id","description":"Account Identifier for the Entity","in":"path","required":true,"schema":{"type":"string"}},{"name":"routingId","description":"Routing Identifier for the request","in":"query","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","schema":{"type":"string","format":"date"},"description":"Start date for the approval period."},{"name":"end_date","in":"query","schema":{"type":"string","format":"date"},"description":"End date for the approval period."}],"requestBody":{"description":"Input for filtering and pagination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalsListRequestV2"}}},"required":true},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalsListResponseV2"}}}},"400":{"description":"Invalid request","content":{}}}}}},"components":{"schemas":{"ApprovalsListRequestV2":{"type":"object","properties":{"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Number of items per page"},"page":{"type":"integer","description":"Page number (starting from 1)"}}},"service":{"type":"string","description":"Filter by service name"},"statuses":{"type":"array","description":"Filter by event statuses","items":{"type":"string","enum":["PENDING","COMPLETED","EXPIRED","REJECTED","QUEUED","APPROVED","APPROVAL_PENDING"]}},"cloud_account_id":{"type":"string","description":"Filter by cloud account ID"},"event_types":{"type":"array","description":"Filter by event types","items":{"type":"string","enum":["Reserved Instance Exchange","Atom RI Purchase","Savings Plan Purchase","RDS Reserved Instance Purchase","Purchase ElastiCache Reserved Node","Purchase OpenSearch Reserved Instance","Database Savings Plan Purchase"]}},"regions":{"type":"array","description":"Filter by regions","items":{"type":"string"}}}},"ApprovalsListResponseV2":{"type":"object","properties":{"ts":{"type":"integer","description":"Response timestamp"},"success":{"type":"boolean","description":"Indicates if the request was successful"},"errors":{"type":"array","description":"List of errors if any","items":{"type":"object"},"nullable":true},"response":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of events matching the criteria"},"pages":{"type":"integer","description":"Total number of pages"},"events":{"type":"array","description":"List of approval events","items":{"$ref":"#/components/schemas/ApprovalEventV2"}}}}}},"ApprovalEventV2":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the event"},"category":{"type":"string","description":"Category of the event"},"cloud_account_id":{"type":"string","description":"Cloud account identifier"},"cloud_account_name":{"type":"string","description":"Cloud account name"},"account_id":{"type":"string","description":"Harness account identifier"},"evaluated_at":{"type":"string","format":"date-time","description":"Timestamp when the event was evaluated"},"status":{"type":"string","description":"Status of the event","enum":["PENDING","COMPLETED","EXPIRED","REJECTED"]},"potential_savings":{"type":"number","format":"float","description":"Potential savings from the event"},"potential_spend":{"type":"number","format":"float","description":"Potential spend from the event"},"name":{"type":"string","description":"Name of the event"},"metadata":{"type":"object","description":"Additional metadata for the event","additionalProperties":true}}}}}}
```

## List of Commitment transactions awaiting user approvals

> List of commitment related transactions waiting for user approvals

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v1/approvals/list":{"post":{"tags":["Commitment Orchestrator User Approval APIs"],"summary":"List of Commitment transactions awaiting user approvals","description":"List of commitment related transactions waiting for user approvals","operationId":"ApprovalsList","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"}}],"requestBody":{"description":"Input for Pagination","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaginationInput"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalEventsSuccessResponse"}}}},"400":{"description":"Invalid status value","content":{}}}}}},"components":{"schemas":{"PaginationInput":{"type":"object","properties":{"limit":{"type":"integer","maximum":100},"page":{"type":"integer","maximum":100}}},"ApprovalEventsSuccessResponse":{"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/ApprovalEvent"}}}}}},"ApprovalEvent":{"type":"object","properties":{"id":{"type":"integer"},"category":{"type":"string"},"cloud_account_id":{"type":"string"},"account_id":{"type":"string"},"evaluated_at":{"type":"string"},"metadata":{"type":"object","description":"Map of key and value with data specific to the event type"}}}}}}
```

## Approve/Reject commitment transactions

> Approve or Reject commitment transactions

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v1/approvals/update":{"post":{"tags":["Commitment Orchestrator User Approval APIs"],"summary":"Approve/Reject commitment transactions","description":"Approve or Reject commitment transactions","operationId":"ApprovalsUpdate","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"}}],"requestBody":{"description":"Actions and their approval or rejection status","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApprovalPayload"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccessResponse"}}}},"400":{"description":"Invalid status value","content":{}}}}}},"components":{"schemas":{"ApprovalPayload":{"type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalAction"}}}},"ApprovalAction":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the event being approved or rejected"},"status":{"type":"string","enum":["APPROVED","REJECTED"]},"term_seconds":{"type":"integer","format":"int64","description":"Selected Savings Plan term; omitted values keep the event's current term"},"payment_option":{"type":"string","enum":["No Upfront","Partial Upfront","All Upfront"],"description":"Selected Savings Plan payment option; omitted values keep the event's current payment option"}}},"GenericSuccessResponse":{"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"}}}}}}
```

## Overview API with summary for different types of approval events

> Overview API with summary of event types with the status and potential savings opportunities

```json
{"openapi":"3.0.1","info":{"title":"Commitment Orchestrator APIs","version":"1.0.0"},"tags":[],"servers":[{"url":"https://app.harness.io/gateway","description":"Production server"}],"paths":{"/accounts/{account_id}/v2/approvals/overview":{"post":{"tags":["Commitment Orchestrator User Approval APIs"],"summary":"Overview API with summary for different types of approval events","description":"Overview API with summary of event types with the status and potential savings opportunities","operationId":"ApprovalsOverview","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"}}],"requestBody":{"description":"Input for Supported optional filters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApprovalsOverviewRequestFilters"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalOverviewSuccessResponse"}}}},"400":{"description":"Invalid status value","content":{}}}}}},"components":{"schemas":{"ApprovalsOverviewRequestFilters":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"string"},"description":"List of regions to filter by"},"cloud_account_ids":{"type":"array","items":{"type":"string"},"description":"List of cloud account IDs to filter by"},"service":{"type":"string","enum":["Amazon Elastic Compute Cloud - Compute","Amazon Relational Database Service"]}}},"ApprovalOverviewSuccessResponse":{"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":{"result":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalEventSummary"}}}}}},"ApprovalEventSummary":{"type":"object","properties":{"savings_potential":{"type":"number"},"event_count":{"type":"integer"},"event_type":{"type":"string"},"event_status":{"type":"string"}}}}}}
```
