{"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"},"overTheBox.Device":{"type":"object","description":"Device","properties":{"activated":{"type":"boolean","description":"Whether or not this device is associated to a service","readOnly":true},"availableUpdate":{"type":"boolean","description":"Whether or not an upate is available for this device","readOnly":true},"deviceId":{"type":"string","description":"The id of the device","readOnly":true},"lastSeen":{"type":"string","description":"Last time the device has been seen on the provisionning servers","format":"date-time","readOnly":true},"networkInterfaces":{"type":"array","description":"Network interfaces of the device","items":{"$ref":"#/components/schemas/overTheBox.DeviceInterface"},"readOnly":true},"publicIp":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"The public IP of the device","readOnly":true},"system":{"allOf":[{"$ref":"#/components/schemas/overTheBox.DeviceSystem"}],"description":"Device system information","nullable":true,"readOnly":true},"systemVersion":{"type":"string","description":"System version of the device","readOnly":true},"version":{"type":"string","description":"Version of the device","readOnly":true}}},"overTheBox.DeviceForRegistration":{"type":"object","description":"A device for registration","properties":{"activated":{"type":"boolean","description":"Whether or not this device is actived"},"deviceId":{"type":"string"},"lastSeen":{"type":"string","description":"The last time this device was seen on the provisionning servers","format":"date-time"}}},"overTheBox.DeviceInterface":{"type":"object","description":"Infos about a network interface","properties":{"device":{"type":"string","description":"Device of the interface","nullable":true},"dnsServers":{"type":"array","description":"The DNS servers of this interface","nullable":true,"items":{"$ref":"#/components/schemas/ip"}},"gateway":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Gateway of the interface","nullable":true},"ip":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP of the interface","nullable":true},"multipathStatus":{"allOf":[{"$ref":"#/components/schemas/overTheBox.MultipathStatusEnum"}],"description":"Status of MPTCP on this interface"},"name":{"type":"string","description":"Name of the interface"},"netmask":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Netmask of the interface","nullable":true},"publicIp":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"Public IP of the interface","nullable":true}}},"overTheBox.DeviceSystem":{"type":"object","description":"Infos about a device system","properties":{"cpu":{"type":"string","description":"Device CPU","nullable":true},"hostname":{"type":"string","description":"Device hostname","nullable":true},"kernel":{"type":"string","description":"Device linux kernel version","nullable":true},"mac":{"type":"string","description":"Device mac address (first interface mac)","nullable":true},"model":{"type":"string","description":"Device model","nullable":true},"name":{"type":"string","description":"Name of the device board","nullable":true},"offerName":{"type":"string","description":"OVH offer name of the device board","nullable":true},"ovhName":{"type":"string","description":"OVH name of the device board","nullable":true}}},"overTheBox.Hardware":{"type":"object","description":"Hardware properties","properties":{"canBeLinkedToService":{"type":"boolean","description":"True if hardware can be linked to a service without deviceID","readOnly":true},"mac":{"allOf":[{"$ref":"#/components/schemas/macAddress"}],"description":"Hardware MAC address","nullable":true,"readOnly":true},"model":{"type":"string","description":"Hardware model","readOnly":true},"name":{"type":"string","description":"Hardware name","readOnly":true},"prettyModelName":{"type":"string","description":"The hardware pretty model name","readOnly":true},"serial":{"type":"string","description":"Hardware serial","readOnly":true}}},"overTheBox.MultipathStatusEnum":{"type":"string","description":"Status of a MPTCP Interface.","enum":["backup","handover","master","off","on"]},"overTheBox.TemporaryLogsLink":{"type":"object","description":"Temporary url informations","properties":{"expirationDate":{"type":"string","description":"Temporary url expiration date","format":"date-time"},"url":{"type":"string","description":"Temporary url"}}},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/overTheBox/devices":{"post":{"summary":"List the devices available for registration","description":"List the devices available for registration. Returns the devices seen from the IP address of the call, with their ID, last seen date and whether each one is already activated.","security":[{"oAuth2AuthCode":[]}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/overTheBox.DeviceForRegistration"}}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Device@@@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.post(\"/overTheBox/devices\")\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(\"/overTheBox/devices\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:overTheBox/devices/create","required":true}]}},"/overTheBox/{serviceName}/device":{"delete":{"summary":"Unlink the device of an OverTheBox service","description":"Unlink the device of an OverTheBox service. Removes the association between the device and the service. Link another device with linkDevice.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your overTheBox offer","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Device@@@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.delete(\"/overTheBox/{serviceName}/device\")\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(\"/overTheBox/{serviceName}/device\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:device/delete","required":true}]},"get":{"summary":"Get the device of an OverTheBox service","description":"Get the device of an OverTheBox service. Returns the device ID, version, system information, public IP, network interfaces, last seen date and whether an update is available.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your overTheBox offer","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/overTheBox.Device"}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Device@@@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\nresult = client.get(\"/overTheBox/{serviceName}/device\")\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(\"/overTheBox/{serviceName}/device\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:device/get","required":true}]}},"/overTheBox/{serviceName}/device/hardware":{"get":{"summary":"Get an OverTheBox hardware","description":"Get an OverTheBox hardware. Returns the name, model, serial and MAC address of a hardware, and whether it can be linked to a service without a device ID.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your overTheBox offer","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/overTheBox.Hardware"}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Device@@@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(\"/overTheBox/{serviceName}/device/hardware\")\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(\"/overTheBox/{serviceName}/device/hardware\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:device/hardware/get","required":true}]}},"/overTheBox/{serviceName}/device/logs":{"post":{"summary":"Generate a temporary URL for the device logs","description":"Generate a temporary URL for the device logs. Returns a temporary URL to download the logs of the OverTheBox device, with its expiration date.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your overTheBox offer","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/overTheBox.TemporaryLogsLink"}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Device@@@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.post(\"/overTheBox/{serviceName}/device/logs\")\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(\"/overTheBox/{serviceName}/device/logs\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:device/logs/create","required":true}]}}}}
