{"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.storage.object.BucketObjectLockModeEnum":{"type":"string","description":"Object lock retention modes","enum":["COMPLIANCE","GOVERNANCE"]},"publicCloud.storage.object.PresignedURLMethodEnum":{"type":"string","description":"Possible HTTP methods for a presigned URL","enum":["DELETE","GET","PUT"]},"publicCloud.storage.object.S3BulkDeleteBody":{"type":"object","description":"Payload to bulk delete objects from an S3™ compatible bucket","properties":{"objects":{"type":"array","description":"Objects to delete","items":{"$ref":"#/components/schemas/publicCloud.storage.object.S3BulkDeleteObjectIdentifier"}}},"required":["objects"]},"publicCloud.storage.object.S3BulkDeleteError":{"type":"object","description":"A failed deletion in a bulk delete operation","properties":{"code":{"type":"string","description":"Error code from S3","readOnly":true},"key":{"type":"string","description":"Object key","readOnly":true},"message":{"type":"string","description":"Error message","readOnly":true},"versionId":{"type":"string","description":"Identifier of the version","nullable":true,"readOnly":true}}},"publicCloud.storage.object.S3BulkDeleteObjectIdentifier":{"type":"object","description":"Identifier for an object to delete in a bulk delete operation","properties":{"key":{"type":"string","description":"Object key"},"versionId":{"type":"string","description":"Identifier of the version","nullable":true}},"required":["key"]},"publicCloud.storage.object.S3BulkDeleteResult":{"type":"object","description":"Result of a bulk delete operation on S3™ compatible objects","properties":{"deleted":{"type":"array","description":"Successfully deleted objects","items":{"$ref":"#/components/schemas/publicCloud.storage.object.S3BulkDeletedObject"},"readOnly":true},"errors":{"type":"array","description":"Failed deletions","items":{"$ref":"#/components/schemas/publicCloud.storage.object.S3BulkDeleteError"},"readOnly":true}}},"publicCloud.storage.object.S3BulkDeletedObject":{"type":"object","description":"A successfully deleted object in a bulk delete operation","properties":{"deleteMarkerVersionId":{"type":"string","description":"Version identifier of the delete marker created by the deletion","nullable":true,"readOnly":true},"key":{"type":"string","description":"Object key","readOnly":true},"versionId":{"type":"string","description":"Identifier of the version","nullable":true,"readOnly":true},"wasADeleteMarker":{"type":"boolean","description":"Whether the deleted object was a delete marker","nullable":true,"readOnly":true}}},"publicCloud.storage.object.S3Object":{"type":"object","description":"An object stored in an S3™ compatible bucket","properties":{"etag":{"type":"string","description":"Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.","nullable":true,"readOnly":true},"isCommonPrefix":{"type":"boolean","description":"Whether this entry represents a common prefix (virtual directory)","nullable":true,"readOnly":true},"isDeleteMarker":{"type":"boolean","description":"Whether this version is a delete marker","nullable":true,"readOnly":true},"isLatest":{"type":"boolean","description":"Whether this is the latest version of the object","nullable":true,"readOnly":true},"key":{"type":"string","description":"Object key (path within the bucket)","readOnly":true},"lastModifiedAt":{"type":"string","description":"Last modification timestamp. Omitted when the entry is a common prefix.","nullable":true,"format":"date-time","readOnly":true},"legalHold":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectLegalHoldStatusEnum"}],"description":"Object legal hold status","nullable":true,"readOnly":true},"lock":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectLock"}],"description":"Object lock retention configuration","nullable":true,"readOnly":true},"replicationStatus":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectReplicationStatusEnum"}],"description":"Replication status of the object","nullable":true,"readOnly":true},"restoreStatus":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectRestoreStatus"}],"description":"Restore status for archived objects","nullable":true,"readOnly":true},"size":{"type":"integer","description":"Object size in bytes","readOnly":true},"storageClass":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.StorageClassEnum"}],"description":"Storage class of the object. Omitted when the entry is a delete marker or a common prefix.","nullable":true,"readOnly":true},"versionId":{"type":"string","description":"Identifier of the version","nullable":true,"readOnly":true}}},"publicCloud.storage.object.S3ObjectLegalHoldStatusEnum":{"type":"string","description":"Object legal hold status","enum":["OFF","ON"]},"publicCloud.storage.object.S3ObjectLock":{"type":"object","description":"Object lock retention configuration for an S3™ compatible object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.BucketObjectLockModeEnum"}],"description":"Lock retention mode"},"retainUntil":{"type":"string","description":"Date until which the object is locked","format":"date-time"}},"required":["mode","retainUntil"]},"publicCloud.storage.object.S3ObjectPresignedURL":{"type":"object","description":"A presigned URL for S3™ compatible object access","properties":{"expiresAt":{"type":"string","description":"URL expiration timestamp","format":"date-time","readOnly":true},"key":{"type":"string","description":"Object key","readOnly":true},"method":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.PresignedURLMethodEnum"}],"description":"Presigned URL method","readOnly":true},"signedHeaders":{"type":"object","description":"Headers you must send with the request, exactly as returned here. The signature covers them, so changing or omitting one makes the request be refused.","additionalProperties":{"type":"string"},"readOnly":true},"url":{"type":"string","description":"Presigned URL for object access","readOnly":true},"versionId":{"type":"string","description":"Identifier of the version","nullable":true,"readOnly":true}}},"publicCloud.storage.object.S3ObjectPresignedURLCreation":{"type":"object","description":"Request body for creating a presigned URL for S3™ compatible object access","properties":{"expiresIn":{"type":"integer","description":"URL expiration time in seconds. When omitted, one hour (3600).","nullable":true},"key":{"type":"string","description":"Object key of new object or existing object to access"},"method":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.PresignedURLMethodEnum"}],"description":"HTTP method for the presigned URL"},"storageClass":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.StorageClassEnum"}],"description":"Storage class for PUT uploads","nullable":true},"versionId":{"type":"string","description":"Identifier of the object version","nullable":true}},"required":["key","method"]},"publicCloud.storage.object.S3ObjectReplicationStatusEnum":{"type":"string","description":"Object replication status","enum":["COMPLETED","FAILED","NONE","PENDING","REPLICA"]},"publicCloud.storage.object.S3ObjectRestoreStatus":{"type":"object","description":"Restore status of an archived S3™ compatible object","properties":{"expiresAt":{"type":"string","description":"Expiration date of the restored copy","nullable":true,"format":"date-time","readOnly":true},"inProgress":{"type":"boolean","description":"Whether a restore operation is currently in progress","readOnly":true}}},"publicCloud.storage.object.S3ObjectUpdate":{"type":"object","description":"Request body for updating an S3™ compatible object or object version lock and legal hold","properties":{"legalHold":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectLegalHoldStatusEnum"}],"description":"Object legal hold status","nullable":true},"lock":{"allOf":[{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectLock"}],"description":"Object lock retention configuration","nullable":true}}},"publicCloud.storage.object.StorageClassEnum":{"type":"string","description":"Available S3™ storage classes","enum":["DEEP_ARCHIVE","GLACIER_IR","HIGH_PERF","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}/storage/object/bucket/{bucketName}/bulkDeleteObjects":{"post":{"operationId":"bulkDeleteBucketObjects","summary":"Delete several objects","description":"Deletes a list of objects in one request. To delete a large number of objects, use lifecycle rules instead.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3BulkDeleteBody"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3BulkDeleteResult"}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@45"]],"x-badges":[{"color":"blue","label":"Alpha 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: publicCloud.storage.object.S3BulkDeleteBody\nresult = client.post(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/bulkDeleteObjects\",\n\tobjects = None, # Objects to delete (type: array)\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: publicCloud.storage.object.S3BulkDeleteBody\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/bulkDeleteObjects\", array(\n\tobjects => null, // Objects to delete (type: array)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/bulkDeleteObjects","required":true}]}},"/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object":{"get":{"operationId":"getBucketObjects","summary":"List objects","description":"Returns the objects of the bucket. Filter by key prefix, and group keys with a delimiter.","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":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"query","name":"delimiter","description":"Delimiter for grouping keys into common prefixes. Defaults to /.","schema":{"type":"string"}},{"in":"query","name":"prefix","description":"Filter objects whose keys begin with this prefix","schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}},{"in":"query","name":"withVersions","description":"Include all object versions and delete markers","schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/publicCloud.storage.object.S3Object"}}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@10"]],"x-badges":[{"color":"blue","label":"Alpha 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}/storage/object/bucket/{bucketName}/object\")\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}/storage/object/bucket/{bucketName}/object\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/object/get","required":true}],"x-response-identifier":"key","x-expanded-response":"PublicCloudStorageObjectS3Object"}},"/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}":{"delete":{"operationId":"deleteBucketObject","summary":"Delete an object","description":"Deletes the object. On a versioned bucket, adds a delete marker instead of removing the object.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","description":"Key","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.storage.object.S3Object"}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@40"]],"x-badges":[{"color":"blue","label":"Alpha version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.delete(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->delete(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/object/delete","required":true}]},"get":{"operationId":"getBucketObject","summary":"Get object metadata","description":"Returns the object metadata, without its content.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","description":"Key","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.storage.object.S3Object"}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@20"]],"x-badges":[{"color":"blue","label":"Alpha 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}/storage/object/bucket/{bucketName}/object/{key}\")\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}/storage/object/bucket/{bucketName}/object/{key}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/object/get","required":true}],"x-response-identifier":"key"},"put":{"operationId":"editBucketObject","summary":"Update object lock or legal hold","description":"Sets the retention period or the legal hold of the object. A locked object cannot be deleted or overwritten.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"path","name":"key","description":"Key","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectUpdate"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3Object"}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@30"]],"x-badges":[{"color":"blue","label":"Alpha 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: publicCloud.storage.object.S3ObjectUpdate\nresult = client.put(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}\",\n\tlegalHold = None, # Object legal hold status (type: publicCloud.storage.object.S3ObjectLegalHoldStatusEnum, nullable)\n\tlock = None, # Object lock retention configuration (type: publicCloud.storage.object.S3ObjectLock, nullable)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.storage.object.S3ObjectUpdate\n$result = $ovh->put(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}\", array(\n\tlegalHold => null, // Object legal hold status (type: publicCloud.storage.object.S3ObjectLegalHoldStatusEnum, nullable)\n\tlock => null, // Object lock retention configuration (type: publicCloud.storage.object.S3ObjectLock, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/object/edit","required":true}]}},"/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/presign":{"post":{"operationId":"createBucketPresignedUrl","summary":"Create a presigned URL","description":"Creates a temporary URL to download or upload an object without credentials. The URL expires after the given time.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"bucketName","description":"Bucket name","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","description":"Project ID","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectPresignedURLCreation"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/publicCloud.storage.object.S3ObjectPresignedURL"}}}},"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::BucketDoesNotExist":{"value":{"class":"Client::NotFound::BucketDoesNotExist","message":"S3 bucket not found"}}}}}}},"tags":["Storage","Object"],"x-developer-hub-navigation":[["Public Cloud","Storage","Object Storage","Object Management@@@47"]],"x-badges":[{"color":"blue","label":"Alpha 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: publicCloud.storage.object.S3ObjectPresignedURLCreation\nresult = client.post(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/presign\",\n\texpiresIn = None, # URL expiration time in seconds. When omitted, one hour (3600). (type: integer, nullable)\n\tkey = None, # Object key of new object or existing object to access (type: string)\n\tmethod = None, # HTTP method for the presigned URL (type: publicCloud.storage.object.PresignedURLMethodEnum)\n\tstorageClass = None, # Storage class for PUT uploads (type: publicCloud.storage.object.StorageClassEnum, nullable)\n\tversionId = None, # Identifier of the object version (type: string, nullable)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: publicCloud.storage.object.S3ObjectPresignedURLCreation\n$result = $ovh->post(\"/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/presign\", array(\n\texpiresIn => null, // URL expiration time in seconds. When omitted, one hour (3600). (type: integer, nullable)\n\tkey => null, // Object key of new object or existing object to access (type: string)\n\tmethod => null, // HTTP method for the presigned URL (type: publicCloud.storage.object.PresignedURLMethodEnum)\n\tstorageClass => null, // Storage class for PUT uploads (type: publicCloud.storage.object.StorageClassEnum, nullable)\n\tversionId => null, // Identifier of the object version (type: string, nullable)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"publicCloudProject:apiovh:storage/object/bucket/presign/create","required":true}]}}},"tags":[{"name":"Storage","x-tag-expanded":false,"description":"Missing description"},{"name":"Object","x-tag-expanded":false,"description":"Missing description"}]}
