{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"common.TaskStatusEnum":{"type":"string","description":"Current status of a task","enum":["DONE","ERROR","PENDING","RUNNING","SCHEDULED","WAITING_USER_INPUT"]},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"finops.costExplorer.BreakdownCreation":{"type":"object","description":"Parameters of a cost breakdown computation","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.CurrencyEnum"}],"description":"Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them.","nullable":true},"filters":{"type":"array","description":"Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line.","nullable":true,"items":{"$ref":"#/components/schemas/finops.costExplorer.BreakdownFilter"}},"from":{"type":"string","description":"Start of the range, included","format":"date-time"},"granularity":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.GranularityEnum"}],"description":"Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width."},"groupBy":{"type":"string","description":"Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY.","nullable":true},"to":{"type":"string","description":"End of the range, excluded. It must be after from.","format":"date-time"}},"required":["from","granularity","to"]},"finops.costExplorer.BreakdownFilter":{"type":"object","description":"Keeps only the cost lines whose value of the dimension is one of the values","properties":{"dimension":{"type":"string","description":"Key of the dimension to filter on, as GET /v2/finops/costExplorer/dimension lists it. Two filters of the same breakdown cannot name the same dimension."},"values":{"type":"array","description":"Values to keep, at least one, as POST /v2/finops/costExplorer/dimensionValue lists them. The comparison is exact and case-sensitive. An empty string keeps the cost lines that have no value for the dimension.","items":{"type":"string"}}},"required":["dimension","values"]},"finops.costExplorer.BreakdownResult":{"type":"object","description":"Cost of a range, split into periods and into series","properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.CurrencyEnum"}],"description":"Currency of every amount, for example EUR. Null when the range holds no cost.","nullable":true,"readOnly":true},"from":{"type":"string","description":"Start of the range, included","format":"date-time","readOnly":true},"granularity":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.GranularityEnum"}],"description":"Width of the periods. It is the requested granularity, or a coarser one when the range holds more than 744 periods of the requested width.","readOnly":true},"periods":{"type":"array","description":"Cost of each period, in time order","items":{"$ref":"#/components/schemas/finops.costExplorer.Period"},"readOnly":true},"series":{"type":"array","description":"Values of the groupBy dimension present in the result, by total cost descending. Each one is a key of the amounts of every period and of totals. An empty string groups the cost lines that have no value for the dimension.","items":{"type":"string"},"readOnly":true},"timezone":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.TimezoneEnum"}],"description":"IANA time zone that the periods align with. Always UTC for now.","readOnly":true},"to":{"type":"string","description":"End of the range, excluded","format":"date-time","readOnly":true},"totals":{"type":"object","description":"Cost of each series over all the periods, in the currency of the breakdown, keyed by the values of series","additionalProperties":{"type":"number"},"readOnly":true},"truncated":{"type":"boolean","description":"Whether cost data is missing for a part of the range, so the amounts of that part are incomplete","readOnly":true}}},"finops.costExplorer.BreakdownTask":{"type":"object","description":"Asynchronous computation of a cost breakdown, and its result. The computation is kept for a limited time after its last update. It is then no longer found.","properties":{"createdAt":{"type":"string","description":"Date when the computation was started","format":"date-time","readOnly":true},"errors":{"type":"array","description":"Errors that ended the computation. Empty unless the status is ERROR.","items":{"$ref":"#/components/schemas/finops.costExplorer.TaskError"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the computation","format":"uuid","readOnly":true},"result":{"allOf":[{"$ref":"#/components/schemas/finops.costExplorer.BreakdownResult"}],"description":"Cost breakdown. Null unless the status is DONE.","nullable":true,"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/common.TaskStatusEnum"}],"description":"Status of the computation: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final.","readOnly":true}}},"finops.costExplorer.CurrencyEnum":{"type":"string","description":"Currency of the cost lines: an ISO 4217 code, or POINTS","enum":["AUD","CAD","CZK","EUR","GBP","INR","LTL","MAD","PLN","POINTS","SGD","TND","USD","XOF"]},"finops.costExplorer.Dimension":{"type":"object","description":"Attribute of the cost lines that a cost breakdown can filter on or group by","properties":{"key":{"type":"string","description":"Identifier of the dimension, for example CATEGORY, as the groupBy and the filters of a cost breakdown take it","readOnly":true},"label":{"type":"string","description":"Display name of the dimension, in English, for example `Product category`","readOnly":true}}},"finops.costExplorer.DimensionValueCreation":{"type":"object","description":"Parameters of a dimension values listing","properties":{"from":{"type":"string","description":"Start of the range, included","format":"date-time"},"to":{"type":"string","description":"End of the range, excluded. It must be after from.","format":"date-time"}},"required":["from","to"]},"finops.costExplorer.DimensionValueList":{"type":"object","description":"Values of one dimension present in the cost lines of a range","properties":{"dimension":{"type":"string","description":"Key of the dimension that the values belong to, as GET /v2/finops/costExplorer/dimension lists it","readOnly":true},"values":{"type":"array","description":"Distinct values of the dimension in the cost lines of the range, sorted. Each one can feed a filter of a cost breakdown. An empty string stands for the cost lines that have no value for the dimension.","items":{"type":"string"},"readOnly":true}}},"finops.costExplorer.DimensionValueTask":{"type":"object","description":"Asynchronous listing of the values of every dimension in the cost lines of a range, and its result. The listing is kept for a limited time after its last update. It is then no longer found.","properties":{"createdAt":{"type":"string","description":"Date when the listing was started","format":"date-time","readOnly":true},"errors":{"type":"array","description":"Errors that ended the listing. Empty unless the status is ERROR.","items":{"$ref":"#/components/schemas/finops.costExplorer.TaskError"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the listing","format":"uuid","readOnly":true},"result":{"type":"array","description":"Values of each dimension, in the order of GET /v2/finops/costExplorer/dimension. Null unless the status is DONE.","nullable":true,"items":{"$ref":"#/components/schemas/finops.costExplorer.DimensionValueList"},"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/common.TaskStatusEnum"}],"description":"Status of the listing: PENDING, RUNNING, DONE or ERROR. DONE and ERROR are final.","readOnly":true}}},"finops.costExplorer.GranularityEnum":{"type":"string","description":"Width of a period of a cost breakdown. Periods align with UTC hours, days or months.","enum":["DAY","HOUR","MONTH"]},"finops.costExplorer.Period":{"type":"object","description":"Cost recognized during one period of a cost breakdown, split into series","properties":{"amounts":{"type":"object","description":"Cost of each series during the period, in the currency of the breakdown, keyed by the values of series. Every series has an entry.","additionalProperties":{"type":"number"},"readOnly":true},"end":{"type":"string","description":"End of the period, excluded, in UTC. The last period ends at the to of the range.","format":"date-time","readOnly":true},"start":{"type":"string","description":"Start of the period, included, in UTC. The first period starts at the from of the range.","format":"date-time","readOnly":true}}},"finops.costExplorer.TaskError":{"type":"object","description":"Error that ended a cost explorer computation","properties":{"class":{"type":"string","description":"Class of the error: - Client::BadRequest::CurrencyRequired: the cost spans several currencies. Start the breakdown again with one of those the message lists. - Server::ServiceUnavailable::Timeout: start again over a shorter range. - Server::ServiceUnavailable::Interrupted: start again. - Server::InternalServerError: unexpected failure.","readOnly":true},"message":{"type":"string","description":"Human-readable description of the error","readOnly":true}}},"finops.costExplorer.TimezoneEnum":{"type":"string","description":"IANA time zone that the periods of a cost breakdown align with","enum":["UTC"]},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/finops/costExplorer/breakdown":{"post":{"operationId":"createCostBreakdown","summary":"Start the computation of a cost breakdown","description":"Starts the asynchronous computation of the cost of the account over a range, split into periods of the granularity and into series of the groupBy dimension.\n\nThe amount of a period is the cost recognized during that period: the cost that first appears in the billing data during the period, not the cost of the usage of the period.\n\nThe granularity is the finest one used: when the range holds more than 744 periods of this width, the computation uses a coarser one, and the result gives the one used.\n\nRead the progress and the result with GET /v2/finops/costExplorer/breakdown/{breakdownId}.\n\nReturns 400 when:\n\n- from is not before to;\n- two filters name the same dimension;\n- groupBy or a filter names a dimension that GET /v2/finops/costExplorer/dimension does not list.\n\nReturns 400 with the class `Client::BadRequest::FeatureUnavailable` when the account is not enrolled in the Cost Explorer.\n\nReturns 400 with the class `Client::BadRequest::DataUnavailable` when the Cost Explorer has no data of the account before the end of the range.","security":[{"oAuth2AuthCode":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.BreakdownCreation"},"examples":{"Daily cost by category":{"value":{"currency":"EUR","filters":[{"dimension":"CATEGORY","values":["Compute","Storage"]}],"from":"2026-10-01T00:00:00Z","granularity":"DAY","groupBy":"CATEGORY","to":"2026-10-04T00:00:00Z"},"summary":"Daily cost of the Compute and Storage categories over three days, in euros"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.BreakdownTask"},"examples":{"Pending breakdown":{"value":{"createdAt":"2026-10-04T08:00:00Z","errors":[],"id":"0b4d6e3a-2f6b-4c8e-9a1d-5e7f8a9b0c1d","result":null,"status":"PENDING"},"summary":"Computation just started"}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::DataUnavailable":{"value":{"class":"Client::BadRequest::DataUnavailable","message":"No data is available in the requested range"}},"Client::BadRequest::FeatureUnavailable":{"value":{"class":"Client::BadRequest::FeatureUnavailable","message":"Feature is not available"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Cost Center","Cost Explorer@@@10"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: finops.costExplorer.BreakdownCreation\nresult = client.post(\"/v2/finops/costExplorer/breakdown\",\n\tcurrency = None, # Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them. (type: finops.costExplorer.CurrencyEnum, nullable)\n\tfilters = None, # Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line. (type: array, nullable)\n\tfrom = None, # Start of the range, included (type: string)\n\tgranularity = None, # Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width. (type: finops.costExplorer.GranularityEnum)\n\tgroupBy = None, # Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY. (type: string, nullable)\n\tto = None, # End of the range, excluded. It must be after from. (type: string)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: finops.costExplorer.BreakdownCreation\n$result = $ovh->post(\"/v2/finops/costExplorer/breakdown\", array(\n\tcurrency => null, // Currency to keep, for example EUR: only the cost lines billed in this currency are kept. Needed only when the cost lines of the range hold a non-zero cost in more than one currency. Null keeps every currency. The computation then ends in ERROR when more than one currency is present, and the error message lists them. (type: finops.costExplorer.CurrencyEnum, nullable)\n\tfilters => null, // Filters on the cost lines. A cost line is kept when it passes every filter, and a dimension without a filter keeps every value. Null or empty keeps every cost line. (type: array, nullable)\n\tfrom => null, // Start of the range, included (type: string)\n\tgranularity => null, // Finest width of a period. The computation uses a coarser one when the range holds more than 744 periods of this width. (type: finops.costExplorer.GranularityEnum)\n\tgroupBy => null, // Key of the dimension whose values split the cost into series, as GET /v2/finops/costExplorer/dimension lists it. Null groups by CATEGORY. (type: string, nullable)\n\tto => null, // End of the range, excluded. It must be after from. (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:finops/costExplorer/get","required":true}]}},"/finops/costExplorer/breakdown/{breakdownId}":{"get":{"operationId":"getCostBreakdown","summary":"Get a cost breakdown computation and its result","description":"Returns the status of a computation started with POST /v2/finops/costExplorer/breakdown. Poll this route until the status is DONE or ERROR. The result is set when the status is DONE.\n\nReturns 404 when:\n\n- the account has no computation with this identifier;\n- the computation has expired.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"breakdownId","description":"Breakdown ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.BreakdownTask"},"examples":{"Breakdown in error":{"value":{"createdAt":"2026-10-04T08:00:00Z","errors":[{"class":"Client::BadRequest::CurrencyRequired","message":"the data lists more than one currency: EUR, USD"}],"id":"0b4d6e3a-2f6b-4c8e-9a1d-5e7f8a9b0c1d","result":null,"status":"ERROR"},"summary":"Breakdown that needs a currency"},"Done breakdown":{"value":{"createdAt":"2026-10-04T08:00:00Z","errors":[],"id":"0b4d6e3a-2f6b-4c8e-9a1d-5e7f8a9b0c1d","result":{"currency":"EUR","from":"2026-10-01T00:00:00Z","granularity":"DAY","periods":[{"amounts":{"Compute":42.5,"Storage":7.25},"end":"2026-10-02T00:00:00Z","start":"2026-10-01T00:00:00Z"},{"amounts":{"Compute":43.1,"Storage":7.25},"end":"2026-10-03T00:00:00Z","start":"2026-10-02T00:00:00Z"},{"amounts":{"Compute":40.9,"Storage":7.3},"end":"2026-10-04T00:00:00Z","start":"2026-10-03T00:00:00Z"}],"series":["Compute","Storage"],"timezone":"UTC","to":"2026-10-04T00:00:00Z","totals":{"Compute":126.5,"Storage":21.8},"truncated":false},"status":"DONE"},"summary":"Daily cost by category over three days"}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Cost Center","Cost Explorer@@@20"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/finops/costExplorer/breakdown/{breakdownId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/finops/costExplorer/breakdown/{breakdownId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:finops/costExplorer/get","required":true}],"x-response-identifier":"id"}},"/finops/costExplorer/dimension":{"get":{"operationId":"getCostDimensions","summary":"List the dimensions that a cost breakdown can filter on or group by","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/finops.costExplorer.Dimension"}},"examples":{"Dimensions":{"value":[{"key":"CATEGORY","label":"Category"},{"key":"REGION","label":"Region"},{"key":"UNIVERSE","label":"Universe"},{"key":"PRODUCT_CATEGORY","label":"Product category"},{"key":"PRODUCT","label":"Product"},{"key":"PRODUCT_RANGE","label":"Product range"}],"summary":"Every dimension, with its display name"}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Cost Center","Cost Explorer@@@30"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/finops/costExplorer/dimension\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/finops/costExplorer/dimension\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:finops/costExplorer/get","required":true}]}},"/finops/costExplorer/dimensionValue":{"post":{"operationId":"createCostDimensionValues","summary":"Start the listing of the values of every dimension in the cost lines of a range","description":"Starts the asynchronous listing of the distinct values of every dimension that appear in the cost lines of the range. Each value can feed the matching filter of POST /v2/finops/costExplorer/breakdown.\n\nRead the progress and the result with GET /v2/finops/costExplorer/dimensionValue/{dimensionValueId}.\n\nReturns 400 when from is not before to.\n\nReturns 400 with the class `Client::BadRequest::FeatureUnavailable` when the account is not enrolled in the Cost Explorer.\n\nReturns 400 with the class `Client::BadRequest::DataUnavailable` when the Cost Explorer has no data of the account before the end of the range.","security":[{"oAuth2AuthCode":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.DimensionValueCreation"},"examples":{"Values over a month":{"value":{"from":"2026-10-01T00:00:00Z","to":"2026-11-01T00:00:00Z"},"summary":"Values of every dimension over October 2026"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.DimensionValueTask"},"examples":{"Pending listing":{"value":{"createdAt":"2026-11-02T08:00:00Z","errors":[],"id":"6c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f","result":null,"status":"PENDING"},"summary":"Listing just started"}}}}},"400":{"description":"Error 400 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::BadRequest::DataUnavailable":{"value":{"class":"Client::BadRequest::DataUnavailable","message":"No data is available in the requested range"}},"Client::BadRequest::FeatureUnavailable":{"value":{"class":"Client::BadRequest::FeatureUnavailable","message":"Feature is not available"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Cost Center","Cost Explorer@@@40"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: finops.costExplorer.DimensionValueCreation\nresult = client.post(\"/v2/finops/costExplorer/dimensionValue\",\n\tfrom = None, # Start of the range, included (type: string)\n\tto = None, # End of the range, excluded. It must be after from. (type: string)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: finops.costExplorer.DimensionValueCreation\n$result = $ovh->post(\"/v2/finops/costExplorer/dimensionValue\", array(\n\tfrom => null, // Start of the range, included (type: string)\n\tto => null, // End of the range, excluded. It must be after from. (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:finops/costExplorer/get","required":true}]}},"/finops/costExplorer/dimensionValue/{dimensionValueId}":{"get":{"operationId":"getCostDimensionValues","summary":"Get a dimension values listing and its result","description":"Returns the status of a listing started with POST /v2/finops/costExplorer/dimensionValue. Poll this route until the status is DONE or ERROR. The result is set when the status is DONE.\n\nReturns 404 when:\n\n- the account has no listing with this identifier;\n- the listing has expired.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"dimensionValueId","description":"Dimension value ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finops.costExplorer.DimensionValueTask"},"examples":{"Done listing":{"value":{"createdAt":"2026-11-02T08:00:00Z","errors":[],"id":"6c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f","result":[{"dimension":"CATEGORY","values":["Compute","Networking","Storage"]},{"dimension":"REGION","values":["","EU-WEST-GRA","EU-WEST-SBG"]}],"status":"DONE"},"summary":"Values of every dimension over October 2026"}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Cost Center","Cost Explorer@@@50"]],"x-badges":[{"color":"blue","label":"Beta version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/finops/costExplorer/dimensionValue/{dimensionValueId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/v2/finops/costExplorer/dimensionValue/{dimensionValueId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:finops/costExplorer/get","required":true}],"x-response-identifier":"id"}}}}
