# Models

## The Error object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}}}}
```

## The PaginationMetadata object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"PaginationMetadata":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."},"first_page":{"type":"integer","description":"First available page number."},"last_page":{"type":"integer","description":"Last available page number."},"page":{"type":"integer","description":"Current page number."},"previous_page":{"type":"integer","description":"Previous page number."},"next_page":{"type":"integer","description":"Next page number."}},"additionalProperties":false}}}}
```

## The ApiErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]}}}}
```

## The CommitmentPlan object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"CommitmentPlan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"org_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"is_calculating":{"type":"boolean"},"status":{"enum":["new","reviewed","scheduled","completed","draft","needs_review","in_progress"]},"max_term":{"type":["string","null"]},"covered_ondemand_cost_hourly":{"type":"number"},"before_ondemand_cost_hourly":{"type":"number"},"before_reserved_cost_hourly":{"type":"number"},"amortized_cost_hourly":{"type":"number"},"recurring_cost_hourly":{"type":"number"},"upfront_cost_hourly":{"type":"number"},"before_cost_hourly":{"type":"number"},"after_cost_hourly":{"type":"number"},"total_cost_hourly":{"type":"number"},"savings_hourly":{"type":"number"},"fee_hourly":{"type":"number"},"commitment_coverage":{"type":"number"},"minimum_commitment_cost":{"type":"number"},"breakeven_hours":{"type":"number"},"total_savings":{"type":"number"},"monthly_savings":{"type":"number"},"total_monthly_before_cost":{"type":"number"}},"required":["after_cost_hourly","amortized_cost_hourly","before_cost_hourly","before_ondemand_cost_hourly","before_reserved_cost_hourly","breakeven_hours","commitment_coverage","covered_ondemand_cost_hourly","created_at","fee_hourly","id","is_calculating","max_term","minimum_commitment_cost","monthly_savings","name","org_id","recurring_cost_hourly","savings_hourly","status","total_cost_hourly","total_monthly_before_cost","total_savings","upfront_cost_hourly"],"additionalProperties":false}}}}
```

## The PurchasePlanContractSpec object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"PurchasePlanContractSpec":{"type":"object","properties":{"commitment_type":{"type":"string"},"properties":{"type":"object","default":{},"additionalProperties":{}},"term":{"default":null,"type":["string","null"],"enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null]},"payment_option":{"default":null,"type":["string","null"],"enum":["no_upfront","partial_upfront","all_upfront",null]}},"required":["commitment_type"],"additionalProperties":false}}}}
```

## The CommitmentOffer object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp","kubernetes","unknown"]},"provider_offering_id":{"type":"string"},"type":{"type":"string"},"display_name":{"type":["string","null"]},"leased_display_name":{"type":["string","null"]},"region":{"type":["string","null"]},"duration_seconds":{"type":"number"},"upfront_cost":{"type":"number"},"recurring_cost":{"type":"number"},"offering_class":{"enum":["standard","convertible",null]},"payment_option":{"enum":["No Upfront","Partial Upfront","All Upfront",null]},"offering_id":{"type":["string","null"]},"product_description":{"type":["string","null"]},"instance_family":{"type":["string","null"]},"instance_type":{"type":["string","null"]},"tenancy":{"type":["string","null"]},"az":{"type":["string","null"]},"is_multi_az":{"type":["boolean","null"]},"is_flexible":{"type":["boolean","null"]},"plan_type":{"type":["string","null"]}},"required":["az","display_name","duration_seconds","id","instance_family","instance_type","is_flexible","is_multi_az","leased_display_name","offering_id","plan_type","product_description","provider","provider_offering_id","recurring_cost","region","tenancy","type","upfront_cost"],"additionalProperties":false}}}}
```

