{"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"},"xdsl.TemplateModem":{"type":"object","description":"Modem Template","properties":{"DHCP":{"type":"array","description":"List of DHCP for this template","items":{"$ref":"#/components/schemas/xdsl.templateModem.DHCP"},"readOnly":true},"LAN":{"type":"array","description":"List of LAN for this template","items":{"$ref":"#/components/schemas/xdsl.templateModem.LAN"},"readOnly":true},"WLAN":{"type":"array","description":"List of WLAN for this template","items":{"$ref":"#/components/schemas/xdsl.templateModem.WLAN"},"readOnly":true},"capabilities":{"type":"string","description":"Parameters capabilities. Lists what can be applied from this template","readOnly":true},"creationDate":{"type":"string","description":"Template creation date","format":"date-time","readOnly":true},"dmzIP":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP Address of the DMZ","nullable":true,"readOnly":true},"mtuSize":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.MTUSizeEnum"}],"description":"Size of the Maximum Transmission Unit on the modem's interfaces","nullable":true,"readOnly":true},"name":{"type":"string","description":"Name of the Modem Template","readOnly":true},"parametersToIgnore":{"allOf":[{"$ref":"#/components/schemas/xdsl.templateModem.ParametersToIgnore"}],"description":"Do not apply these parameters from template. You can use parametersCapabilities to know availability","nullable":true},"portMapping":{"type":"array","description":"List of PortMapping for this template","items":{"$ref":"#/components/schemas/xdsl.templateModem.PortMapping"},"readOnly":true}}},"xdsl.templateModem.DHCP":{"type":"object","description":"DHCP Configuration for Modem Template","properties":{"defaultGateway":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"dhcpName":{"type":"string","description":"Name of the DHCP","readOnly":true},"domainName":{"type":"string","description":"Domain name provided to the clients","readOnly":true},"endAddress":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"leaseTime":{"type":"integer","description":"Lease time in seconds of client assigned address (-1 means infinite)","readOnly":true},"primaryDNS":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"secondaryDNS":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Secondary DNS servers to be given to the clients","nullable":true,"readOnly":true},"serverEnabled":{"type":"boolean","description":"State of the DHCP server of the modem","readOnly":true},"startAddress":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"subnetMask":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true}}},"xdsl.templateModem.LAN":{"type":"object","description":"LAN Configuration for Modem Template","properties":{"IPAddress":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"addressingType":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.AddressingTypeEnum"}],"description":"How the modem gets its LAN IP Address","readOnly":true},"lanName":{"type":"string","description":"Name of the LAN","readOnly":true},"subnetMask":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true}}},"xdsl.templateModem.ParametersToIgnore":{"type":"object","description":"Parameters and values to ignore when apply modem template configuration","properties":{"LANandDHCP":{"type":"boolean","description":"Ignore LAN and DHCP configurations","nullable":true},"WLANList":{"type":"array","description":"WLAN names list to ignore. Ignore only listed WLAN","nullable":true,"items":{"type":"string"}},"dmzIP":{"type":"boolean","description":"Ignore DMZ configuration","nullable":true},"mtuSize":{"type":"boolean","description":"Ignore MTU Size value","nullable":true},"portMappingList":{"type":"array","description":"PortMapping names list to ignore. Ignore only listed portMapping","nullable":true,"items":{"type":"string"}}}},"xdsl.templateModem.PortMapping":{"type":"object","description":"PortMapping Configuration for Modem Template","properties":{"allowedRemoteIp":{"allOf":[{"$ref":"#/components/schemas/ipv4"}],"description":"An ip which will access to the defined rule. Default : no restriction applied","nullable":true,"readOnly":true},"description":{"type":"string","description":"Description of the Port Mapping","nullable":true,"readOnly":true},"externalPortEnd":{"type":"integer","description":"The last port of the interval on the External Client that will get the connections","nullable":true,"readOnly":true},"externalPortStart":{"type":"integer","description":"External Port that the modem will listen on. List of externalPorts not available for now in the API : 8, 21, 68, 5060, 21800-21805, 51005","readOnly":true},"internalClient":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)","readOnly":true},"internalPort":{"type":"integer","description":"The port on the Internal Client that will get the connections","readOnly":true},"name":{"type":"string","description":"Name of the port mapping entry","readOnly":true},"protocol":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.ProtocolTypeEnum"}],"description":"Type of protocol for the Port Mapping","readOnly":true}}},"xdsl.templateModem.SecurityTypeEnum":{"type":"string","description":"Type of WLAN security protection","enum":["None","WPA","WPA2","WPA2andWPA3","WPA3","WPAandWPA2"]},"xdsl.templateModem.WLAN":{"type":"object","description":"WLAN Configuration for Modem Template","properties":{"SSID":{"type":"string","description":"Service Set Identifier of the WLAN interface","readOnly":true},"SSIDAdvertisementEnabled":{"type":"boolean","description":"Control if Wifi is discoverable or hidden","readOnly":true},"bandSteering":{"type":"boolean","description":"Indicate if frequencies 2.4GHz and 5GHz are agregated","readOnly":true},"channel":{"type":"integer","description":"Channel number (Useless if channelMode is set to Auto)","readOnly":true},"channelMode":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.ChannelModeEnum"}],"description":"How the WiFi channel is selected","readOnly":true},"enabled":{"type":"boolean","description":"Wifi state","readOnly":true},"frequency":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.FrequencyEnum"}],"description":"Modem frequency","readOnly":true},"guest":{"type":"boolean","description":"Indicate if it is normal access wifi or guest wifi","readOnly":true},"securityKey":{"type":"string","description":"Encrypted WLAN passphrase","format":"password","readOnly":true},"securityType":{"allOf":[{"$ref":"#/components/schemas/xdsl.templateModem.SecurityTypeEnum"}],"description":"Type of WLAN security protection","readOnly":true},"wifiName":{"type":"string","description":"Wifi Name","readOnly":true}}},"xdsl.templateModem.post":{"type":"object","description":"xdsl.templateModem.post","properties":{"name":{"type":"string","description":"Modem Template name (only alphanumeric characters)"},"serviceName":{"type":"string","description":"The access name with the config you want to duplicate"}},"required":["name","serviceName"]},"xdsl.xdslModemConfig.AddressingTypeEnum":{"type":"string","description":"How the modem gets its LAN IP Address","enum":["DHCP","Static"]},"xdsl.xdslModemConfig.ChannelModeEnum":{"type":"string","description":"How the WiFi channel is selected","enum":["Auto","Manual"]},"xdsl.xdslModemConfig.FrequencyEnum":{"type":"string","description":"Modem frequency","enum":["2.4GHz","5GHz"]},"xdsl.xdslModemConfig.MTUSizeEnum":{"type":"integer","description":"Size of the Maximum Transmission Unit on the modem's interfaces","enum":[1432,1456,1492]},"xdsl.xdslModemConfig.ProtocolTypeEnum":{"type":"string","description":"Type of protocol for the Port Mapping","enum":["TCP","UDP"]}},"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":{"/xdsl/templateModem":{"get":{"operationId":"getModemTemplates","summary":"List modem templates","description":"Returns the names of the modem templates of the account.","security":[{"oAuth2AuthCode":[]}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Templates@@@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(\"/xdsl/templateModem\")\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(\"/xdsl/templateModem\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:xdslTemplateModem/get","required":true}],"x-expanded-response":"XdslTemplateModem"},"post":{"operationId":"createModemTemplate","summary":"Create a modem template","description":"Creates a template from the modem configuration of an access. Returns the created template.","security":[{"oAuth2AuthCode":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.templateModem.post"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.TemplateModem"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Templates@@@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\n# Request body type: xdsl.templateModem.post\nresult = client.post(\"/xdsl/templateModem\",\n\tname = None, # Modem Template name (only alphanumeric characters) (type: string)\n\tserviceName = None, # The access name with the config you want to duplicate (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// Request body type: xdsl.templateModem.post\n$result = $ovh->post(\"/xdsl/templateModem\", array(\n\tname => null, // Modem Template name (only alphanumeric characters) (type: string)\n\tserviceName => null, // The access name with the config you want to duplicate (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:xdslTemplateModem/create","required":true}]}},"/xdsl/templateModem/{name}":{"delete":{"operationId":"deleteModemTemplate","summary":"Delete a modem template","description":"Deletes the modem template and all its settings.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Templates@@@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(\"/xdsl/templateModem/{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->delete(\"/xdsl/templateModem/{name}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:xdslTemplateModem/delete","required":true}]},"get":{"operationId":"getModemTemplate","summary":"Get a modem template","description":"Returns the LAN, DHCP, WLAN, port mapping, DMZ and MTU settings of a modem template, and the parameters to ignore when it is applied.","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/xdsl.TemplateModem"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Templates@@@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(\"/xdsl/templateModem/{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(\"/xdsl/templateModem/{name}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:xdslTemplateModem/get","required":true}]},"put":{"operationId":"updateModemTemplate","summary":"Update a modem template","description":"Changes the parameters to ignore when the template is applied to a modem.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.TemplateModem"}}}},"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Templates@@@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: xdsl.TemplateModem\nresult = client.put(\"/xdsl/templateModem/{name}\",\n\tparametersToIgnore = None, # Do not apply these parameters from template. You can use parametersCapabilities to know availability (type: xdsl.templateModem.ParametersToIgnore, 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: xdsl.TemplateModem\n$result = $ovh->put(\"/xdsl/templateModem/{name}\", array(\n\tparametersToIgnore => null, // Do not apply these parameters from template. You can use parametersCapabilities to know availability (type: xdsl.templateModem.ParametersToIgnore, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:xdslTemplateModem/edit","required":true}]}}}}
