{"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"},"order.CurrencyCodeEnum":{"type":"string","enum":["AUD","CAD","CZK","EUR","GBP","INR","LTL","MAD","N/A","PLN","SGD","TND","USD","XOF","points"]},"order.Price":{"type":"object","description":"Price with it's currency and textual representation","properties":{"currencyCode":{"$ref":"#/components/schemas/order.CurrencyCodeEnum"},"text":{"type":"string"},"value":{"type":"number"}}},"pack.xdsl.ResiliationFollowUpDetail":{"type":"object","description":"Details about the resiliation","properties":{"dateTodo":{"type":"string","description":"Date when the resiliation will take effect","format":"date-time"},"needModemReturn":{"type":"boolean","description":"If the customer needs to return his modem"},"registrationDate":{"type":"string","description":"Date when the resiliation was asked","format":"date-time"},"status":{"type":"string","description":"Status of the resiliation"}}},"pack.xdsl.ResiliationReasonEnum":{"type":"string","description":"Reason of a resiliation","enum":["addressMove","billingProblems","cessationOfActivity","changeOfTerms","changeOperator","eligibilityFtth","ftth","goToCompetitor","other","price","technicalProblems"]},"pack.xdsl.ResiliationSurvey":{"type":"object","description":"Information about the reason for the resiliation","properties":{"comment":{"type":"string","description":"Comment about this resiliation","nullable":true},"subsidiary":{"type":"string","description":"Subsidiary response about this resiliation","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/pack.xdsl.ResiliationReasonEnum"}],"description":"Type of reason for the resiliation"}}},"pack.xdsl.ResiliationTerms":{"type":"object","description":"Show the resiliation terms","properties":{"due":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Price due at resiliationDate"},"engageDate":{"type":"string","description":"Date until which the customer is engaged","nullable":true,"format":"date-time"},"minResiliationDate":{"type":"string","description":"Minimum date at which the pack can be resiliated","format":"date-time"},"resiliationDate":{"type":"string","description":"Date at which the pack will be resiliated","format":"date-time"},"resiliationReasons":{"type":"array","description":"List of available resiliation reasons","items":{"$ref":"#/components/schemas/pack.xdsl.ResiliationReasonEnum"}}}},"pack.xdsl.UnpackTerms":{"type":"object","description":"Terms to unpack services","properties":{"isAllowed":{"type":"boolean","description":"Tells whether or not the service can be unpacked"},"price":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"Price bill on the unpack action"},"renewPeriod":{"type":"number","description":"Renew period in month of the service"},"renewPrice":{"allOf":[{"$ref":"#/components/schemas/order.Price"}],"description":"The price it will cost when it will be renew"}}},"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":{"/pack/xdsl/{packName}/canCancelResiliation":{"get":{"summary":"Get whether a pack resiliation can be canceled","description":"Get whether a pack resiliation can be canceled. Returns whether the ongoing resiliation of the xDSL pack can still be canceled.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"boolean"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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(\"/pack/xdsl/{packName}/canCancelResiliation\")\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(\"/pack/xdsl/{packName}/canCancelResiliation\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:canCancelResiliation/get","required":true}]}},"/pack/xdsl/{packName}/cancelResiliation":{"post":{"summary":"Cancel the resiliation of an xDSL pack","description":"Cancel the resiliation of an xDSL pack. Cancels the ongoing resiliation of the pack. Check first that it can be canceled with canCancelResiliation.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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(\"/pack/xdsl/{packName}/cancelResiliation\")\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(\"/pack/xdsl/{packName}/cancelResiliation\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:cancelResiliation/create","required":true}]}},"/pack/xdsl/{packName}/resiliate":{"post":{"summary":"Resiliate an xDSL pack","description":"Resiliate an xDSL pack. Requests the resiliation of the pack at the given date with a resiliation survey, keeping the listed services. Returns the resiliation follow-up.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resiliationDate":{"type":"string","description":"Effective date of the resiliation","format":"date-time"},"resiliationSurvey":{"description":"Comment about resiliation reasons","$ref":"#/components/schemas/pack.xdsl.ResiliationSurvey"},"servicesToKeep":{"type":"array","description":"Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices)","items":{"type":"number"}}},"required":["resiliationSurvey"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pack.xdsl.ResiliationFollowUpDetail"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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: double[]\nresult = client.post(\"/pack/xdsl/{packName}/resiliate\",\n\tresiliationDate = None, # Effective date of the resiliation (type: datetime, nullable)\n\tresiliationSurvey = None, # Comment about resiliation reasons (type: pack.xdsl.ResiliationSurvey)\n\tservicesToKeep = None, # Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices) (type: double[], nullable)\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: double[]\n$result = $ovh->post(\"/pack/xdsl/{packName}/resiliate\", array(\n\tresiliationDate => null, // Effective date of the resiliation (type: datetime, nullable)\n\tresiliationSurvey => null, // Comment about resiliation reasons (type: pack.xdsl.ResiliationSurvey)\n\tservicesToKeep => null, // Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices) (type: double[], nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:resiliate","required":true}]}},"/pack/xdsl/{packName}/resiliationFollowUp":{"get":{"summary":"Get the resiliation follow-up of an xDSL pack","description":"Get the resiliation follow-up of an xDSL pack. Returns the status of the ongoing resiliation of the pack, its effective date and whether the modem must be returned.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pack.xdsl.ResiliationFollowUpDetail"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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(\"/pack/xdsl/{packName}/resiliationFollowUp\")\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(\"/pack/xdsl/{packName}/resiliationFollowUp\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:resiliationFollowUp/get","required":true}]}},"/pack/xdsl/{packName}/resiliationTerms":{"get":{"summary":"Get the resiliation terms of an xDSL pack","description":"Get the resiliation terms of an xDSL pack. Returns, for a resiliation date, the amount due, the engagement end date, the minimum resiliation date and the resiliation reasons.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}},{"in":"query","name":"resiliationDate","description":"The desired resiliation date","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pack.xdsl.ResiliationTerms"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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(\"/pack/xdsl/{packName}/resiliationTerms\")\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(\"/pack/xdsl/{packName}/resiliationTerms\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:resiliationTerms/get","required":true}]}},"/pack/xdsl/{packName}/subServices/{domain}/keepServiceTerms":{"get":{"summary":"Get the unpack terms of a service of an xDSL pack","description":"Get the unpack terms of a service of an xDSL pack. Returns whether the service can be taken out of the pack, the price billed and its renewal price and period.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"domain","required":true,"schema":{"type":"string"}},{"in":"path","name":"packName","description":"The internal name of your pack","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pack.xdsl.UnpackTerms"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Pack","Lifecycle@@@110"]],"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(\"/pack/xdsl/{packName}/subServices/{domain}/keepServiceTerms\")\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(\"/pack/xdsl/{packName}/subServices/{domain}/keepServiceTerms\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"packXdsl:apiovh:subServices/keepServiceTerms/get","required":true}]}}}}