## The CommitmentPlanLineItem\_Exclude\_CoveredServices object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"CommitmentPlanLineItem_Exclude_CoveredServices":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"offer_id":{"type":"string","format":"uuid"},"lease_menu_item_id":{"type":["string","null"],"format":"uuid"},"account_id":{"type":["string","null"]},"recommended_quantity":{"type":"integer","description":"Recommended number of units to purchase"},"selected_quantity":{"type":"integer","description":"Selected number of units to purchase"},"recommended_commitment":{"type":"number","description":"Recommended hourly commitment amount ($/hour for Savings Plans, 0 for instance RIs)"},"selected_commitment":{"type":"number","description":"Selected hourly commitment amount ($/hour for Savings Plans, 0 for instance RIs)"},"is_selected":{"type":"boolean","description":"Whether this line item is selected for purchase"},"after_amortized_cost":{"type":"number","description":"Hourly amortized cost of the commitment (upfront + recurring)"},"upfront_cost":{"type":"number","description":"Total upfront payment required (not hourly rate)"},"recurring_cost":{"type":"number","description":"Hourly recurring cost"},"before_cost":{"type":"number","description":"Total hourly cost before this commitment (ondemand + existing reservations)"},"before_ondemand_cost":{"type":"number","description":"Hourly ondemand cost before this commitment"},"before_reserved_cost":{"type":"number","description":"Hourly reserved cost from existing commitments"},"covered_ondemand_cost":{"type":"number","description":"Hourly ondemand cost that will be covered by this commitment"},"after_covered_units":{"type":"number","description":"Units that will be covered after the plan is applied"},"total_cost":{"type":"number","description":"Total cost of this commitment over its full term"},"monthly_cost":{"type":"number","description":"Monthly cost of this commitment"},"savings":{"type":"number","description":"Hourly savings compared to ondemand pricing"},"monthly_savings":{"type":"number","description":"Average monthly savings compared to ondemand pricing"},"total_savings":{"type":"number","description":"Total savings over the commitment term"},"fee":{"type":"number","description":"Estimated Archera premium (hourly) based on quoted maximum savings. See https://www.archera.ai/pricing for details."},"discount_rate":{"type":"number","description":"Discount percentage vs ondemand"},"breakeven_hours":{"type":"number","description":"Hours of usage needed until the achieved savings is greater than the remaining commitment for this line item"},"contract_term":{"description":"Commitment term (e.g., 'one_year_gris', 'thirty_day_gris')","type":"string","enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month"]},"payment_option":{"description":"Payment structure (No Upfront, Partial Upfront, All Upfront)","enum":["No Upfront","Partial Upfront","All Upfront"]},"contract_spec":{"description":"Detailed contract specifications including commitment type and properties","$ref":"#/components/schemas/PurchasePlanContractSpec"},"offer":{"description":"Detailed information about the commitment offer","$ref":"#/components/schemas/CommitmentOffer"}},"required":["account_id","after_amortized_cost","after_covered_units","before_cost","before_ondemand_cost","before_reserved_cost","breakeven_hours","contract_spec","contract_term","covered_ondemand_cost","discount_rate","fee","id","is_selected","lease_menu_item_id","monthly_cost","monthly_savings","offer","offer_id","payment_option","plan_id","recommended_commitment","recommended_quantity","recurring_cost","savings","selected_commitment","selected_quantity","total_cost","total_savings","upfront_cost"],"additionalProperties":false},"PurchasePlanContractSpec":{"type":"object","properties":{"commitment_type":{"type":"string"},"properties":{"type":"object","default":{},"additionalProperties":{}},"term":{"default":null,"type":["string","null"],"enum":["one_year_gris","thirty_day_gris","two_month_gris","three_month_gris","four_month_gris","five_month_gris","six_month_gris","seven_month_gris","eight_month_gris","nine_month_gris","ten_month_gris","eleven_month_gris","twelve_month_gris","thirteen_month_gris","fourteen_month_gris","fifteen_month_gris","sixteen_month_gris","seventeen_month_gris","eighteen_month_gris","nineteen_month_gris","twenty_month_gris","twenty_one_month_gris","twenty_two_month_gris","twenty_three_month_gris","twenty_four_month_gris","twenty_five_month_gris","twenty_six_month_gris","twenty_seven_month_gris","twenty_eight_month_gris","twenty_nine_month_gris","thirty_month_gris","thirty_one_month_gris","thirty_two_month_gris","thirty_three_month_gris","thirty_four_month_gris","thirty_five_month_gris","one_year","two_year","three_year","five_year","zero_day","thirty_day","two_month","three_month","four_month","five_month","six_month","seven_month","eight_month","nine_month","ten_month","eleven_month","thirteen_month","fourteen_month","fifteen_month","sixteen_month","seventeen_month","eighteen_month","nineteen_month","twenty_month","twenty_one_month","twenty_two_month","twenty_three_month","twenty_five_month","twenty_six_month","twenty_seven_month","twenty_eight_month","twenty_nine_month","thirty_month","thirty_one_month","thirty_two_month","thirty_three_month","thirty_four_month","thirty_five_month",null]},"payment_option":{"default":null,"type":["string","null"],"enum":["no_upfront","partial_upfront","all_upfront",null]}},"required":["commitment_type"],"additionalProperties":false},"CommitmentOffer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp","kubernetes","unknown"]},"provider_offering_id":{"type":"string"},"type":{"type":"string"},"display_name":{"type":["string","null"]},"leased_display_name":{"type":["string","null"]},"region":{"type":["string","null"]},"duration_seconds":{"type":"number"},"upfront_cost":{"type":"number"},"recurring_cost":{"type":"number"},"offering_class":{"enum":["standard","convertible",null]},"payment_option":{"enum":["No Upfront","Partial Upfront","All Upfront",null]},"offering_id":{"type":["string","null"]},"product_description":{"type":["string","null"]},"instance_family":{"type":["string","null"]},"instance_type":{"type":["string","null"]},"tenancy":{"type":["string","null"]},"az":{"type":["string","null"]},"is_multi_az":{"type":["boolean","null"]},"is_flexible":{"type":["boolean","null"]},"plan_type":{"type":["string","null"]}},"required":["az","display_name","duration_seconds","id","instance_family","instance_type","is_flexible","is_multi_az","leased_display_name","offering_id","plan_type","product_description","provider","provider_offering_id","recurring_cost","region","tenancy","type","upfront_cost"],"additionalProperties":false}}}}
```

## The ResourceSKU object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"ResourceSKU":{"type":"object","properties":{"id":{"type":"string"},"resource_id":{"type":"string","format":"uuid","description":"Unique identifier for the underlying resource"},"provider":{"type":"string","enum":["aws","azure","gcp","kubernetes","unknown"]},"provider_resource_id":{"type":"string","description":"Provider's unique identifier (e.g., ARN for AWS)"},"is_spot":{"type":"boolean","description":"Whether this is a spot instance (a way to utilize unused instances)"},"name":{"type":["string","null"]},"resource_group":{"type":["string","null"],"description":"Azure resource group"},"usage_end":{"type":"string","format":"date","description":"Last date this resource had usage"},"usage_start":{"type":"string","format":"date","description":"First date this resource had usage"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"instance_id":{"readOnly":true,"type":"string"},"billing_account_id":{"type":"string","description":"Management account ID (AWS) or billing account ID (Azure/GCP)"},"sub_account_id":{"type":"string","description":"Account ID where the resource is running"},"management_account_id":{"readOnly":true,"description":"Management account ID (AWS) or billing account ID (Azure/GCP)","deprecated":true,"type":"string"},"owner_account_id":{"readOnly":true,"description":"Account ID where the resource is running","deprecated":true,"type":"string"},"sku_title":{"readOnly":true,"type":"string"},"sku_name":{"type":["string","null"]},"availability_zone":{"type":["string","null"]},"cache_engine":{"type":["string","null"],"description":"Cache engine type (e.g., Redis, Memcached)"},"database_engine":{"type":["string","null"],"description":"Database engine type (e.g., MySQL, PostgreSQL)"},"description":{"type":["string","null"]},"family":{"type":["string","null"],"description":"Service or product family (e.g., 'Compute', 'Storage')"},"full_region_name":{"type":["string","null"]},"has_ondemand_terms":{"type":["boolean","null"],"description":"Whether on-demand pricing is available for this SKU"},"instance_type":{"type":["string","null"],"description":"Instance type (e.g., 'm5.large', 'Standard_D4s_v3')"},"instance_type_family":{"type":["string","null"],"description":"Instance family (e.g., 'm5', 'Standard_D')"},"is_reservable":{"type":["boolean","null"],"description":"Whether this resource type supports reservations/commitments"},"license_model":{"type":["string","null"]},"location_type":{"type":["string","null"]},"normalization_size_factor":{"type":["string","null"]},"operating_system":{"type":["string","null"]},"pre_installed_sw":{"type":["string","null"]},"price_currency":{"type":["string","null"]},"provider_service":{"type":["string","null"]},"provider_sku_id":{"type":["string","null"]},"publication_date":{"type":["string","null"]},"region":{"type":["string","null"]},"service":{"type":["string","null"],"description":"Service name (e.g., 'Amazon Elastic Compute Cloud')"},"tenancy":{"type":["string","null"]},"usage_type":{"type":["string","null"]},"version":{"type":["string","null"]},"vpc_networking_support":{"type":["boolean","null"]},"ondemand_usage_unit":{"type":["string","null"]}},"required":["billing_account_id","created_at","id","is_spot","management_account_id","owner_account_id","provider","provider_resource_id","resource_id","sub_account_id","tags","updated_at","usage_end","usage_start"],"additionalProperties":false}}}}
```

