{"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"},"hosting.web.Key":{"type":"object","description":"Key information","properties":{"publicKey":{"type":"string","description":"Public key","readOnly":true}}},"hosting.web.indy":{"type":"object","description":"Hosting indys","properties":{"attachedDomains":{"type":"array","description":"AttachedDomain IDs linked to this multidomain","items":{"type":"string"},"readOnly":true},"home":{"type":"string","description":"Home directory","readOnly":true},"login":{"type":"string","description":"Login of the multidomain independent user","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.StateEnum"}],"description":"User status","readOnly":true}}},"hosting.web.task":{"type":"object","description":"Tasks","properties":{"doneDate":{"type":"string","description":"Completion date","nullable":true,"format":"date-time","readOnly":true},"function":{"type":"string","description":"Function name","readOnly":true},"id":{"type":"integer","description":"the id of the task","readOnly":true},"lastUpdate":{"type":"string","description":"last update","nullable":true,"format":"date-time","readOnly":true},"objectId":{"type":"string","description":"Task related object ID","nullable":true,"readOnly":true},"objectType":{"allOf":[{"$ref":"#/components/schemas/hosting.web.task.ObjectTypeEnum"}],"description":"Task object type","nullable":true,"readOnly":true},"startDate":{"type":"string","description":"Task Creation date","format":"date-time","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/hosting.web.task.StatusEnum"}],"description":"Task status","readOnly":true}}},"hosting.web.task.ObjectTypeEnum":{"type":"string","description":"Task object type listing","enum":["Abuse","AttachedDomain","BlockedIp","Cdn","Cron","Database","Dump","EnvVar","Filerz","Hostedssl","Hosting","Indy","Infra","Minor","Module","Other","OvhConfig","OvhOrg","OwnLogs","Runtime","Scan","Sqlperso","User","UserLogs","Web","Webd"]},"hosting.web.task.StatusEnum":{"type":"string","description":"Task's status","enum":["cancelled","doing","done","error","init","todo"]},"hosting.web.user":{"type":"object","description":"Hosting users","properties":{"home":{"type":"string","description":"Home directory"},"isPrimaryAccount":{"type":"boolean","description":"Is this user primary","readOnly":true},"login":{"type":"string","description":"Login used to connect on FTP and SSH","readOnly":true},"serviceManagementCredentials":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.ServiceCredentials"}],"description":"Credentials to manage your webhosting","readOnly":true},"sshState":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.SshStateEnum"}],"description":"User ssh status"},"state":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.StateEnum"}],"description":"User state"},"status":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.StatusEnum"}],"description":"The user status","readOnly":true},"taskId":{"type":"integer","description":"The task ID working on this user","nullable":true,"readOnly":true}}},"hosting.web.user.Credentials":{"type":"object","description":"User, url and port of a service","properties":{"port":{"type":"integer","description":"Port to use to access to the service"},"url":{"type":"string","description":"Url to contact the service"},"user":{"type":"string","description":"Login to authentificate you on the service"}}},"hosting.web.user.ServiceCredentials":{"type":"object","description":"Different credentials to manage your service","properties":{"ftp":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.Credentials"}],"description":"Credentials to manage files by ftp"},"ssh":{"allOf":[{"$ref":"#/components/schemas/hosting.web.user.Credentials"}],"description":"Credentials to manage webhosting by ssh"}}},"hosting.web.user.SshStateEnum":{"type":"string","description":"Account's ssh state","enum":["active","none","sftponly"]},"hosting.web.user.StateEnum":{"type":"string","description":"Account's state","enum":["off","rw"]},"hosting.web.user.StatusEnum":{"type":"string","description":"User status","enum":["created","creating","deleting","updating"]},"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"}},"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":{"/hosting/web/{serviceName}/indy":{"get":{"summary":"List independent users","description":"List independent users. Returns the logins of the independent multidomain users of the hosting. Filter them by login.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"login","description":"Filter the value of login property (like)","schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","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","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/indy\")\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(\"/hosting/web/{serviceName}/indy\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:indy/get","required":true}],"x-expanded-response":"HostingWebIndy"}},"/hosting/web/{serviceName}/indy/{login}":{"get":{"summary":"Get an independent user","description":"Get an independent user. Returns the home directory, state and attached domains of the independent multidomain user.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"login","description":"Login of the multidomain independent user","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.indy"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/indy/{login}\")\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(\"/hosting/web/{serviceName}/indy/{login}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:indy/get","required":true}]}},"/hosting/web/{serviceName}/key/ssh":{"get":{"summary":"Get the SSH public key","description":"Returns the SSH public key of the hosting.","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/hosting.web.Key"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/key/ssh\")\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(\"/hosting/web/{serviceName}/key/ssh\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:key/ssh/get","required":true}]},"post":{"summary":"Generate an SSH key pair","description":"Generates an SSH key pair for the hosting and returns its public key.","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/hosting.web.Key"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/key/ssh\")\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(\"/hosting/web/{serviceName}/key/ssh\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:key/ssh/create","required":true}]}},"/hosting/web/{serviceName}/user":{"get":{"summary":"List users","description":"List users. Returns the logins of the FTP and SSH users of the hosting. Filter them by home or login.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"home","description":"Filter the value of home property (like)","schema":{"type":"string"}},{"in":"query","name":"login","description":"Filter the value of login property (like)","schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","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","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/user\")\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(\"/hosting/web/{serviceName}/user\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/get","required":true}],"x-expanded-response":"HostingWebUser"},"post":{"summary":"Create a user","description":"Create a user. Creates an FTP and SSH user with a login, a password and a home directory, and returns the task. sshState is none by default.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"home":{"type":"string","description":"Home directory"},"login":{"type":"string","description":"Login use for your new user"},"password":{"type":"string","description":"Password","format":"password"},"sshState":{"description":"Ssh state for this user. Default: none","$ref":"#/components/schemas/hosting.web.user.SshStateEnum"}},"required":["home","login","password"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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.post(\"/hosting/web/{serviceName}/user\",\n\thome = None, # Home directory (type: string)\n\tlogin = None, # Login use for your new user (type: string)\n\tpassword = None, # Password (type: password)\n\tsshState = None, # Ssh state for this user. Default: none (type: hosting.web.user.SshStateEnum, 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(\"/hosting/web/{serviceName}/user\", array(\n\thome => null, // Home directory (type: string)\n\tlogin => null, // Login use for your new user (type: string)\n\tpassword => null, // Password (type: password)\n\tsshState => null, // Ssh state for this user. Default: none (type: hosting.web.user.SshStateEnum, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/create","required":true}]}},"/hosting/web/{serviceName}/user/{login}":{"delete":{"summary":"Delete a user","description":"Delete a user. Permanently deletes the user and returns the task. The files in its home folder are kept.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"login","description":"Login used to connect on FTP and SSH","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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.delete(\"/hosting/web/{serviceName}/user/{login}\")\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(\"/hosting/web/{serviceName}/user/{login}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/delete","required":true}]},"get":{"summary":"Get a user","description":"Get a user. Returns the home directory, SSH state, state and status of the user, and whether it is the primary account.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"login","description":"Login used to connect on FTP and SSH","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.user"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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(\"/hosting/web/{serviceName}/user/{login}\")\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(\"/hosting/web/{serviceName}/user/{login}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/get","required":true}]},"put":{"summary":"Update a user","description":"Update a user. Updates the home directory, SSH state or state of the user. Set state to off to disable the FTP and SSH access of the user.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"login","description":"Login used to connect on FTP and SSH","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.user"}}}},"responses":{"200":{"description":"successful operation"}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@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\n# Request body type: hosting.web.user\nresult = client.put(\"/hosting/web/{serviceName}/user/{login}\",\n\thome = None, # Home directory (type: string)\n\tsshState = None, # User ssh status (type: hosting.web.user.SshStateEnum)\n\tstate = None, # User state (type: hosting.web.user.StateEnum)\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: hosting.web.user\n$result = $ovh->put(\"/hosting/web/{serviceName}/user/{login}\", array(\n\thome => null, // Home directory (type: string)\n\tsshState => null, // User ssh status (type: hosting.web.user.SshStateEnum)\n\tstate => null, // User state (type: hosting.web.user.StateEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/edit","required":true}]}},"/hosting/web/{serviceName}/user/{login}/changePassword":{"post":{"summary":"Change a user password","description":"Change a user password. Changes the password of the user and returns the task. The password is used for both FTP and SSH access.","deprecated":true,"x-deprecation-date":"2026-09-01T00:00:00+01:00","x-deletion-date":"2026-11-01T00:00:00+01:00","x-replacement-route":"/hosting/web/{serviceName}/user/{login}","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"login","description":"Login used to connect on FTP and SSH","required":true,"schema":{"type":"string"}},{"in":"path","name":"serviceName","description":"The internal name of your hosting","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The user's new password","format":"password"}},"required":["password"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/hosting.web.task"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","FTP-SSH@@@70"]],"x-badges":[{"color":"red","label":"Deprecated, will be removed"}],"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: password\nresult = client.post(\"/hosting/web/{serviceName}/user/{login}/changePassword\",\n\tpassword = None, # The user's new password (type: password)\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: password\n$result = $ovh->post(\"/hosting/web/{serviceName}/user/{login}/changePassword\", array(\n\tpassword => null, // The user's new password (type: password)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:user/changePassword","required":true}]}}}}
