{"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 !"},"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"},"publicCloud.common.Location":{"type":"object","description":"Resource location","properties":{"availabilityZone":{"type":"string","description":"Availability zone within the region","nullable":true},"region":{"type":"string","description":"Region code"}},"required":["region"]},"publicCloud.instance.FlavorBandwidth":{"type":"object","description":"Network bandwidth of a flavor. The bandwidth an instance of the flavor gets in Mbit/s.","properties":{"private":{"type":"integer","description":"Bandwidth on private networks (vRack) in Mbit/s. Null when the flavor does not declare it.","nullable":true,"readOnly":true},"publicInbound":{"type":"integer","description":"Inbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it.","nullable":true,"readOnly":true},"publicOutbound":{"type":"integer","description":"Outbound bandwidth on the public network in Mbit/s. Null when the flavor does not declare it.","nullable":true,"readOnly":true}}},"publicCloud.instance.ImageOSTypeEnum":{"type":"string","description":"Image operating system type. Operating system family of an instance image, as tagged on the image in OpenStack Glance. It decides which flavors can boot the image, and Windows images carry a license. `LINUX`: A Linux (or other non-Windows) image for virtual instances. `WINDOWS`: A Microsoft Windows image. It can only boot on Windows flavors. `BAREMETAL_LINUX`: A Linux image for bare-metal instances.","enum":["BAREMETAL_LINUX","LINUX","WINDOWS"]},"publicCloud.instance.ImageStatusEnum":{"type":"string","description":"Lifecycle status of an instance image as reported by OpenStack Glance. It describes where the image is in its upload and availability lifecycle. `QUEUED`: The image identifier has been reserved in the image registry, but no image data has been uploaded yet. `SAVING`: The raw image data is currently being uploaded to the image store. `IMPORTING`: The uploaded image data is being imported and processed through the Glance import workflow. `ACTIVE`: The image is fully available and can be used to boot instances. `DEACTIVATED`: Access to the image has been disabled by an administrator. The data is preserved but the image cannot be used to launch instances until reactivated. `KILLED`: An error occurred during upload or import and the image data is not usable. `PENDING_DELETE`: The image has been marked for deletion but its data has not been removed yet. It may still be restorable during the retention delay. `DELETED`: The image has been deleted and its data is scheduled for removal.","enum":["ACTIVE","DEACTIVATED","DELETED","IMPORTING","KILLED","PENDING_DELETE","QUEUED","SAVING"]},"publicCloud.instance.ImageVisibilityEnum":{"type":"string","description":"Image visibility. Controls which projects can see and use an instance image, as defined by OpenStack Glance. `PUBLIC`: The image is visible to and usable by every project. `PRIVATE`: The image is visible only to the project that owns it. `SHARED`: The image is visible only to the owning project and the specific projects it has been explicitly shared with (image members). `COMMUNITY`: The image is usable by every project but is hidden from default image listings, so it must be requested explicitly.","enum":["COMMUNITY","PRIVATE","PUBLIC","SHARED"]},"publicCloud.reference.Location":{"type":"object","description":"Location of a reference entry: the region it applies to, its availability zones and whether it is activated on the project","properties":{"availabilityZones":{"type":"array","description":"Availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c. Empty for a single-AZ region.","items":{"type":"string"},"readOnly":true},"region":{"type":"string","description":"Region name, for example GRA11","readOnly":true},"regionActivated":{"type":"boolean","description":"Whether the region is already activated on the project. When false, the region must be activated on the project before use.","readOnly":true}}},"publicCloud.reference.instance.Flavor":{"type":"object","description":"Instance flavor (catalog entry). A single compute flavor as advertised by the backend (OpenStack/Nova) for a given region. This is read-only reference data served under /reference: it describes a hardware sizing (vCPUs, RAM, disks) the project can create instances from, not an existing resource. The catalog is per-region. A flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another (see location).","properties":{"bandwidth":{"allOf":[{"$ref":"#/components/schemas/publicCloud.instance.FlavorBandwidth"}],"description":"Network bandwidth an instance of the flavor gets in Mbit/s","readOnly":true},"description":{"type":"string","description":"Free-form description of the flavor as reported by the backend. Null when no description is advertised for this flavor.","nullable":true,"readOnly":true},"disk":{"type":"integer","description":"Size of the flavor's root disk in GB. This is the primary system disk provisioned for instances created from this flavor.","readOnly":true},"ephemeral":{"type":"integer","description":"Size of the flavor's ephemeral disk in GB. Ephemeral storage is transient. Its contents do not survive a rebuild or deletion of the instance. Zero when the flavor provides no ephemeral disk.","readOnly":true},"gpus":{"type":"integer","description":"Number of physical GPUs provided by the flavor. Zero for flavors without GPU.","readOnly":true},"id":{"type":"string","description":"Identifier. The OpenStack/Nova flavor ID. Stable within a region and used to reference the flavor when creating an instance.","format":"uuid","readOnly":true},"isPublic":{"type":"boolean","description":"Public availability. Whether the flavor is publicly available to the project. Private flavors are only visible to the projects they have been explicitly shared with.","readOnly":true},"location":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.Location"}],"description":"Location. Region where this flavor is offered. The flavor catalog is per-region: a flavor returned for one region is not guaranteed to exist, or to carry the same characteristics, in another. regionActivated tells whether the region is already activated on the project. When false, the region must be activated on the project before use. availabilityZones lists the availability zones of the region, empty for a single-AZ region.","readOnly":true},"name":{"type":"string","description":"The backend flavor name, for example b2-7, c2-15. This is the commercial/technical name used to identify the sizing in the catalog.","readOnly":true},"ram":{"type":"integer","description":"RAM in MB. Amount of memory provided by the flavor, expressed in MB.","readOnly":true},"swap":{"type":"integer","description":"Size of the flavor's swap space in MB. Zero when the flavor provides no swap.","readOnly":true},"vcpus":{"type":"integer","description":"vCPUs. Number of virtual CPUs provided by the flavor.","readOnly":true}}},"publicCloud.reference.instance.Image":{"type":"object","description":"Instance image (catalog entry). A single OS image as advertised by the backend (OpenStack/Glance) for a given region. This is read-only reference data served under /reference: it describes a bootable image the project can create instances from, not an existing resource. The image catalog is read-only in APIv2. There is no create, update or delete on images. The catalog is per-region: an image returned for one region is not guaranteed to exist in another (see location).","properties":{"createdAt":{"type":"string","description":"Creation date. Timestamp at which the image was created on the backend, in RFC 3339 format.","format":"date-time","readOnly":true},"defaultUser":{"type":"string","description":"Default login user of the image, as set by its publisher, for example almalinux or ubuntu. Null when the image declares none.","nullable":true,"readOnly":true},"id":{"type":"string","description":"Identifier. The OpenStack/Glance image ID. Stable within a region and used to reference the image when creating an instance.","format":"uuid","readOnly":true},"location":{"allOf":[{"$ref":"#/components/schemas/publicCloud.common.Location"}],"description":"Location. Region (and, where applicable, availability zone) where this image is offered. The image catalog is per-region: an image returned for one region is not guaranteed to exist in another.","readOnly":true},"minDisk":{"type":"integer","description":"Minimum root disk size in GB that an instance must provide to boot from this image. A flavor whose disk is smaller than this value cannot be used with the image.","readOnly":true},"minRam":{"type":"integer","description":"Minimum amount of memory in MB that an instance must provide to boot from this image. A flavor whose RAM is below this value cannot be used with the image.","readOnly":true},"name":{"type":"string","description":"Display name of the image as reported by the backend, for example the distribution and version, such as Debian 12","readOnly":true},"osType":{"allOf":[{"$ref":"#/components/schemas/publicCloud.instance.ImageOSTypeEnum"}],"description":"Operating system type. Operating system family of the image (see ImageOSTypeEnum). Windows images can only boot on Windows flavors.","readOnly":true},"size":{"type":"integer","description":"Size of the image on the backend, expressed in bytes","readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/publicCloud.instance.ImageStatusEnum"}],"description":"Availability status of the image as reported by the backend (see ImageStatusEnum). Only images in an active status can be used to create an instance.","readOnly":true},"updatedAt":{"type":"string","description":"Last update date. Timestamp of the last modification of the image on the backend, in RFC 3339 format.","format":"date-time","readOnly":true},"visibility":{"allOf":[{"$ref":"#/components/schemas/publicCloud.instance.ImageVisibilityEnum"}],"description":"Visibility scope of the image (see ImageVisibilityEnum), for example whether it is a public OVHcloud-provided image or private to the project","readOnly":true}}},"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":{"/publicCloud/project/{projectId}/reference/instance/flavor":{"get":{"operationId":"getFlavors","summary":"List instance flavors","description":"Returns the instance flavors available to the project, in the regions activated on the project and in those the project can activate. `location.regionActivated` on each flavor tells which regions must be activated on the project before use. `location.availabilityZones` lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. A region filter on a region that does not exist is rejected. On a region the project can neither use nor activate, it returns an empty list. A flavor is a read-only sizing template (vCPUs, RAM, disk) used to create or resize an instance. A new or disabled flavor, or a private flavor newly granted to the project, can take up to one minute to show in this list.","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":"name","description":"Optional flavor name filter, for example b2-7","schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"query","name":"region","description":"Optional region filter","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.reference.instance.Flavor"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Compute","Instances","Service references@@@20"],["Public Cloud","Project Management","Service references","Instance@@@16"]],"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(\"/v2/publicCloud/project/{projectId}/reference/instance/flavor\")\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/publicCloud/project/{projectId}/reference/instance/flavor\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/instance/flavor/get","required":true}],"x-response-identifier":"id","x-expanded-response":"PublicCloudReferenceInstanceFlavor"}},"/publicCloud/project/{projectId}/reference/instance/flavor/{id}":{"get":{"operationId":"getFlavor","summary":"Get an instance flavor","description":"Returns one instance flavor with its vCPUs, RAM and disk. `location.regionActivated` tells whether the flavor's region is already activated on the project. When false, the region must be activated on the project before use. `location.availabilityZones` lists the availability zones of the region, for example eu-west-par-a, eu-west-par-b and eu-west-par-c, and is empty for a single-AZ region. Use its `id` in `targetSpec.flavor` to create or resize an instance.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"id","description":"Id","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.reference.instance.Flavor"}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Compute","Instances","Service references@@@30"],["Public Cloud","Project Management","Service references","Instance@@@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(\"/v2/publicCloud/project/{projectId}/reference/instance/flavor/{id}\")\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/publicCloud/project/{projectId}/reference/instance/flavor/{id}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/instance/flavor/get","required":true}],"x-response-identifier":"id"}},"/publicCloud/project/{projectId}/reference/instance/image":{"get":{"operationId":"getImages","summary":"List instance images","description":"Returns the operating system images available to the project. Images are provided by the platform and are read-only.","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":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"query","name":"region","description":"Optional region filter","schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.reference.instance.Image"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Compute","Instances","Service references@@@40"],["Public Cloud","Project Management","Service references","Instance@@@22"]],"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(\"/v2/publicCloud/project/{projectId}/reference/instance/image\")\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/publicCloud/project/{projectId}/reference/instance/image\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/instance/image/get","required":true}],"x-response-identifier":"id","x-expanded-response":"PublicCloudReferenceInstanceImage"}},"/publicCloud/project/{projectId}/reference/instance/image/{id}":{"get":{"operationId":"getImage","summary":"Get an instance image","description":"Returns one operating system image. Use its `id` in `targetSpec.image` to create or rebuild an instance.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"id","description":"Id","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.reference.instance.Image"}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Compute","Instances","Service references@@@50"],["Public Cloud","Project Management","Service references","Instance@@@24"]],"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(\"/v2/publicCloud/project/{projectId}/reference/instance/image/{id}\")\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/publicCloud/project/{projectId}/reference/instance/image/{id}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/instance/image/get","required":true}],"x-response-identifier":"id"}}},"tags":[{"name":"Reference","x-tag-expanded":false,"description":"Missing description"}]}