## The CommitmentPlanResourceMatch object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"CommitmentPlanResourceMatch":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the resource match"},"total_units":{"type":"number","description":"Total resource usage units"},"before_uncovered_units":{"type":"number","description":"Units not covered at the moment (before this plan)"},"after_covered_units":{"type":"number","description":"Units that will be covered after the plan is applied"},"after_uncovered_units":{"type":"number","description":"Units that will remain uncovered after the plan to avoid overcommit"},"ondemand_price":{"type":"number","description":"Ondemand cost per unit-hour"},"if_all_ondemand_cost":{"type":"number","description":"Hourly cost if paying all the units with ondemand price"},"before_ondemand_cost":{"type":"number","description":"Current hourly ondemand cost for units not covered by existing commitments"},"after_ondemand_cost":{"type":"number","description":"Hourly ondemand cost remaining after applying this plan"},"covered_ondemand_cost":{"type":"number","description":"Hourly ondemand cost for units that will be covered by this plan"},"before_reserved_cost":{"type":"number","description":"Hourly cost from current/existing reservations for this resource"},"after_reserved_cost":{"type":"number","description":"Hourly commitment/reserved cost after applying this plan"},"before_cost":{"type":"number","description":"Total hourly cost before applying this plan (ondemand + reserved costs)"},"after_cost":{"type":"number","description":"Total hourly cost after applying this plan"},"monthly_before_cost":{"type":"number","description":"Total monthly cost before applying this plan"},"monthly_after_cost":{"type":"number","description":"Total monthly cost after applying this plan"},"monthly_after_reserved_cost":{"type":"number","description":"Monthly reserved/commitment cost portion after applying this plan"},"monthly_after_ondemand_cost":{"type":"number","description":"Monthly ondemand cost portion after applying this plan"},"average_savings":{"type":"number","description":"Average hourly savings from this plan"},"average_monthly_savings":{"type":"number","description":"Average monthly savings from this plan"},"usage_type":{"description":"Type of resource usage","type":"string","enum":["running","resource","requests","gb_seconds","gb_hours","cpu_hours","cpu_utilization","os_hours","units_per_month","gb_per_month","provisioned_concurrency_gb_seconds","provisioned_duration_gb_seconds","unknown"]},"coverage":{"type":"number","description":"Percentage of total units that will be covered by commitments (0-1)"},"resource":{"description":"Detailed resource information including provider, service, and instance details etc","anyOf":[{"$ref":"#/components/schemas/ResourceSKU"},{"type":"null"}]}},"required":["after_cost","after_covered_units","after_ondemand_cost","after_reserved_cost","after_uncovered_units","average_monthly_savings","average_savings","before_cost","before_ondemand_cost","before_reserved_cost","before_uncovered_units","coverage","covered_ondemand_cost","id","if_all_ondemand_cost","monthly_after_cost","monthly_after_ondemand_cost","monthly_after_reserved_cost","monthly_before_cost","ondemand_price","resource","total_units","usage_type"],"additionalProperties":false},"ResourceSKU":{"type":"object","properties":{"id":{"type":"string"},"resource_id":{"type":"string","format":"uuid","description":"Unique identifier for the underlying resource"},"provider":{"type":"string","enum":["aws","azure","gcp","kubernetes","unknown"]},"provider_resource_id":{"type":"string","description":"Provider's unique identifier (e.g., ARN for AWS)"},"is_spot":{"type":"boolean","description":"Whether this is a spot instance (a way to utilize unused instances)"},"name":{"type":["string","null"]},"resource_group":{"type":["string","null"],"description":"Azure resource group"},"usage_end":{"type":"string","format":"date","description":"Last date this resource had usage"},"usage_start":{"type":"string","format":"date","description":"First date this resource had usage"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"instance_id":{"readOnly":true,"type":"string"},"billing_account_id":{"type":"string","description":"Management account ID (AWS) or billing account ID (Azure/GCP)"},"sub_account_id":{"type":"string","description":"Account ID where the resource is running"},"management_account_id":{"readOnly":true,"description":"Management account ID (AWS) or billing account ID (Azure/GCP)","deprecated":true,"type":"string"},"owner_account_id":{"readOnly":true,"description":"Account ID where the resource is running","deprecated":true,"type":"string"},"sku_title":{"readOnly":true,"type":"string"},"sku_name":{"type":["string","null"]},"availability_zone":{"type":["string","null"]},"cache_engine":{"type":["string","null"],"description":"Cache engine type (e.g., Redis, Memcached)"},"database_engine":{"type":["string","null"],"description":"Database engine type (e.g., MySQL, PostgreSQL)"},"description":{"type":["string","null"]},"family":{"type":["string","null"],"description":"Service or product family (e.g., 'Compute', 'Storage')"},"full_region_name":{"type":["string","null"]},"has_ondemand_terms":{"type":["boolean","null"],"description":"Whether on-demand pricing is available for this SKU"},"instance_type":{"type":["string","null"],"description":"Instance type (e.g., 'm5.large', 'Standard_D4s_v3')"},"instance_type_family":{"type":["string","null"],"description":"Instance family (e.g., 'm5', 'Standard_D')"},"is_reservable":{"type":["boolean","null"],"description":"Whether this resource type supports reservations/commitments"},"license_model":{"type":["string","null"]},"location_type":{"type":["string","null"]},"normalization_size_factor":{"type":["string","null"]},"operating_system":{"type":["string","null"]},"pre_installed_sw":{"type":["string","null"]},"price_currency":{"type":["string","null"]},"provider_service":{"type":["string","null"]},"provider_sku_id":{"type":["string","null"]},"publication_date":{"type":["string","null"]},"region":{"type":["string","null"]},"service":{"type":["string","null"],"description":"Service name (e.g., 'Amazon Elastic Compute Cloud')"},"tenancy":{"type":["string","null"]},"usage_type":{"type":["string","null"]},"version":{"type":["string","null"]},"vpc_networking_support":{"type":["boolean","null"]},"ondemand_usage_unit":{"type":["string","null"]}},"required":["billing_account_id","created_at","id","is_spot","management_account_id","owner_account_id","provider","provider_resource_id","resource_id","sub_account_id","tags","updated_at","usage_end","usage_start"],"additionalProperties":false}}}}
```

## The LeaseMenuItem object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"LeaseMenuItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fee_type":{"type":"string"},"fee_rate":{"type":"number"},"is_rebate":{"type":"boolean"},"lockin_months":{"type":"integer"},"term_months":{"type":"integer"}},"required":["fee_rate","fee_type","is_rebate","lockin_months","term_months"],"additionalProperties":false}}}}
```

