{"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"},"location.TypeEnum":{"type":"string","description":"Typology of the region","enum":["LOCAL-ZONE","REGION-1-AZ","REGION-3-AZ"]},"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.reference.ProductAvailability":{"type":"object","description":"Product type availability (read-only reference data). Groups the offerings of a single product type available to a Public Cloud project. The endpoint returns one group per product type. This is read-only reference data computed from the OVHcloud commercial catalog combined with the project's entitlements. It does not reflect existing resources and triggers no OpenStack call.","properties":{"models":{"type":"array","description":"The offerings of this product type available to the project, each with its per-location availability. Null or empty when no model is available.","nullable":true,"items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityModel"},"readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.ProductTypeEnum"}],"description":"Product type. The product family this group describes. Groups come in this order: INSTANCE, VOLUME, LOADBALANCER, GATEWAY, FLOATING_IP, PUBLIC_IP, VOLUME_SNAPSHOT, VOLUME_BACKUP, INSTANCE_SNAPSHOT, SHARE, SHARE_SNAPSHOT, OBJECT_STORAGE, SWIFT.","readOnly":true}}},"publicCloud.reference.ProductAvailabilityLink":{"type":"object","description":"Product availability link (read-only reference data). A related API v2 operation: what it is (kind) and where to call it (href).","properties":{"href":{"type":"string","description":"The API v2 path to call, including the /v2 prefix and any query string, for example /v2/publicCloud/project/{projectId}/reference/instance/flavor?name=b2-7. Prefix it with the API endpoint the response came from.","readOnly":true},"kind":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityLinkKindEnum"}],"description":"Kind. What the operation is: SPECS returns the technical specifications of the model. QUOTA returns the project's quota in the location.","readOnly":true}}},"publicCloud.reference.ProductAvailabilityLinkKindEnum":{"type":"string","description":"Possible values for the kind of a product availability link relative to its object","enum":["QUOTA","SPECS"]},"publicCloud.reference.ProductAvailabilityLocation":{"type":"object","description":"Describes the availability of a model in a single location: whether the region is activated on the project, stock and quota headroom. Read-only reference data.","properties":{"availabilityZones":{"type":"array","description":"The availability zones within the location, for example eu-west-par-a, eu-west-par-b, eu-west-par-c. Empty for single-AZ regions.","nullable":true,"items":{"type":"string"},"readOnly":true},"links":{"type":"array","description":"Related operations on the location. When quotaStatus is INSUFFICIENT: a QUOTA link to read the quota of the location. Empty otherwise.","items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityLink"},"readOnly":true},"name":{"type":"string","description":"Location name. The region or location identifier, for example GRA11. Identifies the location within a model availability entry.","readOnly":true},"quotaLimitedBy":{"type":"array","description":"Quota limited by. The quota resources without enough room, when quotaStatus is INSUFFICIENT. Empty otherwise.","items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityQuotaResourceEnum"},"readOnly":true},"quotaStatus":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityQuotaStatusEnum"}],"description":"Quota status. Whether the project's quota in the location leaves room for one more unit of the model: one instance with its vCPUs and RAM, one volume, volume snapshot or volume backup of 1 GB, one load balancer, gateway or floating IP, one file storage share of the share type's minimum size, one file storage snapshot. SUFFICIENT or INSUFFICIENT is read from the last quota usage snapshot, which can lag a few minutes behind. SUFFICIENT as well for a product with no tracked quota (public IP, instance snapshot, object storage, Swift) in a region activated on the project. UNKNOWN when the region is not activated on the project or no quota usage is known for it.","readOnly":true},"regionActivated":{"type":"boolean","description":"Whether the region is already activated on the project. When false, the model is sold in the location but the region must be activated on the project before use. This says nothing about stock or quota.","readOnly":true},"stockStatus":{"type":"object","description":"The current stock status of the model in the location, keyed by availability-zone name, for example eu-west-par-a. A 3AZ region has one entry per AZ. single-AZ and localzone regions have a single entry. Present only for the instance product type. Absent for every other product type.","nullable":true,"additionalProperties":{"$ref":"#/components/schemas/publicCloud.reference.StockStatusEnum"},"readOnly":true}}},"publicCloud.reference.ProductAvailabilityModel":{"type":"object","description":"Product model availability (read-only reference data). Describes a single offering of a product type and the locations where it is available for the project. Read-only reference data.","properties":{"links":{"type":"array","description":"Related operations on the model. A SPECS link points to the reference route listing the technical specifications of the product type: the instance flavor route filtered on the model name, the volume type route, the load balancer flavor route, the gateway model route filtered on the model name, the file storage share type route, or the object storage route. Empty for products without specifications (IPs, snapshots, backups, Swift).","items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityLink"},"readOnly":true},"locations":{"type":"array","description":"The locations where this model is available for the project, each with its activation state. Null or empty when the model is available in no location.","nullable":true,"items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailabilityLocation"},"readOnly":true},"name":{"type":"string","description":"The offering name within its product type, to use when creating it: the flavor name for an instance (b3-8, win-b3-8) or a load balancer (SMALL to XL), the volume type for a volume (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2), the model for a gateway (S to 3XL), the share type for file storage (STANDARD_1AZ), the storage class for object storage (STANDARD, STANDARD_IA, HIGH_PERF, GLACIER_IR, DEEP_ARCHIVE). Products sold as a single model (floating IP, public IP, snapshots, backups, Swift) use their product type as model name.","readOnly":true}}},"publicCloud.reference.ProductAvailabilityQuotaResourceEnum":{"type":"string","description":"Possible values for the quota resource that blocks a model in a location","enum":["CORES","FLOATING_IPS","GATEWAYS","INSTANCES","LOADBALANCERS","RAM","SHARES","SHARE_GIGABYTES","SHARE_SNAPSHOTS","VOLUMES","VOLUME_BACKUPS","VOLUME_BACKUP_GIGABYTES","VOLUME_GIGABYTES","VOLUME_SNAPSHOTS"]},"publicCloud.reference.ProductAvailabilityQuotaStatusEnum":{"type":"string","description":"Possible values for the quota status of a model in a location","enum":["INSUFFICIENT","SUFFICIENT","UNKNOWN"]},"publicCloud.reference.ProductTypeEnum":{"type":"string","description":"Product type of a reference availability entry","enum":["FLOATING_IP","GATEWAY","INSTANCE","INSTANCE_SNAPSHOT","LOADBALANCER","OBJECT_STORAGE","PUBLIC_IP","SHARE","SHARE_SNAPSHOT","SWIFT","VOLUME","VOLUME_BACKUP","VOLUME_SNAPSHOT"]},"publicCloud.reference.Region":{"type":"object","description":"A Public Cloud region (read-only reference data)","properties":{"activated":{"type":"boolean","description":"Whether the region is activated on the project. When false, the region exists but has not yet been activated for the project.","readOnly":true},"availabilityZones":{"type":"array","description":"Availability zones in this region","nullable":true,"items":{"type":"string"},"readOnly":true},"continent":{"type":"string","description":"Continent code","readOnly":true},"country":{"type":"string","description":"Country code","nullable":true,"readOnly":true},"datacenterName":{"type":"string","description":"Datacenter display name","nullable":true,"readOnly":true},"name":{"type":"string","description":"Region identifier, for example GRA1","readOnly":true},"objectStorage":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.RegionObjectStorage"}],"description":"Object storage capabilities of the region. Null when the region offers no object storage.","nullable":true,"readOnly":true},"services":{"type":"array","description":"Available services. Includes objectStorage when S3™ object storage is available in the region, that is the region has a non-null objectStorage block whose bareContainerOnly is false.","items":{"type":"string"},"readOnly":true},"status":{"allOf":[{"$ref":"#/components/schemas/publicCloud.reference.RegionStatusEnum"}],"description":"Region status","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/location.TypeEnum"}],"description":"Region type. Null when the catalog reports an unrecognized type.","nullable":true,"readOnly":true}}},"publicCloud.reference.RegionObjectStorage":{"type":"object","description":"Object storage capabilities of a Public Cloud region (read-only reference data)","properties":{"bareContainerOnly":{"type":"boolean","description":"Whether the region only supports bare containers, without the additional bucket features (encryption, versioning, object lock, lifecycle, replication)","readOnly":true},"isReplicationTarget":{"type":"boolean","description":"Whether a bucket in this region can be used as the destination of a replication rule","readOnly":true},"lifecycleTargetClasses":{"type":"array","description":"Storage classes that can be used as a transition target in a lifecycle rule in this region","items":{"$ref":"#/components/schemas/publicCloud.storage.object.StorageClassLifecycleEnum"},"readOnly":true},"replicationSupported":{"type":"boolean","description":"Whether replication rules can be configured on buckets located in this region","readOnly":true},"storageClasses":{"type":"array","description":"Storage classes orderable in this region","items":{"$ref":"#/components/schemas/publicCloud.storage.object.StorageClassEnum"},"readOnly":true}}},"publicCloud.reference.RegionStatusEnum":{"type":"string","description":"Availability status of a cloud region, indicating whether resources can currently be provisioned and operated in it. `ENABLED`: The region is fully available and open for provisioning and operations. `DISABLED`: The region is not available for use. Resources cannot be provisioned in it. `MAINTENANCE`: The region is temporarily under maintenance and some operations may be restricted or unavailable.","enum":["DISABLED","ENABLED","MAINTENANCE"]},"publicCloud.reference.StockStatusEnum":{"type":"string","description":"Stock status of a compute model in a location","enum":["AVAILABLE","LOW","OUT_OF_STOCK"]},"publicCloud.storage.object.StorageClassEnum":{"type":"string","description":"Available S3™ storage classes","enum":["DEEP_ARCHIVE","GLACIER_IR","HIGH_PERF","STANDARD","STANDARD_IA"]},"publicCloud.storage.object.StorageClassLifecycleEnum":{"type":"string","description":"Available S3™ storage classes for lifecycle rules","enum":["DEEP_ARCHIVE","GLACIER_IR","STANDARD","STANDARD_IA"]},"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/productAvailability":{"get":{"operationId":"getProductAvailability","summary":"Get product availability","description":"### Product availability\n\nReturns the products available to this Public Cloud project, grouped by product type.\n\nThis is read-only reference data: the response is computed from the OVHcloud commercial catalog combined with the project's entitlements and its quota usage. It does not reflect existing resources and triggers no OpenStack call.\n\nThe response is an array with one entry per product type, in this order: `INSTANCE`, `VOLUME`, `LOADBALANCER`, `GATEWAY`, `FLOATING_IP`, `PUBLIC_IP`, `VOLUME_SNAPSHOT`, `VOLUME_BACKUP`, `INSTANCE_SNAPSHOT`, `SHARE`, `SHARE_SNAPSHOT`, `OBJECT_STORAGE`, `SWIFT`. Each type group carries its `models`. Each model carries the `locations` where it is sold to the project, in the regions activated on the project and in those the project can activate. Each location reports its availability zones, `regionActivated`, a `quotaStatus` with the quota resources that block it (`quotaLimitedBy`) and, for the `INSTANCE` type only, a `stockStatus` per availability zone.\n\n`links` point to related operations: a `SPECS` link on a model leads to the reference route describing it, and a location whose `quotaStatus` is `INSUFFICIENT` carries a `QUOTA` link.\n\nEvery filter is optional: `type` keeps the group of that product type only, `region` the locations of that region (letter case ignored), `name` the models with exactly that name and `nameContains` the models whose name contains that value (letter case ignored).","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 exact model name filter, for example b3-8","schema":{"type":"string"}},{"in":"query","name":"nameContains","description":"Optional model name filter keeping the names that contain this value, letter case ignored","schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"query","name":"region","description":"Optional region filter, letter case ignored","schema":{"type":"string"}},{"in":"query","name":"type","description":"Optional product type filter","schema":{"$ref":"#/components/schemas/publicCloud.reference.ProductTypeEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.reference.ProductAvailability"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Project Management","Service references@@@5"],["Public Cloud","Compute","Instances","Service references@@@10"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/v2/publicCloud/project/{projectId}/reference/productAvailability\")\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/productAvailability\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/productAvailability/get","required":true}],"x-response-identifier":"type"}},"/publicCloud/project/{projectId}/reference/region":{"get":{"operationId":"getRegions","summary":"List regions","description":"Returns the regions with their type, status, location and available services.","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"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.reference.Region"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Project Management","Service references@@@10"]],"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/publicCloud/project/{projectId}/reference/region\")\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/region\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/region/get","required":true}],"x-response-identifier":"name","x-expanded-response":"PublicCloudReferenceRegion"}},"/publicCloud/project/{projectId}/reference/region/{name}":{"get":{"operationId":"getRegion","summary":"Get a region","description":"Returns one region: its availability zones, location, status and available services, including its object storage capabilities.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"name","description":"Name","required":true,"schema":{"type":"string"}},{"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.Region"}}}},"404":{"description":"Error 404 response","content":{"application/json":{"schema":{"type":"object","description":"Common error model","properties":{"class":{"type":"string","description":"Class of the error"},"message":{"type":"string","description":"Error message"}}},"examples":{"Client::NotFound::ResourceDoesNotExist":{"value":{"class":"Client::NotFound::ResourceDoesNotExist","message":"Resource not found"}}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Public Cloud","Project Management","Service references@@@13"]],"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/publicCloud/project/{projectId}/reference/region/{name}\")\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/region/{name}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:reference/region/get","required":true}],"x-response-identifier":"name"}}},"tags":[{"name":"Reference","x-tag-expanded":false,"description":"Missing description"}]}
