# Versions

Metadata about all Versions of the Objects in a Bucket

## ListObjectVersions

> \<p>Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.\</p> \<important> \<p> To use this operation, you must have permissions to perform the \`ListBucketVersions\` operation. Be aware of the name difference. \</p> \</important> \<note> \<p> A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.\</p> \</note> \<p>To use this operation, you must have READ access to the bucket.\</p>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Object Storage API for contract-owned buckets","version":"2.0.3"},"tags":[{"name":"Versions","description":"Metadata about all Versions of the Objects in a Bucket"}],"servers":[{"url":"https://s3.eu-central-3.ionoscloud.com","description":"The endpoint for the `eu-central-3` region (Berlin, Germany)"},{"url":"https://s3.us-central-1.ionoscloud.com","description":"The endpoint for the `us-central-1` region (Lenexa, USA)"}],"security":[{"hmac":[]}],"components":{"securitySchemes":{"hmac":{"type":"apiKey","name":"Authorization","in":"header","description":"IONOS Object Storage API requests are authenticated using the AWS signature. \nThe IONOS Object Storage API authenticates users using a customized HTTP scheme based on a [keyed-HMAC](https://en.wikipedia.org/wiki/HMAC) (Hash Message Authentication Code).\nThe process of generating the proper Authorization header is somewhat involved. We recommend that you make use of a tool such as Postman.\n\n<img src=\"/docs/s3/hmac-postman.png\" width=\"800px\" />\n\nIn the **Authorization** tab for a request, select **AWS Signature** from the **Type** dropdown list.\nSpecify where Postman should append your authorization data using the **Add authorization data to** drop-down menu.\n\n* If you select **Request Headers**, Postman populates the **Headers** tab with Authorization and `X-Amz-` prefixed fields.\n\n* If you select **Request URL**, Postman populates the **Params** tab with authentication details prefixed with `X-Amz-`.\n\n\n**Note:** The parameters listed below contain confidential information. We recommend using variables to keep this data secure while working in a collaborative environment.\n\n* For **Access Key**, enter your `access key` directly in the fields or through variables for added security.\n\n* For **Secret Key**, enter your `secret key` directly in the fields or through variables for added security.\n\nAdvanced fields are optional, but Postman will attempt to generate them automatically if necessary.\n* For **AWS Region**, enter one of the [regions](#section/Endpoints) (`eu-central-3`) where your bucket is hosted.\n\n* For **Service Name**, enter `s3`. The name of the service that receives the requests.\n\n* For **Session Token**, **leave the field blank**. This is only required when temporary security credentials are used.\n"}},"schemas":{"ListObjectVersionsOutput":{"type":"object","properties":{"IsTruncated":{"$ref":"#/components/schemas/IsTruncated"},"KeyMarker":{"description":"Marks the last key returned in a truncated response.","type":"string"},"VersionIdMarker":{"description":"Marks the last version of the key returned in a truncated response.","type":"string"},"NextKeyMarker":{"description":"When the number of responses exceeds the value of `MaxKeys`, `NextKeyMarker` specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.","type":"string"},"NextVersionIdMarker":{"description":"When the number of responses exceeds the value of `MaxKeys`, `NextVersionIdMarker` specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.","type":"string"},"Versions":{"$ref":"#/components/schemas/ObjectVersionList"},"Name":{"$ref":"#/components/schemas/BucketName"},"Prefix":{"description":"Selects objects that start with the value supplied by this parameter.","type":"string","minLength":1,"maxLength":1024},"Delimiter":{"allOf":[{"$ref":"#/components/schemas/Delimiter"}],"description":"The delimiter grouping the included keys. A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in `CommonPrefixes`. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response."},"MaxKeys":{"allOf":[{"$ref":"#/components/schemas/MaxKeys"}]},"CommonPrefixes":{"allOf":[{"$ref":"#/components/schemas/CommonPrefixList"}]},"EncodingType":{"$ref":"#/components/schemas/EncodingType"}}},"IsTruncated":{"type":"boolean","description":"A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.","enum":[true,false]},"ObjectVersionList":{"description":"Container for version information.","type":"array","items":{"$ref":"#/components/schemas/ObjectVersion"},"xml":{"wrapped":false}},"ObjectVersion":{"description":"The version of an object.","type":"object","properties":{"ETag":{"$ref":"#/components/schemas/ETag"},"Size":{"$ref":"#/components/schemas/Size"},"StorageClass":{"$ref":"#/components/schemas/ObjectVersionStorageClass"},"Key":{"$ref":"#/components/schemas/ObjectKey"},"VersionId":{"description":"Version ID of an object.","type":"string"},"IsLatest":{"description":"Specifies whether the object is (true) or is not (false) the latest version of an object.","type":"boolean"},"LastModified":{"$ref":"#/components/schemas/LastModified"},"Owner":{"$ref":"#/components/schemas/Owner"}}},"ETag":{"description":"Entity tag that identifies the object's data.\nObjects with different object data will have different entity\ntags. The entity tag is an opaque string. The entity tag may or\nmay not be an MD5 digest of the object data. If the entity tag\nis not an MD5 digest of the object data, it will contain one or\nmore nonhexadecimal characters and/or will consist of less than\n32 or more than 32 hexadecimal digits.\n","type":"string"},"Size":{"description":"Size in bytes of the object","type":"integer","minimum":0,"maximum":5497558138880},"ObjectVersionStorageClass":{"type":"string","enum":["STANDARD"]},"ObjectKey":{"description":"The object key.","type":"string","minLength":1,"maxLength":1024},"LastModified":{"description":"Creation date of the object.","type":"string","format":"date-time"},"Owner":{"type":"object","description":"Container for the owner's ID and display name.","properties":{"ID":{"$ref":"#/components/schemas/ID"},"DisplayName":{"$ref":"#/components/schemas/DisplayName"}},"xml":{"name":"Owner"}},"ID":{"type":"integer","description":"Container for the Contract Number of the owner.","xml":{"name":"ID"}},"DisplayName":{"type":"string","description":"Container for the display name of the owner.","xml":{"name":"DisplayName"}},"BucketName":{"description":"The bucket name.","type":"string","minLength":3,"maxLength":63,"xml":{"name":"Name"}},"Delimiter":{"type":"string"},"MaxKeys":{"description":"The maximum number of keys returned in the response. By default the operation returns up to 1000 key names. The response might contain fewer keys but will never contain more.","type":"integer","default":1000,"minimum":1,"maximum":1000},"CommonPrefixList":{"description":"All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.","type":"array","items":{"$ref":"#/components/schemas/CommonPrefix"},"xml":{"wrapped":false}},"CommonPrefix":{"description":"Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is `notes/` and the delimiter is a slash (`/``) as in `notes/summer/july``, the common prefix is `notes/summer/``.","type":"object","properties":{"Prefix":{"$ref":"#/components/schemas/Prefix"}}},"Prefix":{"description":"Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.","type":"string","minLength":1,"maxLength":1024},"EncodingType":{"type":"string","enum":["url"],"description":"Encoding type used by IONOS Object Storage to encode object key names\nin the XML response. If you specify encoding-type request\nparameter, IONOS Object Storage includes this element in the response, and\nreturns encoded key name values in the following response\nelements: `KeyMarker`, `NextKeyMarker`, `Prefix`,\n`Key`, and `Delimiter`.\n"}}},"paths":{"/{Bucket}?versions":{"get":{"tags":["Versions"],"summary":"ListObjectVersions","operationId":"ListObjectVersions","description":"<p>Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.</p> <important> <p> To use this operation, you must have permissions to perform the `ListBucketVersions` operation. Be aware of the name difference. </p> </important> <note> <p> A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.</p> </note> <p>To use this operation, you must have READ access to the bucket.</p>","responses":{"200":{"description":"Success","headers":{},"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/ListObjectVersionsOutput"}}}}},"parameters":[{"name":"Bucket","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BucketName"}},{"name":"delimiter","in":"query","required":false,"description":"A delimiter is a character that you specify to group keys. All keys that contain the same string between the `prefix` and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.","schema":{"type":"string"}},{"name":"encoding-type","in":"query","required":false,"description":"","schema":{"type":"string","enum":["url"],"description":"Requests IONOS Object Storage to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that IONOS Object Storage encode the keys in the response."}},{"name":"key-marker","in":"query","required":false,"description":"Specifies the key to start with when listing objects in a bucket.","schema":{"type":"string"}},{"name":"max-keys","in":"query","required":false,"description":"Sets the maximum number of keys returned in the response. By default the operation returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains &lt;isTruncated&gt;true&lt;/isTruncated&gt;. To return the additional keys, see key-marker and version-id-marker.","schema":{"type":"integer"}},{"name":"prefix","in":"query","required":false,"description":"Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes. ","schema":{"type":"string"}},{"name":"version-id-marker","in":"query","required":false,"description":"Specifies the object version you want to start listing from.","schema":{"type":"string"}},{"name":"MaxKeys","in":"query","schema":{"type":"string"},"description":"Pagination limit","required":false},{"name":"KeyMarker","in":"query","schema":{"type":"string"},"description":"Pagination token","required":false},{"name":"VersionIdMarker","in":"query","schema":{"type":"string"},"description":"Pagination token","required":false},{"name":"versions","in":"query","required":true,"schema":{"type":"boolean","enum":[true]},"allowEmptyValue":true}]}}}}
```
