{"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"},"observability.setting.infrastructure.CertificationLevelEnum":{"type":"string","description":"Certification level","enum":["HDS","PCI_DSS","SNC","SOC2","STANDARD","TRUSTED_ZONE"]},"okms.KeyCurveEnum":{"type":"string","description":"Key curve","enum":["P-256","P-384","P-521"]},"okms.KeyOpsEnum":{"type":"string","description":"Key operations","enum":["decrypt","encrypt","sign","unwrapKey","verify","wrapKey"]},"okms.KeyProtectionLevelEnum":{"type":"string","description":"Key protection level","enum":["HSM","SOFTWARE"]},"okms.KeySizeEnum":{"type":"integer","description":"The size of a key","enum":[128,192,256,384,521,2048,3072,4096]},"okms.KeyTypeEnum":{"type":"string","description":"Cryptographic algorithm family used with the key","enum":["EC","RSA","oct"]},"okms.RegionEnum":{"type":"string","description":"Region","enum":["ap-south-mum","ap-southeast-sgp","ap-southeast-syd","ca-east-bhs","ca-east-tor","eu-central-waw","eu-south-mil","eu-west-eri","eu-west-gra","eu-west-lim","eu-west-par","eu-west-rbx","eu-west-sbg"]},"okms.reference.Region":{"type":"object","description":"Region information","properties":{"certifications":{"type":"array","description":"Certifications of the region","items":{"$ref":"#/components/schemas/observability.setting.infrastructure.CertificationLevelEnum"},"readOnly":true},"id":{"allOf":[{"$ref":"#/components/schemas/okms.RegionEnum"}],"description":"Name of the region","readOnly":true},"kmipEndpoint":{"type":"string","description":"KMS kmip API endpoint","readOnly":true},"restEndpoint":{"type":"string","description":"KMS rest API endpoint","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/location.TypeEnum"}],"description":"General typology of the region","readOnly":true}}},"okms.reference.secretConfig.Response":{"type":"object","description":"Secret engine default configuration","properties":{"casRequired":{"type":"boolean","description":"The cas parameter will be required for all write requests if set to true","readOnly":true},"maxVersions":{"type":"integer","description":"The number of versions to keep","readOnly":true}}},"okms.reference.serviceKey.Curve":{"type":"object","description":"Service key curve reference","properties":{"default":{"type":"boolean","description":"Is default service key curve for type?","readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/okms.KeyCurveEnum"}],"description":"Service key curve for type","readOnly":true}}},"okms.reference.serviceKey.Operations":{"type":"object","description":"Service key operations reference","properties":{"default":{"type":"boolean","description":"Is default service key operations for type?","readOnly":true},"value":{"type":"array","description":"Service key operations for type","items":{"$ref":"#/components/schemas/okms.KeyOpsEnum"},"readOnly":true}}},"okms.reference.serviceKey.ProtectionLevel":{"type":"object","description":"Service key protection level reference","properties":{"default":{"type":"boolean","description":"Is default service key protection level ?","readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/okms.KeyProtectionLevelEnum"}],"description":"Service key protection level","readOnly":true}}},"okms.reference.serviceKey.Response":{"type":"object","description":"Service key type, size, curve, operations and protectionLevel combination","properties":{"curves":{"type":"array","description":"Allowed service key curves for type","items":{"$ref":"#/components/schemas/okms.reference.serviceKey.Curve"},"readOnly":true},"default":{"type":"boolean","description":"Is default service key type?","readOnly":true},"operations":{"type":"array","description":"Allowed service key operations for type","items":{"$ref":"#/components/schemas/okms.reference.serviceKey.Operations"},"readOnly":true},"protectionLevel":{"type":"array","description":"Allowed protection level for type","items":{"$ref":"#/components/schemas/okms.reference.serviceKey.ProtectionLevel"},"readOnly":true},"sizes":{"type":"array","description":"Allowed service key sizes for type","items":{"$ref":"#/components/schemas/okms.reference.serviceKey.Size"},"readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/okms.KeyTypeEnum"}],"description":"Service key type","readOnly":true}}},"okms.reference.serviceKey.Size":{"type":"object","description":"Service key size reference","properties":{"default":{"type":"boolean","description":"Is default service key size for type?","readOnly":true},"value":{"allOf":[{"$ref":"#/components/schemas/okms.KeySizeEnum"}],"description":"Service key size for type","readOnly":true}}},"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":{"/okms/reference/regions":{"get":{"operationId":"getOkmsReferenceRegions","summary":"List regions","description":"Returns the regions where a service can be ordered, with their certifications and the KMIP and REST endpoints of each.","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"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/okms.reference.Region"}},"examples":{"Get region information example":{"value":[{"certifications":["PCI_DSS"],"id":"eu-west-rbx","kmipEndpoint":"example.org:5697","restEndpoint":"https://example.org","type":"REGION-1-AZ"}],"summary":"Response body containing region information"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","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/okms/reference/regions\")\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/okms/reference/regions\");\n\nprint_r($result);\n?>"}],"x-response-identifier":"id"}},"/okms/reference/secretConfig":{"get":{"operationId":"getOkmsReferenceSecretConfig","summary":"Get the default secret configuration","description":"Returns the default secret settings of a region: whether `cas` is required and the number of versions to keep.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"query","name":"region","description":"OKMS Region","required":true,"schema":{"$ref":"#/components/schemas/okms.RegionEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/okms.reference.secretConfig.Response"},"examples":{"Get secret engine default configuration":{"value":{"casRequired":false,"maxVersions":10},"summary":"Response body containing secret engine default configuration"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","References@@@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/okms/reference/secretConfig\")\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/okms/reference/secretConfig\");\n\nprint_r($result);\n?>"}]}},"/okms/reference/serviceKey":{"get":{"operationId":"getOkmsReferenceServiceKey","summary":"Get valid service key parameters combinations","description":"Returns the valid combinations of key type, size, curve, operations and protection level for a region. Use it before creating or importing a service key.","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":"region","description":"OKMS Region","required":true,"schema":{"$ref":"#/components/schemas/okms.RegionEnum"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/okms.reference.serviceKey.Response"}},"examples":{"Get service key type, size, curve and operations combination":{"value":[{"curves":[],"default":true,"operations":[{"default":true,"value":["encrypt","decrypt"]},{"default":false,"value":["wrapKey","unwrapKey"]}],"protectionLevel":[{"default":true,"value":"SOFTWARE"},{"default":false,"value":"HSM"}],"sizes":[{"default":false,"value":128},{"default":false,"value":192},{"default":true,"value":256}],"type":"oct"},{"curves":[{"default":true,"value":"P-256"},{"default":false,"value":"P-384"},{"default":false,"value":"P-521"}],"default":false,"operations":[{"default":true,"value":["sign","verify"]}],"protectionLevel":[{"default":true,"value":"SOFTWARE"},{"default":false,"value":"HSM"}],"sizes":[],"type":"EC"},{"curves":[],"default":false,"operations":[{"default":true,"value":["sign","verify"]}],"protectionLevel":[{"default":true,"value":"SOFTWARE"},{"default":false,"value":"HSM"}],"sizes":[{"default":true,"value":2048},{"default":false,"value":3072},{"default":false,"value":4096}],"type":"RSA"}],"summary":"Response body containing service key type, size, curve and operations combination"}}}}}},"tags":["Reference"],"x-developer-hub-navigation":[["Manage & operate","Key and Secret Manager","References@@@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(\"/v2/okms/reference/serviceKey\")\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/okms/reference/serviceKey\");\n\nprint_r($result);\n?>"}]}}},"tags":[{"name":"Reference","x-tag-expanded":false,"description":"Missing description"}]}