## The DailyUtilization object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"DailyUtilization":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reservation_utilization":{"type":"number"},"covered_cost":{"type":"number"},"cost":{"type":"number"},"potential_savings":{"type":["number","null"]},"running_hours":{"type":["number","null"]},"savings":{"type":"number"},"unutilized_commit":{"type":"number"},"gri_fees":{"type":"number"},"net_savings":{"type":"number"}},"required":["cost","covered_cost","date","gri_fees","net_savings","potential_savings","reservation_utilization","running_hours","savings","unutilized_commit"],"additionalProperties":false}}}}
```

## The PublicCommitment object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"PublicCommitment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["aws","azure","gcp","kubernetes","unknown"]},"display_name":{"type":"string"},"leased_display_name":{"type":"string"},"provider_reservation_id":{"type":"string"},"account_id":{"type":["string","null"]},"master_account_id":{"readOnly":true,"deprecated":true,"type":["string","null"]},"billing_account_id":{"type":["string","null"]},"type":{"type":"string"},"region":{"type":["string","null"]},"duration_seconds":{"type":["integer","null"]},"reservation_end":{"type":["string","null"]},"reservation_start":{"type":["string","null"]},"transfer_reservation_start":{"type":["string","null"],"format":"date-time"},"transfer_reservation_end":{"type":["string","null"],"format":"date-time"},"start_date":{"type":["string","null"],"format":"date-time"},"end_date":{"type":["string","null"],"format":"date-time"},"status":{"enum":["active","locked","new","reselling","unlocked","unknown","cancelled","expired","recently_expired","resold","removed"]},"is_leased":{"type":"boolean"},"is_active":{"type":"boolean"},"lease":{"anyOf":[{"$ref":"#/components/schemas/LeaseMenuItem"},{"type":"null"}]},"lease_start":{"type":["string","null"],"format":"date-time"},"lease_lockin_date":{"type":["string","null"],"format":"date-time"},"upfront_cost":{"type":"number"},"recurring_cost":{"type":"number"},"is_flexible":{"type":["boolean","null"]},"payment_option":{"enum":["No Upfront","Partial Upfront","All Upfront",null]},"offering_class":{"enum":["standard","convertible",null]},"offering_id":{"type":["string","null"]},"instance_count":{"type":["integer","null"]},"effective_instance_count":{"type":["integer","null"]},"product_description":{"type":["string","null"]},"instance_family":{"type":["string","null"]},"instance_type":{"type":["string","null"]},"tenancy":{"type":["string","null"]},"az":{"type":["string","null"]},"is_multi_az":{"type":["boolean","null"]},"plan_type":{"type":["string","null"]},"scope":{"enum":["shared","subscription","resource_group","management_group",null]},"name":{"type":["string","null"]},"order_id":{"type":["string","null"]},"resource_group":{"type":["string","null"]},"instance_flexibility":{"type":["boolean","null"]},"savings":{"type":["number","null"]},"monthly_savings":{"type":["number","null"]},"net_savings":{"type":["number","null"]},"utilization":{"type":["number","null"]},"potential_savings":{"type":["number","null"]},"running_hours":{"type":["number","null"]},"amortized_cost":{"type":["number","null"]},"daily_utilizations":{"type":"array","items":{"$ref":"#/components/schemas/DailyUtilization"}}},"required":["account_id","amortized_cost","az","billing_account_id","daily_utilizations","display_name","duration_seconds","effective_instance_count","end_date","id","instance_count","instance_family","instance_flexibility","instance_type","is_active","is_flexible","is_leased","is_multi_az","lease","lease_lockin_date","lease_start","leased_display_name","master_account_id","monthly_savings","name","net_savings","offering_class","offering_id","order_id","payment_option","plan_type","potential_savings","product_description","provider","provider_reservation_id","recurring_cost","region","reservation_end","reservation_start","resource_group","running_hours","savings","scope","start_date","status","tenancy","transfer_reservation_end","transfer_reservation_start","type","upfront_cost","utilization"],"additionalProperties":false},"LeaseMenuItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fee_type":{"type":"string"},"fee_rate":{"type":"number"},"is_rebate":{"type":"boolean"},"lockin_months":{"type":"integer"},"term_months":{"type":"integer"}},"required":["fee_rate","fee_type","is_rebate","lockin_months","term_months"],"additionalProperties":false},"DailyUtilization":{"type":"object","properties":{"date":{"type":"string","format":"date"},"reservation_utilization":{"type":"number"},"covered_cost":{"type":"number"},"cost":{"type":"number"},"potential_savings":{"type":["number","null"]},"running_hours":{"type":["number","null"]},"savings":{"type":"number"},"unutilized_commit":{"type":"number"},"gri_fees":{"type":"number"},"net_savings":{"type":"number"}},"required":["cost","covered_cost","date","gri_fees","net_savings","potential_savings","reservation_utilization","running_hours","savings","unutilized_commit"],"additionalProperties":false}}}}
```

