{"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.PortMapping":{"type":"object","description":"Port Mappings","properties":{"allowedRemoteIp":{"allOf":[{"$ref":"#/components/schemas/ipv4"}],"description":"An ip which will access to the defined rule. Default : no restriction applied","nullable":true},"description":{"type":"string","description":"Description of the Port Mapping","nullable":true},"externalPortEnd":{"type":"integer","description":"The last port of the interval on the External Client that will get the connections","nullable":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"},"id":{"type":"integer","description":"ID of the port mapping entry","readOnly":true},"internalClient":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)"},"internalPort":{"type":"integer","description":"The port on the Internal Client that will get the connections"},"internalPortEnd":{"type":"integer","description":"The last port of the interval on the Internal Client that will get the connections","nullable":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"},"taskId":{"type":"integer","description":"ID of the ongoing todo (NULL if none)","nullable":true,"readOnly":true}}},"xdsl.ServiceStatusEnum":{"type":"string","description":"Status of the service","enum":["disabled","enabled"]},"xdsl.Task":{"type":"object","description":"Describes the current status of a task","properties":{"doneDate":{"type":"string","description":"Date when the action was completed","nullable":true,"format":"date-time","readOnly":true},"function":{"type":"string","readOnly":true},"id":{"type":"integer","readOnly":true},"isArchived":{"type":"boolean","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/xdsl.TaskStatusEnum"}],"readOnly":true},"todoDate":{"type":"string","description":"Date when the action will start","format":"date-time","readOnly":true},"updateDate":{"type":"string","format":"date-time","readOnly":true}}},"xdsl.TaskStatusEnum":{"type":"string","description":"Status of a task.","enum":["cancelled","doing","done","error","problem","todo"]},"xdsl.modem.ipsecAlg.post":{"type":"object","description":"xdsl.modem.ipsecAlg.post","properties":{"ipsecAlg":{"allOf":[{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}],"description":"Status of the service"}},"required":["ipsecAlg"]},"xdsl.modem.portMappings.post":{"type":"object","description":"xdsl.modem.portMappings.post","properties":{"allowedRemoteIp":{"allOf":[{"$ref":"#/components/schemas/ipv4"}],"description":"IPv4 address (e.g., 192.0.2.0)"},"description":{"type":"string","description":"Description of the Port Mapping"},"externalPortEnd":{"type":"integer","description":"The last port of the interval on the External Client that will get the connections"},"externalPortStart":{"type":"integer","description":"External Port that the modem will listen on"},"internalClient":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP address (e.g., 192.0.2.0)"},"internalPort":{"type":"integer","description":"The port on the Internal Client that will get the connections"},"internalPortEnd":{"type":"integer","description":"The last port of the interval on the Internal Client that will get the connections"},"name":{"type":"string","description":"Name of the port mapping entry"},"protocol":{"allOf":[{"$ref":"#/components/schemas/xdsl.xdslModemConfig.ProtocolTypeEnum"}],"description":"Type of protocol for the Port Mapping"}},"required":["externalPortStart","internalClient","internalPort","name","protocol"]},"xdsl.modem.sipAlg.post":{"type":"object","description":"xdsl.modem.sipAlg.post","properties":{"sipAlg":{"allOf":[{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}],"description":"Status of the service"}},"required":["sipAlg"]},"xdsl.modem.upnp.post":{"type":"object","description":"xdsl.modem.upnp.post","properties":{"upnp":{"allOf":[{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}],"description":"Status of the service"}},"required":["upnp"]},"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/{serviceName}/modem/ipsecAlg":{"get":{"operationId":"getIpsecAlgStatus","summary":"Get the IPsec ALG status of the modem","description":"Returns whether the IPsec ALG service is enabled or disabled on the modem of the access.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@70"]],"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/{serviceName}/modem/ipsecAlg\")\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/{serviceName}/modem/ipsecAlg\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/ipsecAlg/get","required":true}]},"post":{"operationId":"updateIpsecAlgStatus","summary":"Enable or disable IPsec ALG on the modem","description":"Changes the status of the IPsec ALG service on the modem of the access. Returns the task that performs the change.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.modem.ipsecAlg.post"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@80"]],"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.modem.ipsecAlg.post\nresult = client.post(\"/xdsl/{serviceName}/modem/ipsecAlg\",\n\tipsecAlg = None, # Status of the service (type: xdsl.ServiceStatusEnum)\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.modem.ipsecAlg.post\n$result = $ovh->post(\"/xdsl/{serviceName}/modem/ipsecAlg\", array(\n\tipsecAlg => null, // Status of the service (type: xdsl.ServiceStatusEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/ipsecAlg/create","required":true}]}},"/xdsl/{serviceName}/modem/portMappings":{"get":{"operationId":"getPortMappings","summary":"List the port mappings of the modem","description":"Returns the names of the port mapping rules of the modem of the access.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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/{serviceName}/modem/portMappings\")\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/{serviceName}/modem/portMappings\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/portMappings/get","required":true}],"x-expanded-response":"XdslPortMapping"},"post":{"operationId":"addPortMapping","summary":"Create a port mapping on the modem","description":"Adds a rule that forwards an external port range to a port of an internal client, optionally restricted to one remote IP. Returns the created rule.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.modem.portMappings.post"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.PortMapping"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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.modem.portMappings.post\nresult = client.post(\"/xdsl/{serviceName}/modem/portMappings\",\n\tallowedRemoteIp = None, # IPv4 address (e.g., 192.0.2.0) (type: ipv4)\n\tdescription = None, # Description of the Port Mapping (type: string)\n\texternalPortEnd = None, # The last port of the interval on the External Client that will get the connections (type: integer)\n\texternalPortStart = None, # External Port that the modem will listen on (type: integer)\n\tinternalClient = None, # IP address (e.g., 192.0.2.0) (type: ip)\n\tinternalPort = None, # The port on the Internal Client that will get the connections (type: integer)\n\tinternalPortEnd = None, # The last port of the interval on the Internal Client that will get the connections (type: integer)\n\tname = None, # Name of the port mapping entry (type: string)\n\tprotocol = None, # Type of protocol for the Port Mapping (type: xdsl.xdslModemConfig.ProtocolTypeEnum)\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.modem.portMappings.post\n$result = $ovh->post(\"/xdsl/{serviceName}/modem/portMappings\", array(\n\tallowedRemoteIp => null, // IPv4 address (e.g., 192.0.2.0) (type: ipv4)\n\tdescription => null, // Description of the Port Mapping (type: string)\n\texternalPortEnd => null, // The last port of the interval on the External Client that will get the connections (type: integer)\n\texternalPortStart => null, // External Port that the modem will listen on (type: integer)\n\tinternalClient => null, // IP address (e.g., 192.0.2.0) (type: ip)\n\tinternalPort => null, // The port on the Internal Client that will get the connections (type: integer)\n\tinternalPortEnd => null, // The last port of the interval on the Internal Client that will get the connections (type: integer)\n\tname => null, // Name of the port mapping entry (type: string)\n\tprotocol => null, // Type of protocol for the Port Mapping (type: xdsl.xdslModemConfig.ProtocolTypeEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/portMappings/create","required":true}]}},"/xdsl/{serviceName}/modem/portMappings/{name}":{"delete":{"operationId":"removePortMapping","summary":"Delete a port mapping of the modem","description":"Removes the port mapping rule from the modem. Returns the task that performs the change.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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/{serviceName}/modem/portMappings/{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/{serviceName}/modem/portMappings/{name}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/portMappings/delete","required":true}]},"get":{"operationId":"getPortMapping","summary":"Get a port mapping of the modem","description":"Returns a port mapping rule: its protocol, external and internal ports, internal client, allowed remote IP and description.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.PortMapping"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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\nresult = client.get(\"/xdsl/{serviceName}/modem/portMappings/{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/{serviceName}/modem/portMappings/{name}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/portMappings/get","required":true}]},"put":{"operationId":"updatePortMapping","summary":"Update a port mapping of the modem","description":"Changes the protocol, ports, internal client, allowed remote IP or description of a port mapping rule.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.PortMapping"}}}},"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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\n# Request body type: xdsl.PortMapping\nresult = client.put(\"/xdsl/{serviceName}/modem/portMappings/{name}\",\n\tallowedRemoteIp = None, # An ip which will access to the defined rule. Default : no restriction applied (type: ipv4, nullable)\n\tdescription = None, # Description of the Port Mapping (type: string, nullable)\n\texternalPortEnd = None, # The last port of the interval on the External Client that will get the connections (type: integer, nullable)\n\texternalPortStart = None, # 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 (type: integer)\n\tinternalClient = None, # IP address (e.g., 192.0.2.0) (type: ip)\n\tinternalPort = None, # The port on the Internal Client that will get the connections (type: integer)\n\tinternalPortEnd = None, # The last port of the interval on the Internal Client that will get the connections (type: integer, nullable)\n\tprotocol = None, # Type of protocol for the Port Mapping (type: xdsl.xdslModemConfig.ProtocolTypeEnum)\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.PortMapping\n$result = $ovh->put(\"/xdsl/{serviceName}/modem/portMappings/{name}\", array(\n\tallowedRemoteIp => null, // An ip which will access to the defined rule. Default : no restriction applied (type: ipv4, nullable)\n\tdescription => null, // Description of the Port Mapping (type: string, nullable)\n\texternalPortEnd => null, // The last port of the interval on the External Client that will get the connections (type: integer, nullable)\n\texternalPortStart => null, // 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 (type: integer)\n\tinternalClient => null, // IP address (e.g., 192.0.2.0) (type: ip)\n\tinternalPort => null, // The port on the Internal Client that will get the connections (type: integer)\n\tinternalPortEnd => null, // The last port of the interval on the Internal Client that will get the connections (type: integer, nullable)\n\tprotocol => null, // Type of protocol for the Port Mapping (type: xdsl.xdslModemConfig.ProtocolTypeEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/portMappings/edit","required":true}]}},"/xdsl/{serviceName}/modem/resetPortMappingConfig":{"post":{"summary":"Delete all the port mappings of the modem","description":"Removes every port mapping rule of the modem of the access.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@60"]],"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(\"/xdsl/{serviceName}/modem/resetPortMappingConfig\")\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(\"/xdsl/{serviceName}/modem/resetPortMappingConfig\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/resetPortMappingConfig","required":true}]}},"/xdsl/{serviceName}/modem/sipAlg":{"get":{"operationId":"getSipAlgStatus","summary":"Get the SIP ALG status of the modem","description":"Returns whether the SIP ALG service is enabled or disabled on the modem of the access.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@90"]],"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/{serviceName}/modem/sipAlg\")\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/{serviceName}/modem/sipAlg\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/sipAlg/get","required":true}]},"post":{"operationId":"updateSipAlgStatus","summary":"Enable or disable SIP ALG on the modem","description":"Changes the status of the SIP ALG service on the modem of the access. Returns the task that performs the change.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.modem.sipAlg.post"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@100"]],"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.modem.sipAlg.post\nresult = client.post(\"/xdsl/{serviceName}/modem/sipAlg\",\n\tsipAlg = None, # Status of the service (type: xdsl.ServiceStatusEnum)\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.modem.sipAlg.post\n$result = $ovh->post(\"/xdsl/{serviceName}/modem/sipAlg\", array(\n\tsipAlg => null, // Status of the service (type: xdsl.ServiceStatusEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/sipAlg/create","required":true}]}},"/xdsl/{serviceName}/modem/upnp":{"get":{"operationId":"getUpnpStatus","summary":"Get the UPnP status of the modem","description":"Returns whether UPnP is enabled or disabled on the modem of the access.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.ServiceStatusEnum"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@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(\"/xdsl/{serviceName}/modem/upnp\")\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/{serviceName}/modem/upnp\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/upnp/get","required":true}]},"post":{"operationId":"updateUpnpStatus","summary":"Enable or disable UPnP on the modem","description":"Changes the status of UPnP on the modem of the access. Returns the task that performs the change.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.modem.upnp.post"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Modem","Firewall@@@120"]],"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.modem.upnp.post\nresult = client.post(\"/xdsl/{serviceName}/modem/upnp\",\n\tupnp = None, # Status of the service (type: xdsl.ServiceStatusEnum)\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.modem.upnp.post\n$result = $ovh->post(\"/xdsl/{serviceName}/modem/upnp\", array(\n\tupnp => null, // Status of the service (type: xdsl.ServiceStatusEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:modem/upnp/create","required":true}]}}}}
