{"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/1.0"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"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"},"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"},"nichandle.CountryEnum":{"type":"string","description":"Countries a nichandle can choose","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DG","DJ","DK","DM","DO","DZ","EA","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TA","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","UNKNOWN","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"]},"nichandle.OvhSubsidiaryEnum":{"type":"string","description":"OVH subsidiaries","enum":["CZ","DE","ES","EU","FI","FR","GB","IE","IT","LT","MA","NL","PL","PT","SN","TN"]},"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"},"vps.order.rule.AggregatedDatacenters":{"type":"object","description":"Datacenters rules of every VPS model","properties":{"models":{"type":"array","description":"Datacenters rules of every requested VPS model","items":{"$ref":"#/components/schemas/vps.order.rule.ModelDatacenters"},"readOnly":true}}},"vps.order.rule.Datacenter":{"type":"object","description":"Datacenter rules","properties":{"code":{"type":"string","readOnly":true},"datacenter":{"type":"string","readOnly":true},"daysBeforeDelivery":{"type":"integer","readOnly":true},"linuxStatus":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"readOnly":true},"windowsStatus":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"readOnly":true}}},"vps.order.rule.DatacenterStatusEnum":{"type":"string","description":"Possible values for datacenter status","enum":["available","out-of-stock","out-of-stock-preorder-allowed"]},"vps.order.rule.Datacenters":{"type":"object","description":"Datacenters rules","properties":{"datacenters":{"type":"array","items":{"$ref":"#/components/schemas/vps.order.rule.Datacenter"},"readOnly":true}}},"vps.order.rule.ModelDatacenter":{"type":"object","description":"Datacenter rules of one VPS model, for one way of delivering it","properties":{"code":{"type":"string","description":"Datacenter code to give to order api","readOnly":true},"datacenter":{"type":"string","description":"Name of the datacenter","readOnly":true},"daysBeforeDelivery":{"type":"integer","description":"Number of days before delivery, for a preorder","readOnly":true},"linuxStatus":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"description":"Stock status of the datacenter for a Linux delivery","readOnly":true},"remoteStorage":{"type":"boolean","description":"Whether these rules apply to the model delivered with remote storage","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"description":"Stock status of the datacenter for any distribution","readOnly":true},"windowsStatus":{"allOf":[{"$ref":"#/components/schemas/vps.order.rule.DatacenterStatusEnum"}],"description":"Stock status of the datacenter for a Windows delivery","readOnly":true}}},"vps.order.rule.ModelDatacenters":{"type":"object","description":"Datacenters rules of one VPS model","properties":{"datacenters":{"type":"array","description":"Datacenters rules of the model, one entry per datacenter and way of delivering it","items":{"$ref":"#/components/schemas/vps.order.rule.ModelDatacenter"},"readOnly":true},"planCode":{"type":"string","description":"VPS plan code from order api these rules apply to","readOnly":true}}}},"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":{"/vps/datacenter":{"get":{"operationId":"listVpsDatacentersByCountry","summary":"List all VPS datacenters available for the given country","parameters":[{"in":"query","name":"country","description":"Country targeted","schema":{"$ref":"#/components/schemas/nichandle.CountryEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Bare Metal Cloud","VPS","Catalog@@@10"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/vps/datacenter\")\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(\"/vps/datacenter\");\n\nprint_r($result);\n?>"}]}},"/vps/order/rule/datacenter":{"get":{"operationId":"listVpsOrderDatacentersRule","summary":"List datacenters with priority and stock status for a VPS order","description":"Returns the datacenters available for a VPS order, with their priority and stock status.","parameters":[{"in":"query","name":"os","description":"VPS OS selection in order api","schema":{"type":"string"}},{"in":"query","name":"ovhSubsidiary","description":"Subsidiary to sort datacenters","required":true,"schema":{"$ref":"#/components/schemas/nichandle.OvhSubsidiaryEnum"}},{"in":"query","name":"planCode","description":"VPS plan code from order api","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vps.order.rule.Datacenters"}}}}},"x-developer-hub-navigation":[["Bare Metal Cloud","VPS","Catalog@@@20"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/vps/order/rule/datacenter\")\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(\"/vps/order/rule/datacenter\");\n\nprint_r($result);\n?>"}]}},"/vps/order/rule/datacenter/aggregated":{"get":{"operationId":"listVpsOrderAggregatedDatacentersRule","summary":"List datacenters with priority and stock status for every VPS model and storage option","description":"Returns, for every VPS model, the datacenters available for an order with their priority and stock status.","parameters":[{"in":"query","name":"ovhSubsidiary","description":"Subsidiary to sort datacenters","required":true,"schema":{"$ref":"#/components/schemas/nichandle.OvhSubsidiaryEnum"}},{"in":"query","name":"planCodes","description":"Comma separated VPS plan codes from order api to answer for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vps.order.rule.AggregatedDatacenters"}}}}},"x-developer-hub-navigation":[["Bare Metal Cloud","VPS","Catalog@@@30"]],"x-badges":[{"color":"green","label":"Stable production 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(\"/vps/order/rule/datacenter/aggregated\")\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(\"/vps/order/rule/datacenter/aggregated\");\n\nprint_r($result);\n?>"}]}}}}
