{"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/v2"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"common.CurrentTask":{"type":"object","description":"Asynchronous operation currently running","properties":{"errors":{"type":"array","description":"Errors that occurred on the task","nullable":true,"items":{"$ref":"#/components/schemas/common.TaskError"},"readOnly":true},"id":{"type":"string","description":"Identifier of the current task","format":"uuid","readOnly":true},"link":{"type":"string","description":"Link to the task details","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/common.CurrentTaskStatusEnum"}],"description":"Current global status of the current task","nullable":true,"readOnly":true},"type":{"type":"string","description":"Type of the current task","readOnly":true}}},"common.CurrentTaskStatusEnum":{"type":"string","description":"Current status of a task. A task in ERROR cannot be retried without your inputs. PENDING tasks will be executed as soon as possible. A RUNNING task is currently executing your original request. SCHEDULED is used for tasks that will be executed in the future.","enum":["ERROR","PENDING","RUNNING","SCHEDULED","WAITING_USER_INPUT"]},"common.ResourceStatusEnum":{"type":"string","description":"Current status of a resource","enum":["CREATING","CREATION_PLANNED","DELETING","ERROR","OUT_OF_SYNC","READY","SUSPENDED","UNKNOWN","UPDATING"]},"common.TaskError":{"type":"object","description":"Errors that occurred on the task","properties":{"message":{"type":"string","description":"Error description","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"},"webhosting.AttachedDomain":{"type":"object","description":"Webhosting attached domain","properties":{"checksum":{"type":"string","description":"Computed hash used to control concurrent modification requests. Here, it represents the current target specification value.","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/webhosting.AttachedDomainCurrentState"}],"description":"Current state of the attached domain","readOnly":true},"currentTasks":{"type":"array","description":"Ongoing asynchronous tasks related to the attached domain","nullable":true,"items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the attached domain","format":"uuid","readOnly":true},"ipLocation":{"allOf":[{"$ref":"#/components/schemas/webhosting.IpLocationCountryEnum"}],"description":"IP Location for the attached domain","nullable":true,"readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Webhosting attached domain readiness in the system","readOnly":true}}},"webhosting.AttachedDomainCurrentState":{"type":"object","description":"Current state of the hosting web attached domain","properties":{"cdn":{"allOf":[{"$ref":"#/components/schemas/webhosting.CdnStatus"}],"description":"CDN related to the attached domain","readOnly":true},"firewall":{"allOf":[{"$ref":"#/components/schemas/webhosting.FirewallStatus"}],"description":"Firewall of the attached domain","readOnly":true},"fqdn":{"type":"string","description":"FQDN of the attached domain","readOnly":true},"git":{"allOf":[{"$ref":"#/components/schemas/webhosting.Git"}],"description":"Git details of the attached domain","readOnly":true},"hosting":{"allOf":[{"$ref":"#/components/schemas/webhosting.AttachedDomainHosting"}],"description":"Hosting details of the attached domain","readOnly":true},"isDefault":{"type":"boolean","description":"Default attached domain can't be updated and can't support SSL","nullable":true,"readOnly":true},"ownLog":{"type":"string","description":"Domain to separate the logs from the others attached domains","nullable":true,"readOnly":true},"path":{"type":"string","description":"Path of the attached domain","readOnly":true},"ssl":{"allOf":[{"$ref":"#/components/schemas/webhosting.AttachedDomainSsl"}],"description":"SSL details","readOnly":true}}},"webhosting.AttachedDomainHosting":{"type":"object","description":"Hosting details of the attached domain","properties":{"boostOffer":{"type":"string","description":"Boost offer of the hosting related to the attached domain","nullable":true,"readOnly":true},"displayName":{"type":"string","description":"Display name of the hosting related to the attached domain","readOnly":true},"offer":{"type":"string","description":"Offer of the hosting related to the attached domain","readOnly":true},"serviceName":{"type":"string","description":"Service name of the hosting related to the attached domain","readOnly":true}}},"webhosting.AttachedDomainSsl":{"type":"object","description":"SSL details of the attached domain","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/webhosting.SslStatusEnum"}],"description":"SSL status","readOnly":true}}},"webhosting.CdnStatus":{"type":"object","description":"CDN details","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/webhosting.CdnStatusEnum"}],"description":"CDN status"}},"required":["status"]},"webhosting.CdnStatusEnum":{"type":"string","description":"Cdn status enum","enum":["ACTIVE","NONE"]},"webhosting.DatabaseConfiguration":{"type":"object","description":"Database a module connects to, supplied when installing it on a web hosting plan","properties":{"databaseName":{"type":"string","description":"Name of the database to use during the module installation"},"password":{"type":"string","description":"Database password used for authentication"},"port":{"type":"integer","description":"Port used to connect to the database server"},"server":{"type":"string","description":"Hostname or address of the database server, for example mydb.mysql.db"},"user":{"type":"string","description":"Database username used for authentication"}},"required":["databaseName","password","port","server","user"]},"webhosting.Domain":{"type":"object","description":"Webhosting Domain","properties":{"checksum":{"type":"string","description":"Computed hash used to control concurrent modification requests. Here, it represents the current target specification value.","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/webhosting.DomainCurrentState"}],"description":"Current state of the domain","readOnly":true},"currentTasks":{"type":"array","description":"Ongoing asynchronous tasks related to the website's domain","nullable":true,"items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the domain","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Webhosting Domain readiness in the system","readOnly":true}}},"webhosting.DomainCurrentState":{"type":"object","description":"Current state of the website's domain","properties":{"cdn":{"allOf":[{"$ref":"#/components/schemas/webhosting.CdnStatus"}],"description":"CDN status for domain","readOnly":true},"firewall":{"allOf":[{"$ref":"#/components/schemas/webhosting.FirewallStatus"}],"description":"Firewall status for domain","readOnly":true},"fqdn":{"type":"string","description":"FQDN of the domain","readOnly":true},"path":{"type":"string","description":"Target specification of the domain path","readOnly":true},"ssl":{"allOf":[{"$ref":"#/components/schemas/webhosting.AttachedDomainSsl"}],"description":"SSL details","nullable":true,"readOnly":true},"websiteId":{"type":"string","description":"Unique identifier of the website the domain belongs to","readOnly":true}}},"webhosting.FirewallStatus":{"type":"object","description":"Firewall details","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/webhosting.FirewallStatusEnum"}],"description":"Firewall status"}},"required":["status"]},"webhosting.FirewallStatusEnum":{"type":"string","description":"Firewall status enum","enum":["ACTIVE","NONE"]},"webhosting.Git":{"type":"object","description":"Git details","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/webhosting.GitStatusEnum"}],"description":"Git status","readOnly":true},"vcsBranch":{"type":"string","description":"Branch of the repository containing the website source code to deploy","nullable":true,"readOnly":true},"vcsUrl":{"type":"string","description":"URL of the repository containing the website source code to deploy","nullable":true,"readOnly":true}}},"webhosting.GitStatusEnum":{"type":"string","description":"Git status","enum":["CREATED","CREATING","DELETING","DEPLOYING","DISABLED","ERROR","INITIAL_ERROR"]},"webhosting.IpLocationCountryEnum":{"type":"string","description":"Available cluster countries","enum":["BE","CA","CZ","DE","ES","FI","FR","IE","IT","LT","NL","PL","PT","UK"]},"webhosting.Module":{"type":"object","description":"Module details","properties":{"name":{"allOf":[{"$ref":"#/components/schemas/webhosting.ModuleNameEnum"}],"description":"Module name"}},"required":["name"]},"webhosting.ModuleAdminConfiguration":{"type":"object","description":"Administrator credentials and settings for module deployment","properties":{"adminLogin":{"type":"string","description":"Administrator username for accessing the module backend"},"adminPassword":{"type":"string","description":"Password for the module administrator account"},"domain":{"type":"string","description":"Domain name on which the module will be installed"},"installPath":{"type":"string","description":"Directory path where the module will be installed inside the hosting","nullable":true},"language":{"allOf":[{"$ref":"#/components/schemas/webhosting.ModuleLanguageEnum"}],"description":"Language selected for module installation"}},"required":["adminLogin","adminPassword","domain","language"]},"webhosting.ModuleLanguageEnum":{"type":"string","description":"Available languages","enum":["cz","de","en","es","fi","fr","it","lt","nl","pl","pt"]},"webhosting.ModuleNameEnum":{"type":"string","description":"Module name","enum":["DRUPAL","JOOMLA","PRESTASHOP","WORDPRESS"]},"webhosting.ModuleStatus":{"type":"object","description":"Module enabled status","properties":{"enabled":{"type":"boolean","description":"module enabled status","readOnly":true}}},"webhosting.SslStatusEnum":{"type":"string","description":"SSL status enum","enum":["ACTIVE","NONE"]},"webhosting.Website":{"type":"object","description":"Webhosting Website","properties":{"checksum":{"type":"string","description":"Computed hash used to control concurrent modification requests. Here, it represents the current target specification value.","readOnly":true},"currentState":{"allOf":[{"$ref":"#/components/schemas/webhosting.WebsiteCurrentState"}],"description":"Current state of the website","readOnly":true},"currentTasks":{"type":"array","description":"Ongoing asynchronous tasks related to the website","nullable":true,"items":{"$ref":"#/components/schemas/common.CurrentTask"},"readOnly":true},"id":{"type":"string","description":"Unique identifier of the website","format":"uuid","readOnly":true},"resourceStatus":{"allOf":[{"$ref":"#/components/schemas/common.ResourceStatusEnum"}],"description":"Webhosting Website readiness in the system","readOnly":true},"targetSpec":{"allOf":[{"$ref":"#/components/schemas/webhosting.WebsiteTargetSpec"}],"description":"Webhosting Website target specification","readOnly":true}}},"webhosting.WebsiteCurrentState":{"type":"object","description":"Current state of the website","properties":{"git":{"allOf":[{"$ref":"#/components/schemas/webhosting.Git"}],"description":"Git details of the website","readOnly":true},"linkedDomains":{"type":"integer","description":"Number of domain linked to a website","readOnly":true},"module":{"allOf":[{"$ref":"#/components/schemas/webhosting.ModuleStatus"}],"description":"module status of the website","readOnly":true},"name":{"type":"string","description":"Name of the website","readOnly":true},"path":{"type":"string","description":"Path of the website","readOnly":true}}},"webhosting.WebsitePostPayload":{"type":"object","description":"website post payload target specification","properties":{"targetSpec":{"allOf":[{"$ref":"#/components/schemas/webhosting.WebsitePostTargetSpec"}],"description":"Target specification of the website"}},"required":["targetSpec"]},"webhosting.WebsitePostTargetSpec":{"type":"object","description":"Post payload of the website","properties":{"adminConfiguration":{"allOf":[{"$ref":"#/components/schemas/webhosting.ModuleAdminConfiguration"}],"description":"Configuration of the admin account for module installation","nullable":true},"bypassDNSConfiguration":{"type":"boolean","description":"If set to true, DNS zone will not be updated by the operation","nullable":true},"cdn":{"allOf":[{"$ref":"#/components/schemas/webhosting.CdnStatus"}],"description":"CDN related to the domain","nullable":true},"databaseConfiguration":{"allOf":[{"$ref":"#/components/schemas/webhosting.DatabaseConfiguration"}],"description":"Configuration of the database for module installation","nullable":true},"firewall":{"allOf":[{"$ref":"#/components/schemas/webhosting.FirewallStatus"}],"description":"Firewall of the domain","nullable":true},"fqdn":{"type":"string","description":"FQDN of the domain"},"ipLocation":{"allOf":[{"$ref":"#/components/schemas/webhosting.IpLocationCountryEnum"}],"description":"Change domain's DNS to the IP of the country","nullable":true},"module":{"allOf":[{"$ref":"#/components/schemas/webhosting.Module"}],"description":"Type of module to install on the domain","nullable":true},"name":{"type":"string","description":"Target specification of the website name"},"path":{"type":"string","description":"Path of the domain","nullable":true}},"required":["fqdn","name"]},"webhosting.WebsitePutPayload":{"type":"object","description":"website put payload target specification","properties":{"targetSpec":{"allOf":[{"$ref":"#/components/schemas/webhosting.WebsiteTargetSpec"}],"description":"Target specification of the resource"}},"required":["targetSpec"]},"webhosting.WebsiteTargetSpec":{"type":"object","description":"Target specification of a webhosting website","properties":{"name":{"type":"string","description":"Target specification of the website name"},"path":{"type":"string","description":"Root folder of the website","nullable":true}},"required":["name"]}},"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":{"/webhosting/attachedDomain":{"get":{"operationId":"getAccountWebHostingAttachedDomains","summary":"List attached domains","description":"Returns the domains attached to all the web hostings of the account. Filter them by name with the domain parameter.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"query","name":"domain","description":"Optional query param to only filter domain name","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/webhosting.AttachedDomain"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@180"]],"x-badges":[{"color":"blue","label":"Beta 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(\"/v2/webhosting/attachedDomain\")\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(\"/v2/webhosting/attachedDomain\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"account:apiovh:webHosting/attachedDomain/get","required":true}],"x-response-identifier":"id"}},"/webhosting/resource/{name}/attachedDomain":{"get":{"operationId":"getWebHostingAttachedDomains","summary":"List attached domains","description":"Returns the domains attached to the hosting, with their path and their SSL, CDN, firewall and Git settings.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/webhosting.AttachedDomain"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@190"]],"x-badges":[{"color":"blue","label":"Beta 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(\"/v2/webhosting/resource/{name}/attachedDomain\")\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(\"/v2/webhosting/resource/{name}/attachedDomain\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:attachedDomain/get","required":true}],"x-response-identifier":"id"}},"/webhosting/resource/{name}/website":{"get":{"operationId":"getAllWebHostingWebsites","summary":"List websites","description":"Returns the websites of the hosting.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/webhosting.Website"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@40"]],"x-badges":[{"color":"blue","label":"Beta 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(\"/v2/webhosting/resource/{name}/website\")\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(\"/v2/webhosting/resource/{name}/website\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:website/get","required":true}],"x-response-identifier":"id","x-expanded-response":"WebhostingWebsite"},"post":{"operationId":"createWebHostingWebsite","summary":"Create a website","description":"Creates a website on a domain, with its root folder, and can install a WordPress, Joomla, Drupal or PrestaShop module. Creation is asynchronous: follow resourceStatus until READY. Set bypassDNSConfiguration to true to leave the DNS zone unchanged.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhosting.WebsitePostPayload"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhosting.Website"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@290"]],"x-badges":[{"color":"blue","label":"Beta 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: webhosting.WebsitePostPayload\nresult = client.post(\"/v2/webhosting/resource/{name}/website\",\n\ttargetSpec = None, # Target specification of the website (type: webhosting.WebsitePostTargetSpec)\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: webhosting.WebsitePostPayload\n$result = $ovh->post(\"/v2/webhosting/resource/{name}/website\", array(\n\ttargetSpec => null, // Target specification of the website (type: webhosting.WebsitePostTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:website/create","required":true}]}},"/webhosting/resource/{name}/website/{websiteId}":{"get":{"operationId":"getWebHostingWebsite","summary":"Get a website","description":"Returns the website name, root folder, number of linked domains and its Git and module status.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"websiteId","description":"Website ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhosting.Website"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@200"]],"x-badges":[{"color":"blue","label":"Beta 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(\"/v2/webhosting/resource/{name}/website/{websiteId}\")\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(\"/v2/webhosting/resource/{name}/website/{websiteId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:website/get","required":true}],"x-response-identifier":"id"},"put":{"operationId":"editWebHostingWebsite","summary":"Update a website","description":"Updates the name and root folder of the website.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"websiteId","description":"Website ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhosting.WebsitePutPayload"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhosting.Website"}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@360"]],"x-badges":[{"color":"blue","label":"Beta 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: webhosting.WebsitePutPayload\nresult = client.put(\"/v2/webhosting/resource/{name}/website/{websiteId}\",\n\ttargetSpec = None, # Target specification of the resource (type: webhosting.WebsiteTargetSpec)\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: webhosting.WebsitePutPayload\n$result = $ovh->put(\"/v2/webhosting/resource/{name}/website/{websiteId}\", array(\n\ttargetSpec => null, // Target specification of the resource (type: webhosting.WebsiteTargetSpec)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:website/edit","required":true}]}},"/webhosting/resource/{name}/website/{websiteId}/domain":{"get":{"operationId":"getWebHostingWebsiteDomains","summary":"List website domains","description":"Returns the domains linked to the website, with their path, CDN and firewall status.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"header","name":"X-Pagination-Cursor","description":"Pagination cursor","schema":{"type":"string"}},{"in":"header","name":"X-Pagination-Size","description":"Pagination size","schema":{"type":"integer"}},{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"in":"path","name":"websiteId","description":"Website ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/webhosting.Domain"}}}}}},"x-developer-hub-navigation":[["Web Cloud","Web Hosting","My sites@@@210"]],"x-badges":[{"color":"blue","label":"Beta 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(\"/v2/webhosting/resource/{name}/website/{websiteId}/domain\")\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(\"/v2/webhosting/resource/{name}/website/{websiteId}/domain\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"webHosting:apiovh:website/domain/get","required":true}],"x-response-identifier":"id"}}}}
