### Schema: Start Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Schema definition for Start ```markdown ## Schema: Start Schema definition for Start **Type:** integer ``` -------------------------------- ### GET /{Bucket} Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. 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. This version (v1) uses a `marker` parameter to list objects starting with a given object. Version 2 of this API provides a continuation token instead, making it a bit more straightforward to chain listing requests for buckets with large numbers of objects. ```markdown ### Parameters - **Bucket** (string, path, required): The name of the bucket to be listed. - **delimiter** (string, query, optional): A delimiter is a character you use to group keys. - **encoding-type** (string (url), query, optional) - **marker** (string, query, optional): Specifies the key to start with when listing objects in a bucket. - **max-keys** (integer, query, optional): Sets the maximum number of keys returned in the response. By default the API returns up to 1,000 key names. The response might contain fewer keys but will never contain more. - **prefix** (string, query, optional): Limits the response to keys that begin with the specified prefix. ### Responses #### 200 - Success **ListObjectsOutput** - **IsTruncated** (boolean): A flag that indicates whether IBM COS returned all of the results that satisfied the search criteria. - **Marker** (string): Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request. - **NextMarker** (string): When response is truncated (the `IsTruncated` element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. IBM COS lists objects in alphabetical order. **Note:** This element is returned only if you have delimiter request parameter specified. If response does not include the `NextMarker` and it is truncated, you can use the value of the last key in the response as the marker in the subsequent request to get the next set of object keys. - **Contents** (array (Object)): Metadata about each object returned. Array items: - **Key** (string): The name that you assign to an object. You use the object key to retrieve the object. - **LastModified** (string (date-time)): The date the Object was Last Modified - **ETag** (string):
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.
All of the keys rolled up in a common prefix count as a single return when calculating the number of returns.
A response can contain CommonPrefixes only if you specify a delimiter.
CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by the 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/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.
Array items: - **Prefix** (string): Container for the specified common prefix. - **EncodingType** (string (url)): Encoding type used by IBM COS to encode object keys in the response. ("url") #### 404 - NoSuchBucket **NoSuchBucket** ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?delimiter=string&encoding-type=url&marker=string&max-keys=0&prefix=string" ``` ``` -------------------------------- ### GET /{Bucket}?website Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns the website configuration for a bucket. ```markdown ### Parameters - **Bucket** (string, path, required): The bucket name for which to get the website configuration. - **website** (boolean, query, required) ### Responses #### 200 - Success **GetBucketWebsiteOutput** - **RedirectAllRequestsTo** (object): Specifies the redirect behavior of all requests to a website endpoint of an IBM COS bucket. - **HostName** (string) (required): Name of the host where requests are redirected. - **Protocol** (string (http|https)): Protocol to use when redirecting requests. The default is the protocol that is used in the original request. ("http"|"https") - **IndexDocument** (object): The name of the index document for the website (for example `index.html`). - **Suffix** (string) (required): A suffix that is appended to a request that is for a directory on the website endpoint (for example,if the suffix is index.html and you make a request to samplebucket/images/ the data that is returned will be for the object with the key name images/index.html) The suffix must not be empty and must not include a slash character. - **ErrorDocument** (object): The object key name of the website error document to use for 4XX class errors. - **Key** (string) (required): The object key name to use when a 4XX class error occurs. - **RoutingRules** (array (union)): Rules that define when a redirect is applied and the redirect behavior. Array items: - **Condition** (object): A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the `/docs` folder, redirect to the `/documents` folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error. - **HttpErrorCodeReturnedEquals** (string): The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element `Condition` is specified and sibling `KeyPrefixEquals` is not specified. If both are specified, then both must be true for the redirect to be applied. - **KeyPrefixEquals** (string): The object key name prefix when the redirect is applied. For example, to redirect requests for `ExamplePage.html`, the key prefix will be `ExamplePage.html`. To redirect request for all pages with the prefix `docs/`, the key prefix will be `/docs`, which identifies all objects in the `docs/` folder. Required when the parent element `Condition` is specified and sibling `HttpErrorCodeReturnedEquals` is not specified. If both conditions are specified, both must be true for the redirect to be applied. - **Redirect** (object) (required): Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return. - **HostName** (string): The host name to use in the redirect request. - **HttpRedirectCode** (string): The HTTP redirect code to use on the response. Not required if one of the siblings is present. - **Protocol** (string (http|https)): Protocol to use when redirecting requests. The default is the protocol that is used in the original request. ("http"|"https") - **ReplaceKeyPrefixWith** (string): The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix `docs/` (objects in the `docs/` folder) to `documents/`, you can set a condition block with `KeyPrefixEquals` set to `docs/` and in the Redirect set `ReplaceKeyPrefixWith` to `/documents`. Not required if one of the siblings is present. Can be present only if `ReplaceKeyWith` is not provided. - **ReplaceKeyWith** (string): The specific object key to use in the redirect request. For example, redirect request to `error.html`. Not required if one of the siblings is present. Can be present only if `ReplaceKeyPrefixWith` is not provided. ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?website?website=true" ``` ``` -------------------------------- ### PUT /{Bucket}?cors Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Sets the CORS configuration for your bucket. If the configuration exists, it will be overwritten and replaced. You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is `http://www.example.com` to access your bucket at `my.example.bucket.com` by using `XMLHttpRequest` in a browser. To enable cross-origin resource sharing (CORS) on a bucket, you create a XML configuration in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size. When IBM COS receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the CORS configuration on the bucket and uses the first `CORSRule` rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met: * The request's `Origin` header must match `AllowedOrigin` elements. * The request method (for example, GET, PUT, HEAD, and so on) or the `Access-Control-Request-Method` header in case of a pre-flight `OPTIONS` request must be one of the `AllowedMethod` elements. * Every header specified in the `Access-Control-Request-Headers` request header of a pre-flight request must match an `AllowedHeader` element. ```markdown ### Parameters - **Bucket** (string, path, required): Specifies the bucket impacted by the CORS configuration. - **Content-MD5** (string, header, optional): The base64-encoded 128-bit MD5 digest of the payload (just the request body without the headers) according to [RFC 1864](http://www.ietf.org/rfc/rfc1864.txt). This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, it is recommended to use the Content-MD5 mechanism as an end-to-end integrity check. - **cors** (boolean, query, required) ### Request Body **Content-Type:** text/xml - **CORSConfiguration** (object) (required): Describes the cross-origin access configuration for objects in an IBM COS bucket. - **CORSRules** (array (CORSRule)) Array items: - **AllowedHeaders** (array (AllowedHeader)): Headers that are specified in the `Access-Control-Request-Headers` header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, IBM COS returns any requested headers that are allowed. - **AllowedMethods** (array (AllowedMethod)) (required): An HTTP method that you allow the origin to execute. Valid values are `GET`, `PUT`, `HEAD`, `POST`, and `DELETE`. - **AllowedOrigins** (array (AllowedOrigin)) (required): One or more origins you want customers to be able to access the bucket from. - **ExposeHeaders** (array (ExposeHeader)): One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript `XMLHttpRequest` object). - **MaxAgeSeconds** (integer): The time in seconds that your browser is to cache the preflight response for the specified resource. ### Responses #### 200 - Success Empty response body ### Example Usage ```bash curl -X PUT "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?cors?cors=true" \ -H "Content-Type: application/json" \ -d '{ "CORSConfiguration": { "CORSRules": "value" } }' ``` ``` -------------------------------- ### GET /{Bucket}?lifecycle Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns the lifecycle configuration information set on the bucket. ```markdown ### Parameters - **Bucket** (string, path, required): The name of the bucket for which to get the lifecycle information. - **lifecycle** (boolean, query, required) ### Responses #### 200 - Success **GetBucketLifecycleConfigurationOutput** - **Rules** (array (LifecycleRule)): Container for a lifecycle rule. Array items: - **Expiration** (object): Specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker. - **Date** (string (date-time)): Indicates at what date the object is to be moved or deleted. Should be in GMT ISO 8601 Format. - **Days** (integer): Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer. - **ExpiredObjectDeleteMarker** (boolean): Indicates whether IBM COS will remove a delete marker with no noncurrent versions. If set to true, the delete marker will be expired; if set to false the policy takes no action. This cannot be specified with Days or Date in a Lifecycle Expiration Policy. - **ID** (string): Unique identifier for the rule. The value cannot be longer than 255 characters. - **Prefix** (string): Prefix identifying one or more objects to which the rule applies. This is No longer used; use `Filter` instead. - **Filter** (object): The `Filter` is used to identify objects that a Lifecycle Rule applies to. A `Filter` must have exactly one of `Prefix`, `Tag`, or `And` specified. - **Prefix** (string): Prefix identifying one or more objects to which the rule applies. - **Tag** (object): This tag must exist in the object's tag set in order for the rule to apply. - **Key** (string) (required): Name of the object key. - **Value** (string) (required): Value of the tag. - **And** (object): This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator. - **Prefix** (string): Prefix identifying one or more objects to which the rule applies. - **Tags** (array (union)): All of these tags must exist in the object's tag set in order for the rule to apply. Array items: - **Status** (string (Enabled|Disabled)) (required): If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied. ("Enabled"|"Disabled") - **Transitions** (array (Transition)): Specifies when an IBM COS object transitions to a specified storage class. Array items: - **Date** (string (date-time)): Indicates when objects are transitioned to the specified storage class. The date value must be in ISO 8601 format. The time is always midnight UTC. - **Days** (integer): Indicates the number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. - **StorageClass** (string (GLACIER|ACCELERATED)): The storage class to which you want the object to transition. ("GLACIER"|"ACCELERATED") ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?lifecycle?lifecycle=true" ``` ``` -------------------------------- ### GET /{Bucket}/{Key}?tagging Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns the tags of an object. ```markdown ### Parameters - **Bucket** (string, path, required): The bucket containing the object. - **Key** (string, path, required): Object key for which to get the tagging information. - **tagging** (boolean, query, required) ### Responses #### 200 - Success **GetObjectTaggingOutput** - **TagSet** (array (union)) (required): Contains the tag set. Array items: - **Key** (string) (required): Name of the object key. - **Value** (string) (required): Value of the tag. ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}/{Key}?tagging?tagging=true" ``` ``` -------------------------------- ### GET /{Bucket}?replication Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns the replication configuration information set on the bucket. ```markdown ### Parameters - **Bucket** (string, path, required): The name of the bucket for which to get the replication information. - **replication** (boolean, query, required) ### Responses #### 200 - Success **GetBucketReplicationConfigurationOutput** - **Rules** (array (ReplicationRule)): Container for a replication rule. Array items: - **ID** (string): Unique identifier for the rule. The value cannot be longer than 255 characters. - **Priority** (string): The priority indicates which rule has precedence whenever two or more replication rules conflict. Object storage will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. - **Filter** (object): The `Filter` is used to identify objects that a Lifecycle Rule applies to. A `Filter` must have exactly one of `Prefix`, `Tag`, or `And` specified. - **Prefix** (string): Prefix identifying one or more objects to which the rule applies. - **Tag** (object): This tag must exist in the object's tag set in order for the rule to apply. - **Key** (string) (required): Name of the object key. - **Value** (string) (required): Value of the tag. - **And** (object): This is used in a Lifecycle Rule Filter to apply a logical AND to two or more predicates. The Lifecycle Rule will apply to any object matching all of the predicates configured inside the And operator. - **Prefix** (string): Prefix identifying one or more objects to which the rule applies. - **Tags** (array (union)): All of these tags must exist in the object's tag set in order for the rule to apply. Array items: - **Status** (string (Enabled|Disabled)) (required): If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not currently being applied. ("Enabled"|"Disabled") - **Destination** (object) - **Bucket** (string): The CRN of the destination bucket. - **DeleteMarkerReplication** (object) - **Status** (string (Enabled|Disabled)) ("Enabled"|"Disabled") ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?replication?replication=true" ``` ``` -------------------------------- ### GET / Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json This operation lists all buckets within the specified service instance, regardless of location. Note that while any endpoint may be used to list all buckets, any operations that target a specific bucket must use the appropriate endpoint for that bucket's location. ```markdown ### Parameters - **Ibm-Service-Instance-Id** (string, header, required): This header references the service instance that contains buckets to list. This value can be either the full Cloud Resource Name (CRN) or just the GUID segment that identifies the service instance. (example: "d6f76k03-6k4f-4a82-n165-697654o63903") - **extended** (boolean, query, optional): If supplied, the returned listing will also include the provisioning code (`LocationConstraint`) for each bucket. This allows for inferring a bucket's location and associated endpoint. ### Responses #### 200 - Success **BucketListing** - **owner** (object) - **id** (string): Service instance ID. (example: "d6f76k03-6k4f-4a82-n165-697654o63903") - **displayName** (string): Service instance ID. (example: "d6f76k03-6k4f-4a82-n165-697654o63903") - **buckets** (array (object)) Array items: - **name** (string): Bucket name. (example: "myBucket") - **creationDate** (string (date-time)): Timestamp of bucket creation. (example: "2019-04-29T20:49:22.374Z") ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/?extended=true" ``` ``` -------------------------------- ### GET /{Bucket}?list-object=versions Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns some or all (up to 1,000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. 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. ```markdown ### Parameters - **Bucket** (string, path, required): Bucket name to list. - **delimiter** (string, query, optional): A delimiter is a character you use to group keys. - **encoding-type** (string (url), query, optional): Encoding type used by IBM COS to encode object keys in the response. - **key-marker** (string (url), query, optional): Key marker specifies the starting object for listing. - **max-keys** (integer, query, optional): Sets the maximum number of keys returned in the response. By default the API returns up to 1,000 key names. The response might contain fewer keys but will never contain more. - **prefix** (string, query, optional): Limits the response to keys that begin with the specified prefix. - **version-id-marker** (string, query, optional): Version ID marker specifies the starting object version for listing. - **list-type** (string (2), query, required) ### Responses #### 200 - Success **ListVersionsResult** - **IsTruncated** (boolean): Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned. - **Contents** (array (Object)): Metadata about each object returned. Array items: - **Key** (string): The name that you assign to an object. You use the object key to retrieve the object. - **LastModified** (string (date-time)): The date the Object was Last Modified - **ETag** (string):The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.
The bucket name.
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this operation with an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using Access Points in the Amazon Simple Storage Service Developer Guide.
When using this API with IBM COS on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this operation using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon Simple Storage Service Developer Guide.
- **Prefix** (string): Keys that begin with the indicated prefix. - **Delimiter** (string): Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the `MaxKeys` value. - **MaxKeys** (integer): The maximum number of keys returned in the response body. - **CommonPrefixes** (array (CommonPrefix)):All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
A response can contain `CommonPrefixes` only if you specify a delimiter.
`CommonPrefixes` contains 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/`. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.
Array items: - **Prefix** (string): Container for the specified common prefix. - **EncodingType** (string (url)): Encoding type used by IBM COS to encode object keys in the response. If you specify `encoding-type` request parameter, IBM COS includes this element in the response, and returns encoded key name values in the following response elements: `Delimiter`, `KeyMarker`, `Prefix`, `NextKeyMarker`, `Key`. ("url") - **KeyCount** (integer): KeyCount is the number of keys returned with this request. KeyCount will always be less than equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys - **ContinuationToken** (string): If ContinuationToken was sent with the request, it is included in the response. - **NextContinuationToken** (string): `NextContinuationToken` is sent when `isTruncated` is true, which means there are more keys in the bucket that can be listed. The next list requests to IBM COS can be continued with this `NextContinuationToken`. `NextContinuationToken` is obfuscated and is not a real key - **StartAfter** (string): If StartAfter was sent with the request, it is included in the response. #### 404 - NoSuchBucket **NoSuchBucket** ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?list-object=versions?delimiter=string&encoding-type=url&key-marker=url&max-keys=0&prefix=string&version-id-marker=string&list-type=2" ``` ``` -------------------------------- ### GET /{Bucket}?ibm-replication-failures Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns some or all (up to 1,000) of the replication failures in a source bucket. You can use the request parameters as selection criteria to return a subset of the failures and use continuation token for paging when the result is truncated. ```markdown ### Parameters - **Bucket** (string, path, required): The name of the source bucket for which to list replication failures. - **ibm-replication-failures** (boolean, query, required) - **encoding-type** (string (true), query, optional) - **continuation-token** (string, query, optional): Specifies the failure at which the listing should begin, in reverse chronological order. This is used for pagination purposes if there are more entries present after the entries returned in the last listing request. - **max-keys** (string, query, optional): Restricts the number of failures to display in the response. Default and maximum is 1,000. - **first-sync-attempted-before** (string, query, optional): Specifies the timestamp at which the listing should begin, in reverse chronological order. The time corresponds to when the replication was originally triggered (The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.
The bucket name.
When using this API with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this operation with an access point through the AWS SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using Access Points in the Amazon Simple Storage Service Developer Guide.
When using this API with IBM COS on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this operation using S3 on Outposts through the AWS SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon Simple Storage Service Developer Guide.
- **Prefix** (string): Keys that begin with the indicated prefix. - **Delimiter** (string): Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the `MaxKeys` value. - **MaxKeys** (integer): Sets the maximum number of keys returned in the response. By default the API returns up to 1,000 key names. The response might contain fewer keys but will never contain more. - **CommonPrefixes** (array (CommonPrefix)):All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
A response can contain `CommonPrefixes` only if you specify a delimiter.
`CommonPrefixes` contains 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/`. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns.
Array items: - **Prefix** (string): Container for the specified common prefix. - **EncodingType** (string (url)): Encoding type used by IBM COS to encode object keys in the response. If you specify `encoding-type` request parameter, IBM COS includes this element in the response, and returns encoded key name values in the following response elements: `Delimiter`, `KeyMarker`, `Prefix`, `NextKeyMarker`, `Key`. ("url") - **KeyCount** (integer): KeyCount is the number of keys returned with this request. KeyCount will always be less than equals to MaxKeys field. Say you ask for 50 keys, your result will include less than equals 50 keys - **ContinuationToken** (string): If ContinuationToken was sent with the request, it is included in the response. - **NextContinuationToken** (string): `NextContinuationToken` is sent when `isTruncated` is true, which means there are more keys in the bucket that can be listed. The next list requests to IBM COS can be continued with this `NextContinuationToken`. `NextContinuationToken` is obfuscated and is not a real key - **StartAfter** (string): If StartAfter was sent with the request, it is included in the response. #### 404 - NoSuchBucket **NoSuchBucket** ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?list-type=2?delimiter=string&encoding-type=url&max-keys=0&prefix=string&continuation-token=string&fetch-owner=true&start-after=string&list-type=2" ``` ``` -------------------------------- ### Schema: CommonPrefix Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json 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/. ```markdown ## Schema: CommonPrefix 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 - **Prefix** (string): Container for the specified common prefix. ``` -------------------------------- ### GET /{Bucket}?cors Source: https://cloud.ibm.com/docs/apis/cos/cos-compatibility.json Returns the CORS configuration information set for the bucket. ```markdown ### Parameters - **Bucket** (string, path, required): The bucket name for which to get the CORS configuration. - **cors** (boolean, query, required) ### Responses #### 200 - Success **GetBucketCorsOutput** - **CORSRules** (array (CORSRule)): A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration. Array items: - **AllowedHeaders** (array (AllowedHeader)): Headers that are specified in the `Access-Control-Request-Headers` header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, IBM COS returns any requested headers that are allowed. - **AllowedMethods** (array (AllowedMethod)) (required): An HTTP method that you allow the origin to execute. Valid values are `GET`, `PUT`, `HEAD`, `POST`, and `DELETE`. - **AllowedOrigins** (array (AllowedOrigin)) (required): One or more origins you want customers to be able to access the bucket from. - **ExposeHeaders** (array (ExposeHeader)): One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript `XMLHttpRequest` object). - **MaxAgeSeconds** (integer): The time in seconds that your browser is to cache the preflight response for the specified resource. ### Example Usage ```bash curl -X GET "https://s3.{region}.cloud-object-storage.appdomain.cloud/{Bucket}?cors?cors=true" ``` ```