## The IdsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"IdsResponse":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}}}}
```

## The DataPoint object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"DataPoint":{"type":"object","properties":{"date":{"type":"string"},"remaining_commit":{"type":"number"},"locked_commit":{"type":"number"},"unlocked_commit":{"type":"number"},"savings":{"type":"number"},"net_savings":{"type":"number"},"utilization":{"type":"number"},"unutilized_commit":{"type":"number"},"is_projection":{"type":"boolean","description":"Indicates whether this data point is a projection based on current commitment utilization patterns. Historical data (is_projection=false) reflects actual recorded metrics, while projected data (is_projection=true) represents estimated future values assuming commitments continue with their current utilization rates."}},"required":["date","is_projection","locked_commit","net_savings","remaining_commit","savings","unlocked_commit","unutilized_commit","utilization"],"additionalProperties":false}}}}
```

## The PubChartResponse object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"PubChartResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataPoint"}}},"additionalProperties":false},"DataPoint":{"type":"object","properties":{"date":{"type":"string"},"remaining_commit":{"type":"number"},"locked_commit":{"type":"number"},"unlocked_commit":{"type":"number"},"savings":{"type":"number"},"net_savings":{"type":"number"},"utilization":{"type":"number"},"unutilized_commit":{"type":"number"},"is_projection":{"type":"boolean","description":"Indicates whether this data point is a projection based on current commitment utilization patterns. Historical data (is_projection=false) reflects actual recorded metrics, while projected data (is_projection=true) represents estimated future values assuming commitments continue with their current utilization rates."}},"required":["date","is_projection","locked_commit","net_savings","remaining_commit","savings","unlocked_commit","unutilized_commit","utilization"],"additionalProperties":false}}}}
```

## The PublicMetrics object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"PublicMetrics":{"type":"object","properties":{"lifetime_savings":{"type":"number"},"mtd_savings":{"type":"number"},"purchase_automation_enabled":{"type":"boolean"},"buyback_automation_enabled":{"type":"boolean"},"has_actioned_plan":{"type":"boolean"},"has_pending_actions":{"type":"boolean"},"latest_execution_date":{"type":"string","format":"date"},"purchase_missed_savings":{"type":"number"},"buyback_missed_savings":{"type":"number"},"total_daily_missed_savings":{"type":"number"},"hourly_missed_savings":{"type":"number"},"missed_savings_start_date":{"type":"string","format":"date"},"missed_savings_end_date":{"type":"string","format":"date"},"expiring_savings":{"type":"number"},"coverage":{"type":"number"},"utilization":{"type":"number"}},"required":["buyback_automation_enabled","buyback_missed_savings","coverage","expiring_savings","has_actioned_plan","has_pending_actions","hourly_missed_savings","latest_execution_date","lifetime_savings","missed_savings_end_date","missed_savings_start_date","mtd_savings","purchase_automation_enabled","purchase_missed_savings","total_daily_missed_savings","utilization"],"additionalProperties":false}}}}
```

