MENU

Description

任意のオブジェクトを、指定時間または指定時間後に自動的に削除したい場合に、使用します。
※オブジェクトは、事前にアップロードしておく必要があります。

日時指定の場合、エポックフォーマットにて指定する必要があります。
エポックフォーマットについては、下記コマンド等にて変換ください。

(Linuxの場合)
▼エポックフォーマットに変換

date +%s -d "2015/5/8 02:23:00"

▼ローカル時刻に変換

date -d @1431083880

Request URL

Swift API v1.0

POST /v1/nc_​{account}​/​{container}​/{object}

Request Parameters

Parameter Value Style Description
X-Auth-Token Userトークン header
account tenant ID URI
container コンテナ名 URI
object オブジェクト名 URI
X-Delete-After (Optional) int header 指定した時間後に削除(秒)
X-Delete-At (Optional) int header 日付指定削除(エポックフォーマット)

Request Json

This operation does not accept a request body.

Normal response code

202

Example

※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。

  • X-Delete-AfterREQ
curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 2c6f2de2126a4102b38368c32e7043db" \
-H 'X-Delete-After: 60' \
https://object-storage.tyo1.conoha.io/v1/nc_cc54f7476b8e444bad238a943a94ccdf/container/file1
  • X-Delete-AfterRES
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txfa410f9d0c344648b4f11-00554c1a45
Date: Fri, 08 May 2015 02:07:01 GMT

<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>
  • X-Delete-AtREQ
curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 2c6f2de2126a4102b38368c32e7043db" \
-H 'X-Delete-At:1431083880' \
https://object-storage.tyo1.conoha.io/v1/nc_cc54f7476b8e444bad238a943a94ccdf/container/file1
  • X-Delete-AtRES
HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx49c605b5cd3c49e39e142-00554c1c8f
Date: Fri, 08 May 2015 02:16:47 GMT

<html><h1>Accepted</h1><p>The request is accepted for processing.</p></html>