{"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"},"iam.ResourceMetadata":{"type":"object","description":"IAM resource metadata embedded in services models","properties":{"displayName":{"type":"string","description":"Resource display name","nullable":true,"readOnly":true},"id":{"type":"string","description":"Unique identifier of the resource","format":"uuid","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata.StateEnum"}],"description":"Resource state","nullable":true,"readOnly":true},"tags":{"type":"object","description":"Resource tags. Tags that were internally computed are prefixed with ovh:","nullable":true,"additionalProperties":{"type":"string"},"readOnly":true},"urn":{"type":"string","description":"Unique resource name used in policies","readOnly":true}}},"iam.ResourceMetadata.StateEnum":{"type":"string","description":"Resource state","enum":["EXPIRED","IN_CREATION","OK","SUSPENDED"]},"iam.resource.TagFilter":{"type":"object","description":"Resource tag filter","properties":{"operator":{"allOf":[{"$ref":"#/components/schemas/iam.resource.TagFilter.OperatorEnum"}],"description":"Operator to use in order to filter on the value (defaults to 'EQ')","nullable":true,"readOnly":true},"value":{"type":"string","description":"Value to use in order to filter tags","readOnly":true}}},"iam.resource.TagFilter.OperatorEnum":{"type":"string","description":"Operator that can be used in order to filter resources tags","enum":["EQ","EXISTS","ILIKE","LIKE","NEQ","NEXISTS"]},"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.Access":{"type":"object","description":"XDSL Access","properties":{"accessName":{"type":"string","readOnly":true},"accessType":{"allOf":[{"$ref":"#/components/schemas/xdsl.DslTypeEnum"}],"readOnly":true},"address":{"allOf":[{"$ref":"#/components/schemas/xdsl.AddressDetail"}],"readOnly":true},"capabilities":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessCapabilities"}],"readOnly":true},"description":{"type":"string"},"ipv6Enabled":{"type":"boolean","readOnly":true},"lnsRateLimit":{"type":"integer","description":"Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032","nullable":true},"mailSending":{"allOf":[{"$ref":"#/components/schemas/xdsl.mailSendingAccessStatusEnum"}],"description":"Status of mail sending on the Access","nullable":true,"readOnly":true},"modemProfile":{"allOf":[{"$ref":"#/components/schemas/xdsl.modemConnectionProfileEnum"}],"description":"Get modem profile connection linked to the access","readOnly":true},"monitoring":{"type":"boolean","description":"Whether or not this access is monitored"},"mttr":{"allOf":[{"$ref":"#/components/schemas/xdsl.GtrEnum"}],"description":"Get the Mean Time To Repair (MTTR) of the access","nullable":true,"readOnly":true},"nra":{"type":"string","readOnly":true},"packName":{"type":"string","description":"Pack name, if access is in a pack","nullable":true,"readOnly":true},"pairsNumber":{"type":"integer","readOnly":true},"provider":{"allOf":[{"$ref":"#/components/schemas/xdsl.ProviderEnum"}],"description":"The provider","readOnly":true},"providerInfra":{"type":"string","description":"The provider of the infrastructure, if applicable","nullable":true,"readOnly":true},"role":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessRoleEnum"}],"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessStatusEnum"}],"readOnly":true}}},"xdsl.AccessCapabilities":{"type":"object","description":"Describe the capabilities of the Access","properties":{"canApplyLnsRateLimit":{"type":"boolean","readOnly":true},"canChangeDslamProfile":{"type":"boolean","readOnly":true},"canChangeLns":{"type":"boolean","readOnly":true},"canGetRadiusConnectionLogs":{"type":"boolean","readOnly":true},"canResetDslamPort":{"type":"boolean","readOnly":true},"hasDslamPort":{"type":"boolean","readOnly":true}}},"xdsl.AccessRoleEnum":{"type":"string","description":"Available access roles","enum":["backup","main"]},"xdsl.AccessStatusEnum":{"type":"string","description":"Status of the access","enum":["active","cancelled","close","deleting","doing","migration","slamming","terminated","upgradeOffer"]},"xdsl.AccessWithIAM":{"type":"object","description":"XDSL Access","properties":{"accessName":{"type":"string","readOnly":true},"accessType":{"allOf":[{"$ref":"#/components/schemas/xdsl.DslTypeEnum"}],"readOnly":true},"address":{"allOf":[{"$ref":"#/components/schemas/xdsl.AddressDetail"}],"readOnly":true},"capabilities":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessCapabilities"}],"readOnly":true},"description":{"type":"string"},"iam":{"allOf":[{"$ref":"#/components/schemas/iam.ResourceMetadata"}],"description":"IAM resource metadata","nullable":true,"readOnly":true},"ipv6Enabled":{"type":"boolean","readOnly":true},"lnsRateLimit":{"type":"integer","description":"Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032","nullable":true},"mailSending":{"allOf":[{"$ref":"#/components/schemas/xdsl.mailSendingAccessStatusEnum"}],"description":"Status of mail sending on the Access","nullable":true,"readOnly":true},"modemProfile":{"allOf":[{"$ref":"#/components/schemas/xdsl.modemConnectionProfileEnum"}],"description":"Get modem profile connection linked to the access","readOnly":true},"monitoring":{"type":"boolean","description":"Whether or not this access is monitored"},"mttr":{"allOf":[{"$ref":"#/components/schemas/xdsl.GtrEnum"}],"description":"Get the Mean Time To Repair (MTTR) of the access","nullable":true,"readOnly":true},"nra":{"type":"string","readOnly":true},"packName":{"type":"string","description":"Pack name, if access is in a pack","nullable":true,"readOnly":true},"pairsNumber":{"type":"integer","readOnly":true},"provider":{"allOf":[{"$ref":"#/components/schemas/xdsl.ProviderEnum"}],"description":"The provider","readOnly":true},"providerInfra":{"type":"string","description":"The provider of the infrastructure, if applicable","nullable":true,"readOnly":true},"role":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessRoleEnum"}],"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessStatusEnum"}],"readOnly":true}}},"xdsl.AddressDetail":{"type":"object","description":"All components of an address","properties":{"building":{"type":"string","nullable":true,"readOnly":true},"city":{"type":"string","readOnly":true},"door":{"type":"string","nullable":true,"readOnly":true},"firstName":{"type":"string","readOnly":true},"floor":{"type":"string","nullable":true,"readOnly":true},"inseeCode":{"type":"string","description":"Identifier of the city","readOnly":true},"lastName":{"type":"string","readOnly":true},"numberStreet":{"type":"string","readOnly":true},"residence":{"type":"string","nullable":true,"readOnly":true},"rivoliCode":{"type":"string","description":"Identifier of the street","readOnly":true},"stairs":{"type":"string","nullable":true,"readOnly":true},"street":{"type":"string","readOnly":true},"zipCode":{"type":"string","readOnly":true}}},"xdsl.DslTypeEnum":{"type":"string","description":"Possible copper or fiber technologies","enum":["adsl","ftte","ftth","ftto","sdsl","vdsl"]},"xdsl.GtrEnum":{"type":"string","description":"GRT option for an access.","enum":["10ho","20m_10ho","20m_4ho","4hno","4ho","5m_10ho","5m_4ho","dplus1","none"]},"xdsl.ProviderEnum":{"type":"string","description":"The providers","enum":["axione","bouygues","ft","ftBySfr","kosc","koscDeg","ovh","sfr"]},"xdsl.mailSendingAccessStatusEnum":{"type":"string","description":"Status allowed for mail sending","enum":["blockedForSpam","disabled","enabled"]},"xdsl.modemConnectionProfileEnum":{"type":"string","description":"Profile allowed for modem connection","enum":["A","B","C","D"]}},"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":{"get":{"summary":"List xDSL accesses","description":"Returns the names of the xDSL accesses of the account. Each name is the serviceName used by the other xDSL calls.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"iamTags","description":"Filter resources on IAM tags","schema":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/iam.resource.TagFilter"}}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access"]],"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\")\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\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:get","required":true}],"x-expanded-response":"XdslAccessWithIAM"}},"/xdsl/{serviceName}":{"get":{"summary":"Get an xDSL access","description":"Returns the access type, address, status, provider, NRA, pack name, IPv6 and mail sending status, monitoring, LNS rate limit, mean time to repair and capabilities.","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.AccessWithIAM"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access"]],"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}\")\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}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:get","required":true}]},"put":{"summary":"Update an xDSL access","description":"Changes the settings that can be modified: the customer description, the monitoring and the LNS rate limit.","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.Access"}}}},"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access"]],"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.Access\nresult = client.put(\"/xdsl/{serviceName}\",\n\tdescription = None, #  (type: string)\n\tlnsRateLimit = None, # Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 (type: integer, nullable)\n\tmonitoring = None, # Whether or not this access is monitored (type: boolean)\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.Access\n$result = $ovh->put(\"/xdsl/{serviceName}\", array(\n\tdescription => null, //  (type: string)\n\tlnsRateLimit => null, // Rate limit on the LNS in kbps - Only available if canApplyLnsRateLimit capability is set to true - Must be a multiple of 64 - Min value 64 / Max value 100032 (type: integer, nullable)\n\tmonitoring => null, // Whether or not this access is monitored (type: boolean)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:put","required":true}]}}}}
