{"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"},"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"},"vrack.PublicRoutingDefinition":{"type":"object","description":"A structure defining the priority for EVERY region's availability zones","properties":{"name":{"type":"string","description":"Availability zone name"},"priority":{"type":"integer","description":"Unique priority value [1..3]"}}},"vrack.PublicRoutingPriorityTypeEnum":{"type":"string","description":"Possible values for public routing priority type","enum":["custom","default"]},"vrack.Task":{"type":"object","description":"vrack tasks","properties":{"function":{"type":"string","readOnly":true},"id":{"type":"integer","readOnly":true},"lastUpdate":{"type":"string","nullable":true,"format":"date-time","readOnly":true},"orderId":{"type":"integer","nullable":true,"readOnly":true},"serviceName":{"type":"string","nullable":true,"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/vrack.TaskStatusEnum"}],"description":"Task status","readOnly":true},"targetDomain":{"type":"string","nullable":true,"readOnly":true},"todoDate":{"type":"string","nullable":true,"format":"date-time","readOnly":true}}},"vrack.TaskStatusEnum":{"type":"string","description":"All states a vRack Task can be in","enum":["cancelled","doing","done","init","todo"]},"vrack.publicRoutingPriority":{"type":"object","description":"Public routing priority","properties":{"availabilityZones":{"type":"array","description":"Priority definition per availability zone","items":{"$ref":"#/components/schemas/vrack.PublicRoutingDefinition"}},"priorityId":{"type":"string","description":"Public routing priority identifier","format":"uuid","readOnly":true},"region":{"type":"string","description":"Name of the region where public routing priority is defined","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/vrack.PublicRoutingPriorityTypeEnum"}],"description":"Public routing priority type","readOnly":true},"vrack":{"type":"string","description":"vrack name","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":{"/vrack/{serviceName}/publicRoutingPriority":{"get":{"summary":"List priorities. Returns the identifiers of the 3-AZ failover priorities of the vRack.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your vrack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}}},"x-developer-hub-navigation":[["Network","vRack","Public IP connectivity","Failover priorities@@@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(\"/vrack/{serviceName}/publicRoutingPriority\")\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(\"/vrack/{serviceName}/publicRoutingPriority\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"vrack:apiovh:publicRoutingPriority/get","required":true}],"x-expanded-response":"VrackPublicRoutingPriority"},"post":{"summary":"Create a priority","description":"Create a priority.\n\nThis endpoint will create a new 'custom' routing priority.\n\nYou can create a new 'custom' routing priority if you have an additional IP block in your vRack in the same region or not.\n\nYou do not have to create a 'custom' routing priority for RTvRack 3AZ to work. If you add an additional IP block in a 3AZ region without any routing priority and any additional IP block, a 'default' routing priority will automatically be chosen for you.\n\nPriorities must be set to `1`, `2` or `3` for each availability zone.\n\n`1` stands for the availability zone with highest priority, which will handle traffic by default.\n\n`2` is the availability zone with second-highest priority, which will handle traffic as soon as priority `1` availability zone is not available.\n\n`3` is the availability zone with lowest priority, it will handle traffic if neither the availability zone with priority `1` nor the availability zone with priority `2` are available.\n\nAll availability zones in a 3AZ region must be set in the payload in order for the 'custom' routing priority to be created.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your vrack","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"availabilityZones":{"type":"array","description":"Priority definition, every region's availability zones MUST be listed","items":{"$ref":"#/components/schemas/vrack.PublicRoutingDefinition"}},"region":{"type":"string","description":"Name of the region where Public routing priority is defined"}},"required":["availabilityZones","region"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vrack.Task"}}}}},"x-developer-hub-navigation":[["Network","vRack","Public IP connectivity","Failover priorities@@@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.post(\"/vrack/{serviceName}/publicRoutingPriority\",\n\tavailabilityZones = None, # Priority definition, every region's availability zones MUST be listed (type: vrack.PublicRoutingDefinition[])\n\tregion = None, # Name of the region where Public routing priority is defined (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$result = $ovh->post(\"/vrack/{serviceName}/publicRoutingPriority\", array(\n\tavailabilityZones => null, // Priority definition, every region's availability zones MUST be listed (type: vrack.PublicRoutingDefinition[])\n\tregion => null, // Name of the region where Public routing priority is defined (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"vrack:apiovh:publicRoutingPriority/create","required":true}]}},"/vrack/{serviceName}/publicRoutingPriority/{priorityId}":{"delete":{"summary":"Delete a priority","description":"Delete a priority. Deletes a custom failover priority. If Additional IP blocks remain in the region, a default priority is generated from the infrastructure usage.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"priorityId","description":"Public routing priority identifier","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"The internal name of your vrack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vrack.Task"}}}}},"x-developer-hub-navigation":[["Network","vRack","Public IP connectivity","Failover priorities@@@50"]],"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.delete(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\")\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->delete(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"vrack:apiovh:publicRoutingPriority/delete","required":true}]},"get":{"summary":"Get a priority","description":"Get a priority. Returns the region, the type, default or custom, and the priority of each availability zone.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"priorityId","description":"Public routing priority identifier","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"The internal name of your vrack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vrack.publicRoutingPriority"}}}}},"x-developer-hub-navigation":[["Network","vRack","Public IP connectivity","Failover priorities@@@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(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\")\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(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"vrack:apiovh:publicRoutingPriority/get","required":true}]},"put":{"summary":"Update a priority","description":"Update a priority. Updates the priority of each availability zone of a custom failover priority. A default one cannot be updated: create a custom one first.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"priorityId","description":"Public routing priority identifier","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"serviceName","description":"The internal name of your vrack","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vrack.publicRoutingPriority"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vrack.Task"}}}}},"x-developer-hub-navigation":[["Network","vRack","Public IP connectivity","Failover priorities@@@40"]],"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\n# Request body type: vrack.publicRoutingPriority\nresult = client.put(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\",\n\tavailabilityZones = None, # Priority definition per availability zone (type: array)\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: vrack.publicRoutingPriority\n$result = $ovh->put(\"/vrack/{serviceName}/publicRoutingPriority/{priorityId}\", array(\n\tavailabilityZones => null, // Priority definition per availability zone (type: array)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"vrack:apiovh:publicRoutingPriority/update","required":true}]}}}}