## The Org object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"Org":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Unique organization identifier"},"name":{"type":"string","description":"Organization name"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"User's role in the organization (e.g., admin, user, support, cloud_rep, restricted_user)"},"kind":{"description":"Type of membership: 'direct' (direct member), 'partnership' (via partner org), 'staff' (Archera staff)","enum":["direct","staff","partnership"]}},"required":["kind","name","org_id","role"],"additionalProperties":false}}}}
```

## The SKUUsageDaily object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"SKUUsageDaily":{"type":"object","properties":{"date":{"type":"string","format":"date"},"usage_account_id":{"readOnly":true,"deprecated":true,"type":"string"},"sub_account_id":{"type":"string"},"usage":{"type":"number"},"reservation_usage":{"type":"number"},"free_tier_usage":{"type":"number"},"ondemand_cost":{"type":"number"},"reserved_cost":{"type":"number"},"if_all_ondemand_cost":{"type":"number"},"spot_cost":{"type":"number"},"free_tier_savings":{"type":"number"},"usage_type":{"type":["string","null"]},"common_usage_type":{"type":["string","null"]},"covered_usage":{"type":"number"},"uptime":{"type":"number"}},"required":["common_usage_type","covered_usage","date","free_tier_savings","free_tier_usage","if_all_ondemand_cost","ondemand_cost","reservation_usage","reserved_cost","spot_cost","sub_account_id","uptime","usage","usage_account_id","usage_type"],"additionalProperties":false}}}}
```

