{"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 !"},"coreTypes.RegionCodenameEnum":{"type":"string","description":"Region names","enum":["af-central-lz-abj","af-north-lz-rba","ap-south-lz-akl","ap-south-lz-blr","ap-south-lz-icd","ap-south-mum","ap-southeast-sgp","ap-southeast-syd","ca-east-bhs","ca-east-tor","eu-central-lz-buh","eu-central-lz-sof","eu-central-waw","eu-east-lz-prg","eu-north-lz-cph","eu-north-lz-hel","eu-north-lz-osl","eu-north-lz-sto","eu-south-lz-lis","eu-south-lz-mad","eu-south-lz-mil","eu-south-mil","eu-west-eri","eu-west-gra","eu-west-lim","eu-west-lz-ams","eu-west-lz-bru","eu-west-lz-dln","eu-west-lz-lux","eu-west-lz-mnc","eu-west-lz-mrs","eu-west-lz-vie","eu-west-lz-zrh","eu-west-par","eu-west-rbx","eu-west-sbg","me-south-lz-dxb","sa-central-lz-mex","sa-east-lz-sao","sa-west-lz-bue","sa-west-lz-scl","us-central-lz-slc","us-central-lz-stl","us-east-lz-atl","us-east-lz-bos","us-east-lz-chi","us-east-lz-dal","us-east-lz-mia","us-east-lz-nyc","us-east-vin","us-west-hil","us-west-lz-den","us-west-lz-lax","us-west-lz-pao","us-west-lz-phx","us-west-lz-sea"]},"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"},"ip.BringYourOwnIpImportedRange":{"type":"object","description":"Bring your own IP service: technical details about the imported IP range","properties":{"asNumber":{"type":"integer","description":"AS number used to annouce the IP in BGP"},"asRir":{"type":"string","description":"AS number's RIR"},"ip":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"description":"Imported IP range"},"ipRir":{"type":"string","description":"IP's RIR"},"region":{"allOf":[{"$ref":"#/components/schemas/coreTypes.RegionCodenameEnum"}],"description":"IP's region"},"version":{"allOf":[{"$ref":"#/components/schemas/ip.IpVersionEnum"}],"description":"IP's version"}}},"ip.ByoipAggregationPreview":{"type":"object","description":"Preview of an IP aggregation on BYOIP Additional IPs","properties":{"aggregationIp":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"description":"Aggregation Additional IP that will be created"},"childrenIps":{"type":"array","description":"Existing Additional IP(s) that will be aggregated","items":{"$ref":"#/components/schemas/ipBlock"}}}},"ip.ByoipSlicingPreview":{"type":"object","description":"Preview of an IP slicing on BYOIP Additional IPs","properties":{"childrenIps":{"type":"array","description":"Additional IP(s) that will be created","items":{"$ref":"#/components/schemas/ipBlock"}},"slicingSize":{"type":"integer","description":"Slicing size"}}},"ip.IpTask":{"type":"object","description":"IP tasks","properties":{"comment":{"type":"string","description":"Details of this task","nullable":true,"readOnly":true},"destination":{"allOf":[{"$ref":"#/components/schemas/ip.RoutedTo"}],"description":"Destination for moveFloatingIp tasks","nullable":true,"readOnly":true},"doneDate":{"type":"string","description":"Completion date","nullable":true,"format":"date-time","readOnly":true},"function":{"allOf":[{"$ref":"#/components/schemas/ip.TaskFunctionEnum"}],"description":"Function name","readOnly":true},"lastUpdate":{"type":"string","description":"last update","nullable":true,"format":"date-time","readOnly":true},"startDate":{"type":"string","description":"Task Creation date","format":"date-time","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/ip.TaskStatusEnum"}],"description":"Task status","readOnly":true},"taskId":{"type":"integer","description":"the id of the task","readOnly":true}}},"ip.IpVersionEnum":{"type":"integer","description":"Possible values for IP version","enum":[4,6]},"ip.RoutedTo":{"type":"object","description":"Information about routing","properties":{"serviceName":{"type":"string","description":"Service where ip is routed to","nullable":true}}},"ip.TaskFunctionEnum":{"type":"string","description":"different task operation","enum":["arinBlockReassign","changeRipeOrg","checkAndReleaseIp","genericMoveFloatingIp","supernetByoipFailoverPartitioning"]},"ip.TaskStatusEnum":{"type":"string","description":"different task status","enum":["cancelled","customerError","doing","done","init","ovhError","todo"]},"ip.byoipFailoverSubRange":{"type":"object","description":"Imported IP range's sub range","properties":{"description":{"type":"string","description":"Custom description on your ip","nullable":true,"readOnly":true},"ip":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"readOnly":true}}},"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":{"/ip/service/{serviceName}/bringYourOwnIp/importedRange":{"get":{"summary":"Get the imported range","description":"Get the imported range. Returns the imported range, its RIR and region, and the AS number that announces it.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your IP services","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.BringYourOwnIpImportedRange"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@63"]],"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(\"/ip/service/{serviceName}/bringYourOwnIp/importedRange\")\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(\"/ip/service/{serviceName}/bringYourOwnIp/importedRange\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:service/bringYourOwnIp/importedRange/get","required":true}]}},"/ip/service/{serviceName}/bringYourOwnIp/subRange":{"get":{"summary":"List sub-ranges","description":"List sub-ranges. Returns the IPv4 and IPv6 sub-ranges of the imported range, as IP blocks in CIDR notation.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your IP services","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ipBlock"}}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange\")\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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:service/bringYourOwnIp/subRange/get","required":true}],"x-expanded-response":"IpByoipFailoverSubRange"},"post":{"summary":"Create an IPv6 sub-range","description":"Create an IPv6 sub-range. Creates an IPv6 /56 sub-range of the imported range, with an optional description.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your IP services","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Sub range description"},"ip":{"description":"IP sub range to create","$ref":"#/components/schemas/ipBlock"}},"required":["ip"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.byoipFailoverSubRange"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@70"]],"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.post(\"/ip/service/{serviceName}/bringYourOwnIp/subRange\",\n\tdescription = None, # Sub range description (type: string, nullable)\n\tip = None, # IP sub range to create (type: ipBlock)\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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange\", array(\n\tdescription => null, // Sub range description (type: string, nullable)\n\tip => null, // IP sub range to create (type: ipBlock)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:service/bringYourOwnIp/subRange/create","required":true}]}},"/ip/service/{serviceName}/bringYourOwnIp/subRange/{ip}":{"delete":{"summary":"Delete an IPv6 sub-range","description":"Delete an IPv6 sub-range. Deletes the IPv6 sub-range from the imported range. The call returns no content.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"serviceName","description":"The internal name of your IP services","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@100"]],"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.delete(\"/ip/service/{serviceName}/bringYourOwnIp/subRange/{ip}\")\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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange/{ip}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:service/bringYourOwnIp/subRange/delete","required":true}]},"get":{"summary":"Get a sub-range","description":"Get a sub-range. Returns the IPv4 or IPv6 sub-range, as an IP block, and the custom description set when it was created.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}},{"in":"path","name":"serviceName","description":"The internal name of your IP services","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.byoipFailoverSubRange"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@66"]],"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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange/{ip}\")\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(\"/ip/service/{serviceName}/bringYourOwnIp/subRange/{ip}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:service/bringYourOwnIp/subRange/get","required":true}]}},"/ip/{ip}/bringYourOwnIp/aggregate":{"get":{"summary":"List aggregation options","description":"List aggregation options. Returns the larger Additional IPs this one can merge into, with the neighbors each would absorb. Aggregation applies to IPv4 blocks only.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ip.ByoipAggregationPreview"}}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@60"]],"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(\"/ip/{ip}/bringYourOwnIp/aggregate\")\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(\"/ip/{ip}/bringYourOwnIp/aggregate\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:bringYourOwnIp/aggregate/get","required":true}]},"post":{"summary":"Aggregate IPv4 blocks","description":"Aggregate IPv4 blocks. Merges this BYOIP Additional IP and its neighbors into the chosen larger block (async task).","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aggregationIp":{"description":"IP range to create by aggregation of all it's children","$ref":"#/components/schemas/ipBlock"}},"required":["aggregationIp"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.IpTask"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@90"]],"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: ipBlock\nresult = client.post(\"/ip/{ip}/bringYourOwnIp/aggregate\",\n\taggregationIp = None, # IP range to create by aggregation of all it's children (type: ipBlock)\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: ipBlock\n$result = $ovh->post(\"/ip/{ip}/bringYourOwnIp/aggregate\", array(\n\taggregationIp => null, // IP range to create by aggregation of all it's children (type: ipBlock)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:bringYourOwnIp/aggregate/create","required":true}]}},"/ip/{ip}/bringYourOwnIp/slice":{"get":{"summary":"List slicing options","description":"List slicing options. Returns, for each allowed size, the Additional IPs that slicing this one would create. Slicing applies to IPv4 blocks only.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ip.ByoipSlicingPreview"}}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@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(\"/ip/{ip}/bringYourOwnIp/slice\")\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(\"/ip/{ip}/bringYourOwnIp/slice\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:bringYourOwnIp/slice/get","required":true}]},"post":{"summary":"Slice an IPv4 block","description":"Slice an IPv4 block. Splits this BYOIP Additional IP into smaller Additional IPs of the chosen size (async task).","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"ip","required":true,"schema":{"$ref":"#/components/schemas/ipBlock"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slicingSize":{"type":"integer","description":"Size (ip mask) of the IPs to create inside given IP"}},"required":["slicingSize"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ip.IpTask"}}}}},"x-developer-hub-navigation":[["Network","IP addresses","Bring Your Own IP@@@80"]],"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: long\nresult = client.post(\"/ip/{ip}/bringYourOwnIp/slice\",\n\tslicingSize = None, # Size (ip mask) of the IPs to create inside given IP (type: long)\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: long\n$result = $ovh->post(\"/ip/{ip}/bringYourOwnIp/slice\", array(\n\tslicingSize => null, // Size (ip mask) of the IPs to create inside given IP (type: long)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"ip:apiovh:bringYourOwnIp/slice/create","required":true}]}}}}
