{"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.LanguageEnum":{"type":"string","description":"Language and locale, as a language-country code","enum":["cs_CZ","de_DE","en_AS","en_AU","en_CA","en_GB","en_IE","en_IN","en_SG","en_US","en_WW","es_ES","es_SA","fi_FI","fr_CA","fr_FR","fr_MA","fr_SN","fr_TN","it_IT","lt_LT","nl_NL","pl_PL","pt_PT"]},"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"},"location.Location":{"type":"object","description":"Region and its availability zones","properties":{"availabilityZoneDatacenters":{"type":"object","description":"List of datacenters by availability zone","nullable":true,"additionalProperties":{"type":"array","items":{"type":"string"}},"readOnly":true},"availabilityZones":{"type":"array","description":"List of availability zones for the region","nullable":true,"items":{"type":"string"},"readOnly":true},"cardinalPoint":{"type":"string","description":"Localized cardinal direction where the region is located. The value depends on the language query parameter.","readOnly":true},"cityCode":{"type":"string","description":"ISO code of the city","readOnly":true},"cityLatitude":{"type":"number","description":"Geographical latitude of the city","readOnly":true},"cityLongitude":{"type":"number","description":"Geographical longitude of the city","readOnly":true},"cityName":{"type":"string","description":"Full name of the city","readOnly":true},"code":{"type":"string","description":"Region's short code","readOnly":true},"countryCode":{"type":"string","description":"ISO code of the country","readOnly":true},"countryName":{"type":"string","description":"Full name of the country","readOnly":true},"geographyCode":{"type":"string","description":"Short code representing the geographical area","readOnly":true},"geographyName":{"type":"string","description":"Name of the geographical area","readOnly":true},"location":{"type":"string","description":"Location of the region","readOnly":true},"name":{"type":"string","description":"Name of the region","readOnly":true},"openingYear":{"type":"integer","description":"Year the region was opened","readOnly":true},"services":{"type":"array","description":"List of services available in the region","items":{"$ref":"#/components/schemas/location.ServicesEnum"},"readOnly":true},"specificType":{"allOf":[{"$ref":"#/components/schemas/location.SpecificTypeEnum"}],"description":"Specific typology of the region","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/location.StatusEnum"}],"description":"Operational status of the region","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/location.TypeEnum"}],"description":"General typology of the region","readOnly":true}}},"location.ServicesEnum":{"type":"string","description":"Services available in the region","enum":["OCC","PEERING"]},"location.SpecificTypeEnum":{"type":"string","description":"Typology of the region for non-standard types","enum":["BACKUP","LZ","SNC","STANDARD"]},"location.StatusEnum":{"type":"string","description":"Operational status of the region","enum":["NON_OPERATIONAL","OPERATIONAL"]},"location.TypeEnum":{"type":"string","description":"Typology of the region","enum":["LOCAL-ZONE","REGION-1-AZ","REGION-3-AZ"]},"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":{"/location":{"get":{"operationId":"getAllLocations","summary":"List available regions and their availability zones","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"}},{"in":"query","name":"availabilityZone","description":"Filter by availability zone. Returns locations having this availability zone.","schema":{"type":"string"}},{"in":"query","name":"cityCode","description":"Filter by city ISO code","schema":{"type":"string"}},{"in":"query","name":"cityName","description":"Filter by city name","schema":{"type":"string"}},{"in":"query","name":"code","description":"Filter by region code","schema":{"type":"string"}},{"in":"query","name":"countryCode","description":"Filter by country ISO code","schema":{"type":"string"}},{"in":"query","name":"countryName","description":"Filter by country name","schema":{"type":"string"}},{"in":"query","name":"datacenter","description":"Filter by datacenter","schema":{"type":"string"}},{"in":"query","name":"geographyCode","description":"Filter by geography code","schema":{"type":"string"}},{"in":"query","name":"geographyName","description":"Filter by geography name","schema":{"type":"string"}},{"in":"query","name":"ids","description":"Filter by region IDs","schema":{"type":"array","items":{"type":"integer"}}},{"in":"query","name":"language","description":"Locale name for translation","schema":{"$ref":"#/components/schemas/common.LanguageEnum"}},{"in":"query","name":"location","description":"Filter by region location","schema":{"type":"string"}},{"in":"query","name":"name","description":"Filter by region name","schema":{"type":"string"}},{"in":"query","name":"services","description":"Filter by services. Returns locations having at least one of the services in the list.","schema":{"$ref":"#/components/schemas/location.ServicesEnum"}},{"in":"query","name":"specificType","description":"Filter by specific region type","schema":{"$ref":"#/components/schemas/location.SpecificTypeEnum"}},{"in":"query","name":"status","description":"Filter by status","schema":{"$ref":"#/components/schemas/location.StatusEnum"}},{"in":"query","name":"type","description":"Filter by general region type","schema":{"$ref":"#/components/schemas/location.TypeEnum"}},{"in":"query","name":"withNonOperational","description":"also return NON_OPERATIONAL regions that are planned","schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/location.Location"}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Locations"]],"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(\"/v2/location\")\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/location\");\n\nprint_r($result);\n?>"}],"x-response-identifier":"name","x-expanded-response":"LocationLocation"}},"/location/{name}":{"get":{"operationId":"getLocation","summary":"Get available region and its availability zones","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/location.Location"},"examples":{"Get available region and its availability zones example":{"value":{"availabilityZoneDatacenters":{"eu-west-par-a":["par1"],"eu-west-par-b":["par2"],"eu-west-par-c":["par3"]},"availabilityZones":["eu-west-par-a","eu-west-par-b","eu-west-par-c"],"cardinalPoint":"WEST","cityCode":"PAR","cityLatitude":48.85,"cityLongitude":2.35,"cityName":"Paris","code":"par","countryCode":"FR","countryName":"France","geographyCode":"eu","geographyName":"Europe","location":"Europe (France - Paris)","name":"eu-west-par","openingYear":2023,"services":["OCC","PEERING"],"specificType":"BACKUP","status":"OPERATIONAL","type":"REGION-3-AZ"}}}}}}},"x-developer-hub-navigation":[["Manage & Operate","Locations"]],"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(\"/v2/location/{name}\")\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/location/{name}\");\n\nprint_r($result);\n?>"}],"x-response-identifier":"name"}}}}
