{"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 !"},"complexType.UnitAndValues_xdsl.AccessLatency":{"type":"object","description":"complexType.UnitAndValues_xdsl.AccessLatency","properties":{"unit":{"type":"string","readOnly":true},"values":{"type":"array","items":{"$ref":"#/components/schemas/xdsl.AccessLatency"},"readOnly":true}}},"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.AccessDiagnostic":{"type":"object","description":"Diagnostic of the access","properties":{"capabilities":{"allOf":[{"$ref":"#/components/schemas/xdsl.AccessDiagnosticCapabilities"}],"description":"Available tests for this access","readOnly":true},"diagnosticTime":{"type":"string","description":"Datime of the diagnostic","format":"date-time","readOnly":true},"incident":{"type":"boolean","description":"Is there an ongoing genericIncident on the access ?","nullable":true,"readOnly":true},"isActiveOnLns":{"type":"boolean","description":"Is the access active on its primary or secondary LNS","nullable":true,"readOnly":true},"isModemConnected":{"type":"boolean","description":"Is the modem connected ?","nullable":true,"readOnly":true},"lineDetails":{"type":"array","description":"Test details by line","nullable":true,"items":{"$ref":"#/components/schemas/xdsl.LineDiagnostic"},"readOnly":true},"maintenance":{"type":"boolean","description":"Is there an ongoing scheduled maintenance by operator on the access ?","nullable":true,"readOnly":true},"ping":{"type":"boolean","description":"Does the access ping ?","nullable":true,"readOnly":true},"remaining":{"type":"integer","description":"Remaining number of diagnostic for this access","readOnly":true}}},"xdsl.AccessDiagnosticCapabilities":{"type":"object","description":"Describe the capabilities of the access diagnostic","properties":{"incident":{"type":"boolean","readOnly":true},"isActiveOnLns":{"type":"boolean","readOnly":true},"isModemConnected":{"type":"boolean","readOnly":true},"lineTest":{"type":"boolean","readOnly":true},"ping":{"type":"boolean","readOnly":true},"proposedProfileId":{"type":"boolean","readOnly":true},"sync":{"type":"boolean","readOnly":true}}},"xdsl.AccessLatency":{"type":"object","description":"An access latency item","properties":{"loss":{"type":"integer","nullable":true,"readOnly":true},"status":{"type":"integer","nullable":true,"readOnly":true},"timestamp":{"type":"integer","readOnly":true},"value":{"type":"number","nullable":true,"readOnly":true},"verboseStatus":{"type":"string","nullable":true,"readOnly":true}}},"xdsl.AccessStatisticsTypeEnum":{"type":"string","description":"Various types of statisctics available for the access.","enum":["ping","traffic:download","traffic:upload"]},"xdsl.Incident":{"type":"object","description":"Detected incident","properties":{"comment":{"type":"string","readOnly":true},"creationDate":{"type":"string","description":"Estimated start date","format":"date-time","readOnly":true},"departments":{"type":"array","description":"Department list","items":{"type":"string"},"readOnly":true},"endDate":{"type":"string","description":"Estimated end date","nullable":true,"format":"date-time","readOnly":true},"id":{"type":"integer","description":"ID of the incident","readOnly":true},"nra":{"type":"array","description":"NRA list","items":{"type":"string"},"readOnly":true},"operators":{"type":"array","description":"Operator","items":{"$ref":"#/components/schemas/xdsl.OperatorTypeEnum"},"readOnly":true},"taskId":{"type":"integer","description":"Task ID on travaux.ovh.com","nullable":true,"readOnly":true},"taskReference":{"type":"string","nullable":true,"readOnly":true}}},"xdsl.LineDiagnostic":{"type":"object","description":"Detailed line tests","properties":{"lineTest":{"allOf":[{"$ref":"#/components/schemas/xdsl.LineTestEnum"}],"nullable":true,"readOnly":true},"lineTestTime":{"type":"string","nullable":true,"format":"date-time","readOnly":true},"number":{"type":"string","readOnly":true},"proposedProfileId":{"type":"integer","nullable":true,"readOnly":true},"sync":{"type":"boolean","readOnly":true}}},"xdsl.LineTestEnum":{"type":"string","description":"Line tests results","enum":["actionPending","customerSideProblem","error","noProblem","ovhSideProblem"]},"xdsl.OperatorTypeEnum":{"type":"string","description":"Operators","enum":["bouygues","collect","kosc"]},"xdsl.RadiusConnectionLog":{"type":"object","description":"Log entry of an auth attempt to the radius server","properties":{"date":{"type":"string","format":"date-time","readOnly":true},"login":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"state":{"type":"string","readOnly":true}}},"xdsl.StatisticsPeriodEnum":{"type":"string","description":"Periods for statistics.","enum":["daily","monthly","preview","weekly","yearly"]},"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"]}},"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}/diagnostic":{"get":{"summary":"Get the diagnostic of an xDSL access","description":"Returns the last diagnostic of the access: modem connection, ping, LNS activity, ongoing incident or maintenance, line details, available tests and remaining diagnostics.","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.AccessDiagnostic"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Diagnostics@@@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/{serviceName}/diagnostic\")\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}/diagnostic\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:diagnostic/get","required":true}]},"post":{"summary":"Run a diagnostic on an xDSL access","description":"Starts a diagnostic 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"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/xdsl.Task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Diagnostics@@@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.post(\"/xdsl/{serviceName}/diagnostic\")\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}/diagnostic\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:diagnostic/create","required":true}]}},"/xdsl/{serviceName}/incident":{"get":{"summary":"Get the incident of an xDSL access","description":"Returns the generic incident that impacts the access, if any, with its estimated start and end dates, operators, NRA and departments.","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.Incident"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Diagnostics@@@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/{serviceName}/incident\")\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}/incident\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:incident/get","required":true}]}},"/xdsl/{serviceName}/radiusConnectionLogs":{"get":{"summary":"List the RADIUS connection logs of an xDSL access","description":"Returns the RADIUS authentication attempts of the access with their date, login, state and message.","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":{"$ref":"#/components/schemas/xdsl.RadiusConnectionLog"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Diagnostics@@@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/{serviceName}/radiusConnectionLogs\")\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}/radiusConnectionLogs\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:radiusConnectionLogs/get","required":true}]}},"/xdsl/{serviceName}/statistics":{"get":{"summary":"Get the statistics of an xDSL access","description":"Returns the ping or download and upload traffic values of the access over a daily, weekly, monthly or yearly period, with their unit.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"period","required":true,"schema":{"$ref":"#/components/schemas/xdsl.StatisticsPeriodEnum"}},{"in":"path","name":"serviceName","description":"Service name","required":true,"schema":{"type":"string"}},{"in":"query","name":"type","required":true,"schema":{"$ref":"#/components/schemas/xdsl.AccessStatisticsTypeEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/complexType.UnitAndValues_xdsl.AccessLatency"}}}}},"x-developer-hub-navigation":[["Web Cloud","Internet","Access","Diagnostics@@@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/{serviceName}/statistics\")\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}/statistics\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"xdsl:apiovh:statistics/get","required":true}]}}}}
