{"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.RemoteAccess":{"type":"object","description":"If authorized, a remote access will expose a port, allowing an access to the device remotely","properties":{"accepted":{"type":"boolean","description":"If the remote access was accepted by the remote user","readOnly":true},"askDate":{"type":"string","description":"The date of the remote access demand","format":"date-time","readOnly":true},"authorizedBy":{"type":"string","description":"The user that authorized the remote access","nullable":true,"readOnly":true},"connectionInfos":{"allOf":[{"$ref":"#/components/schemas/overTheBox.RemoteAccessConnectionInfos"}],"description":"All the infos needed to connect yourself to your OTB","readOnly":true},"deletedAt":{"type":"string","description":"When the remote access was deleted","nullable":true,"format":"date-time","readOnly":true},"dockerVersion":{"type":"string","description":"Info about the docker version","readOnly":true},"expirationDate":{"type":"string","description":"When the remote access will be automatically deleted","format":"date-time","readOnly":true},"exposedPort":{"type":"integer","description":"The device's port which will be exposed","readOnly":true},"remoteAccessId":{"type":"string","description":"The id of the remote access","readOnly":true},"remoteUserInfos":{"allOf":[{"$ref":"#/components/schemas/overTheBox.RemoteAccessUserInfos"}],"description":"Infos about the remote user","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/overTheBox.RemoteAccessStatusEnum"}],"description":"Status of the remote access","readOnly":true}}},"overTheBox.RemoteAccessConnectionInfos":{"type":"object","description":"All the infos needed to connect yourself to your OTB","properties":{"ip":{"allOf":[{"$ref":"#/components/schemas/ip"}],"description":"IP to connect to when accessing the device remotely","nullable":true},"port":{"type":"integer","description":"Port to connect to when accessing the device remotely","nullable":true}}},"overTheBox.RemoteAccessStatusEnum":{"type":"string","description":"Status of the remote access.","enum":["active","creating","deleted","deleting","pendingValidation","recreating","toDelete","toRecreate"]},"overTheBox.RemoteAccessUserInfos":{"type":"object","description":"Infos about the remote user","properties":{"ip":{"allOf":[{"$ref":"#/components/schemas/ipBlock"}],"description":"IP from which the remote access will be allowed"},"publicKey":{"type":"string","description":"The public key authorized on the device (for SSH purpose)","nullable":true},"user":{"type":"string","description":"The user that will access the device remotely"}}},"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/{serviceName}/remoteAccesses":{"get":{"summary":"List the remote accesses of an OverTheBox service","description":"List the remote accesses of an OverTheBox service. Returns the IDs of the remote accesses created to reach the device of the service.","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":{"type":"array","items":{"type":"string"}}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Remote Accesses"]],"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}/remoteAccesses\")\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}/remoteAccesses\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:remoteAccesses/get","required":true}],"x-expanded-response":"OverTheBoxRemoteAccess"},"post":{"summary":"Create a remote access on an OverTheBox service","description":"Create a remote access on an OverTheBox service. Exposes a port of the device for a remote user, until the expiration date (one day by default), from an allowed IP block.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your overTheBox offer","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowedIp":{"description":"IP block from which the remote access will be allowed (the default value is the IP from which the call is made)","$ref":"#/components/schemas/ipBlock"},"expirationDate":{"type":"string","description":"The expirationDate of the remote access (default 1 day)","format":"date-time"},"exposedPort":{"type":"integer","description":"The port that the device will expose"},"publicKey":{"type":"string","description":"The remote user public key authorized on the device (for SSH purpose)"}},"required":["exposedPort"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/overTheBox.RemoteAccess"}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Remote Accesses"]],"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}/remoteAccesses\",\n\tallowedIp = None, # IP block from which the remote access will be allowed (the default value is the IP from which the call is made) (type: ipBlock, nullable)\n\texpirationDate = None, # The expirationDate of the remote access (default 1 day) (type: datetime, nullable)\n\texposedPort = None, # The port that the device will expose (type: long)\n\tpublicKey = None, # The remote user public key authorized on the device (for SSH purpose) (type: string, nullable)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/overTheBox/{serviceName}/remoteAccesses\", array(\n\tallowedIp => null, // IP block from which the remote access will be allowed (the default value is the IP from which the call is made) (type: ipBlock, nullable)\n\texpirationDate => null, // The expirationDate of the remote access (default 1 day) (type: datetime, nullable)\n\texposedPort => null, // The port that the device will expose (type: long)\n\tpublicKey => null, // The remote user public key authorized on the device (for SSH purpose) (type: string, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:remoteAccesses/create","required":true}]}},"/overTheBox/{serviceName}/remoteAccesses/{remoteAccessId}":{"delete":{"summary":"Delete a remote access of an OverTheBox service","description":"Delete a remote access of an OverTheBox service. Removes the remote access, and the device port is no longer exposed.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"remoteAccessId","description":"The id of the remote access","required":true,"schema":{"type":"string"}},{"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","Remote Accesses"]],"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}/remoteAccesses/{remoteAccessId}\")\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}/remoteAccesses/{remoteAccessId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:remoteAccesses/delete","required":true}]},"get":{"summary":"Get a remote access of an OverTheBox service","description":"Get a remote access of an OverTheBox service. Returns the exposed port, status, acceptance, connection information, the user who authorized it and its expiration date.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"remoteAccessId","description":"The id of the remote access","required":true,"schema":{"type":"string"}},{"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.RemoteAccess"}}}}},"x-developer-hub-navigation":[["Web Cloud","OverTheBox","Remote Accesses"]],"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}/remoteAccesses/{remoteAccessId}\")\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}/remoteAccesses/{remoteAccessId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:remoteAccesses/get","required":true}]}},"/overTheBox/{serviceName}/remoteAccesses/{remoteAccessId}/authorize":{"post":{"summary":"Authorize a remote access of an OverTheBox service","description":"Authorize a remote access of an OverTheBox service. Allows the remote access, so that the device exposes its port to the remote user.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"remoteAccessId","description":"The id of the remote access","required":true,"schema":{"type":"string"}},{"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","Remote Accesses"]],"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}/remoteAccesses/{remoteAccessId}/authorize\")\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}/remoteAccesses/{remoteAccessId}/authorize\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"overTheBox:apiovh:remoteAccesses/authorize","required":true}]}}}}