## The JWK object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"JWK":{"type":"object","properties":{"kty":{"type":"string","description":"Key type (e.g., 'RSA')"},"use":{"type":"string","description":"Public key use (e.g., 'sig' for signature)"},"kid":{"type":"string","description":"Key ID for identifying the key"},"alg":{"type":"string","description":"Algorithm (e.g., 'RS256')"},"n":{"type":"string","description":"RSA modulus (base64url encoded)"},"e":{"type":"string","description":"RSA public exponent (base64url encoded)"}},"required":["alg","e","kid","kty","n","use"],"additionalProperties":false}}}}
```

## The JWKS object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"JWKS":{"type":"object","properties":{"keys":{"type":"array","description":"Array of JSON Web Keys","items":{"$ref":"#/components/schemas/JWK"}}},"required":["keys"],"additionalProperties":false},"JWK":{"type":"object","properties":{"kty":{"type":"string","description":"Key type (e.g., 'RSA')"},"use":{"type":"string","description":"Public key use (e.g., 'sig' for signature)"},"kid":{"type":"string","description":"Key ID for identifying the key"},"alg":{"type":"string","description":"Algorithm (e.g., 'RS256')"},"n":{"type":"string","description":"RSA modulus (base64url encoded)"},"e":{"type":"string","description":"RSA public exponent (base64url encoded)"}},"required":["alg","e","kid","kty","n","use"],"additionalProperties":false}}}}
```

## The OAuthMetadata object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"OAuthMetadata":{"type":"object","properties":{"issuer":{"type":"string","description":"The authorization server's issuer identifier URL"},"authorization_endpoint":{"type":"string","description":"URL of the OAuth 2.0 authorization endpoint"},"token_endpoint":{"type":"string","description":"URL of the OAuth 2.0 token endpoint"},"revocation_endpoint":{"type":"string","description":"URL of the OAuth 2.0 token revocation endpoint (RFC 7009)"},"jwks_uri":{"type":"string","description":"URL of the JSON Web Key Set document"},"response_types_supported":{"type":"array","description":"OAuth 2.0 response_type values supported","items":{"type":"string"}},"grant_types_supported":{"type":"array","description":"OAuth 2.0 grant type values supported","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","description":"PKCE code challenge methods supported","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","description":"Client authentication methods supported at token endpoint","items":{"type":"string"}},"scopes_supported":{"type":"array","description":"OAuth 2.0 scope values supported","items":{"type":"string"}},"service_documentation":{"type":"string","description":"URL of service documentation for developers"}},"required":["authorization_endpoint","code_challenge_methods_supported","grant_types_supported","issuer","jwks_uri","response_types_supported","revocation_endpoint","scopes_supported","token_endpoint","token_endpoint_auth_methods_supported"],"additionalProperties":false}}}}
```

## The OAuthSessionResponse object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"OAuthSessionResponse":{"type":"object","properties":{"token_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z"},"client_name":{"type":"string"},"client_id":{"type":"string"},"created_at":{"type":"integer"},"scope":{"type":"string"}},"required":["client_id","client_name","created_at","scope","token_id"],"additionalProperties":false}}}}
```

## The RevokeAllSessionsResponse object

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"components":{"schemas":{"RevokeAllSessionsResponse":{"type":"object","properties":{"message":{"type":"string"},"count":{"type":"integer"}},"required":["count","message"],"additionalProperties":false}}}}
```
