ユーザーガイド/リファレンスガイド

API

Description

バージョン情報を取得します。

Request URL

Image API v2

GET /

Request Json

This operation does not accept a request body.

Request Paramters

This operation does not accept a request body.

Response

Normal response codes

300

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
https://image-service.odc01.eva-clouds.com

Response

HTTP/1.1 300 Multiple Choices
Date: Fri, 19 Dec 2014 07:40:36 GMT
Server: Apache
Content-Length: 116
Content-Type: application/json

 {
  ”versions”: [
   {
    ”status”: “CURRENT”,
    ”id”: “v2.2”,
    ”links”: [
     {
      ”href”: “https://image-service.odc01.eva-clouds.com/v2/”,
      ”rel”: “self”
     }
    ]    }
  ]  }

 

Description

image_id を指定し、該当するイメージを削除します。

Request URL

Image API v2

GET /v2/images/{image_id}

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
image_id イメージID URI イメージID

Response

Normal response codes

204

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/images/イメージID

Response

HTTP/1.1 204 No Content
Date: Fri, 08 Jul 2016 10:23:06 GMT
Server: Apache
Content-Length: 0
Content-Type: application/json

 

Description

イメージメンバー一覧を取得します。

Request URL

Image API v2

GET /v2/images/{image_id}/members

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
image_id イメージID URI イメージID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/images/イメージID/members

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 10:32:00 GMT
Server: Apache
Content-Length: 48
Content-Type: application/json

{
    “members”: [],
    “schema”: “/v2/schemas/members”
}

 

Description

イメージメンバーのスキーマ情報を取得します。

Request URL

Image API v2

GET /v2/schemas/members

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/schemas/member

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 09:13:07 GMT
Server: Apache
Content-Length: 660
Content-Type: application/json

{
    “name”: “member”,
    “properties”: {
        “created_at”: {
            “description”: “Date and time of image member creation”,
            “type”: “string”
        },
        “image_id”: {
            “description”: “An identifier for the image”,
            “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
            “type”: “string”
        },
        “member_id”: {
            “description”: “An identifier for the image member (tenantId)”,
            “type”: “string”
        },
        “schema”: {
            “type”: “string”
        },
        “status”: {
            “description”: “The status of this image member”,
            “enum”: [
                “pending”,
                “accepted”,
                “rejected”
            ],
            “type”: “string”
        },
        “updated_at”: {
            “description”: “Date and time of last modification of image member”,
            “type”: “string”
        }
    }
}

 

Description

イメージメンバーコンテナのスキーマ情報を取得します。

Request URL

Image API v2

GET /v2/schemas/members

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/schemas/members

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 09:02:46 GMT
Server: Apache
Content-Length: 821
Content-Type: application/json

{
    “links”: [
        {
            “href”: “{schema}”,
            “rel”: “describedby”
        }
    ],
    “name”: “members”,
    “properties”: {
        “members”: {
            “items”: {
                “name”: “member”,
                “properties”: {
                    “created_at”: {
                        “description”: “Date and time of image member creation”,
                        “type”: “string”
                    },
                    “image_id”: {
                        “description”: “An identifier for the image”,
                        “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
                        “type”: “string”
                    },
                    “member_id”: {
                        “description”: “An identifier for the image member (tenantId)”,
                        “type”: “string”
                    },
                    “schema”: {
                        “type”: “string”
                    },
                    “status”: {
                        “description”: “The status of this image member”,
                        “enum”: [
                            “pending”,
                            “accepted”,
                            “rejected”
                        ],
                        “type”: “string”
                    },
                    “updated_at”: {
                        “description”: “Date and time of last modification of image member”,
                        “type”: “string”
                    }
                }
            },
            “type”: “array”
        },
        “schema”: {
            “type”: “string”
        }
    }
}

 

Description

イメージスキーマ情報を取得します。

Request URL

Image API v2

GET /v2/schemas/image

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/schemas/image

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 08:53:20 GMT
Server: Apache
Content-Length: 3785
Content-Type: application/json

{
    “additionalProperties”: {
        “type”: “string”    },
    “links”: [
        {
            “href”: “{self}”,
            “rel”: “self”
        },
        {
            “href”: “{file}”,
            “rel”: “enclosure”
        },
        {
            “href”: “{schema}”,
            “rel”: “describedby”
        }
    ],
    “name”: “image”,
    “properties”: {
        “architecture”: {
            “description”: “Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html”,
            “is_base”: false,
            “type”: “string”
        },
        “checksum”: {
            “description”: “md5 hash of image contents. (READ-ONLY)”,
            “maxLength”: 32,
            “type”: “string”
        },
        “container_format”: {
            “description”: “Format of the container”,
            “enum”: [
                “ami”,
                “ari”,
                “aki”,
                “bare”,
                “ovf”,
                “ova”
            ],
            “type”: “string”
        },
        “created_at”: {
            “description”: “Date and time of image registration (READ-ONLY)”,
            “type”: “string”
        },
        “direct_url”: {
            “description”: “URL to access the image file kept in external store (READ-ONLY)”,
            “type”: “string”
        },
        “disk_format”: {
            “description”: “Format of the disk”,
            “enum”: [
                “ami”,
                “ari”,
                “aki”,
                “vhd”,
                “vmdk”,
                “raw”,
                “qcow2”,
                “vdi”,
                “iso”
            ],
            “type”: “string”
        },
        “file”: {
            “description”: “(READ-ONLY)”,
            “type”: “string”
        },
        “id”: {
            “description”: “An identifier for the image”,
            “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
            “type”: “string”
        },
        “instance_uuid”: {
            “description”: “ID of instance used to create this image.”,
            “is_base”: false,
            “type”: “string”
        },
        “kernel_id”: {
            “description”: “ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.”,
            “is_base”: false,
            “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
            “type”: “string”
        },
        “locations”: {
            “description”: “A set of URLs to access the image file kept in external store”,
            “items”: {
                “properties”: {
                    “metadata”: {
                        “type”: “object”
                    },
                    “url”: {
                        “maxLength”: 255,
                        “type”: “string”
                    }
                },
                “required”: [
                    “url”,
                    “metadata”
                ],
                “type”: “object”
            },
            “type”: “array”
        },
        “min_disk”: {
            “description”: “Amount of disk space (in GB) required to boot image.”,
            “type”: “integer”
        },
        “min_ram”: {
            “description”: “Amount of ram (in MB) required to boot image.”,
            “type”: “integer”
        },
        “name”: {
            “description”: “Descriptive name for the image”,
            “maxLength”: 255,
            “type”: “string”
        },
        “os_distro”: {
            “description”: “Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html”,
            “is_base”: false,
            “type”: “string”
        },
        “os_version”: {
            “description”: “Operating system version as specified by the distributor”,
            “is_base”: false,
            “type”: “string”
        },
        “owner”: {
            “description”: “Owner of the image”,
            “maxLength”: 255,
            “type”: “string”
        },
        “protected”: {
            “description”: “If true, image will not be deletable.”,
            “type”: “boolean”
        },
        “ramdisk_id”: {
            “description”: “ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.”,
            “is_base”: false,
            “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
            “type”: “string”
        },
        “schema”: {
            “description”: “(READ-ONLY)”,
            “type”: “string”
        },
        “self”: {
            “description”: “(READ-ONLY)”,
            “type”: “string”
        },
        “size”: {
            “description”: “Size of image file in bytes (READ-ONLY)”,
            “type”: “integer”
        },
        “status”: {
            “description”: “Status of the image (READ-ONLY)”,
            “enum”: [
                “queued”,
                “saving”,
                “active”,
                “killed”,
                “deleted”,
                “pending_delete”
            ],
            “type”: “string”
        },
        “tags”: {
            “description”: “List of strings related to the image”,
            “items”: {
                “maxLength”: 255,
                “type”: “string”
            },
            “type”: “array”
        },
        “updated_at”: {
            “description”: “Date and time of the last image modification (READ-ONLY)”,
            “type”: “string”
        },
        “virtual_size”: {
            “description”: “Virtual size of image in bytes (READ-ONLY)”,
            “type”: “integer”
        },
        “visibility”: {
            “description”: “Scope of image accessibility”,
            “enum”: [
                “public”,
                “private”
            ],
            “type”: “string”
        }
    }
}

 

Description

イメージコンテナのスキーマ情報を取得します。

Request URL

Image API v2

GET /v2/schemas/images

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/schemas/images

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 08:39:47 GMT
Server: Apache
Content-Length: 4073
Content-Type: application/json

{
    “links”: [
        {
            “href”: “{first}”,
            “rel”: “first”
        },
        {
            “href”: “{next}”,
            “rel”: “next”
        },
        {
            “href”: “{schema}”,
            “rel”: “describedby”
        }
    ],
    “name”: “images”,
    “properties”: {
        “first”: {
            “type”: “string”
        },
        “images”: {
            “items”: {
                “additionalProperties”: {
                    “type”: “string”
                },
                “links”: [
                    {
                        “href”: “{self}”,
                        “rel”: “self”
                    },
                    {
                        “href”: “{file}”,
                        “rel”: “enclosure”
                    },
                    {
                        “href”: “{schema}”,
                        “rel”: “describedby”
                    }
                ],
                “name”: “image”,
                “properties”: {
                    “architecture”: {
                        “description”: “Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html”,
                        “is_base”: false,
                        “type”: “string”
                    },
                    “checksum”: {
                        “description”: “md5 hash of image contents. (READ-ONLY)”,
                        “maxLength”: 32,
                        “type”: “string”
                    },
                    “container_format”: {
                        “description”: “Format of the container”,
                        “enum”: [
                            “ami”,
                            “ari”,
                            “aki”,
                            “bare”,
                            “ovf”,
                            “ova”
                        ],
                        “type”: “string”
                    },
                    “created_at”: {
                        “description”: “Date and time of image registration (READ-ONLY)”,
                        “type”: “string”
                    },
                    “direct_url”: {
                        “description”: “URL to access the image file kept in external store (READ-ONLY)”,
                        “type”: “string”
                    },
                    “disk_format”: {
                        “description”: “Format of the disk”,
                        “enum”: [
                            “ami”,
                            “ari”,
                            “aki”,
                            “vhd”,
                            “vmdk”,
                            “raw”,
                            “qcow2”,
                            “vdi”,
                            “iso”
                        ],
                        “type”: “string”
                    },
                    “file”: {
                        “description”: “(READ-ONLY)”,
                        “type”: “string”
                    },
                    “id”: {
                        “description”: “An identifier for the image”,
                        “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
                        “type”: “string”
                    },
                    “instance_uuid”: {
                        “description”: “ID of instance used to create this image.”,
                        “is_base”: false,
                        “type”: “string”
                    },
                    “kernel_id”: {
                        “description”: “ID of image stored in Glance that should be used as the kernel when booting an AMI-style image.”,
                        “is_base”: false,
                        “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
                        “type”: “string”
                    },
                    “locations”: {
                        “description”: “A set of URLs to access the image file kept in external store”,
                        “items”: {
                            “properties”: {
                                “metadata”: {
                                    “type”: “object”
                                },
                                “url”: {
                                    “maxLength”: 255,
                                    “type”: “string”
                                }
                            },
                            “required”: [
                                “url”,
                                “metadata”
                            ],
                            “type”: “object”
                        },
                        “type”: “array”
                    },
                    “min_disk”: {
                        “description”: “Amount of disk space (in GB) required to boot image.”,
                        “type”: “integer”
                    },
                    “min_ram”: {
                        “description”: “Amount of ram (in MB) required to boot image.”,
                        “type”: “integer”
                    },
                    “name”: {
                        “description”: “Descriptive name for the image”,
                        “maxLength”: 255,
                        “type”: “string”
                    },
                    “os_distro”: {
                        “description”: “Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html”,
                        “is_base”: false,
                        “type”: “string”
                    },
                    “os_version”: {
                        “description”: “Operating system version as specified by the distributor”,
                        “is_base”: false,
                        “type”: “string”
                    },
                    “owner”: {
                        “description”: “Owner of the image”,
                        “maxLength”: 255,
                        “type”: “string”
                    },
                    “protected”: {
                        “description”: “If true, image will not be deletable.”,
                        “type”: “boolean”
                    },
                    “ramdisk_id”: {
                        “description”: “ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image.”,
                        “is_base”: false,
                        “pattern”: “^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$”,
                        “type”: “string”
                    },
                    “schema”: {
                        “description”: “(READ-ONLY)”,
                        “type”: “string”
                    },
                    “self”: {
                        “description”: “(READ-ONLY)”,
                        “type”: “string”
                    },
                    “size”: {
                        “description”: “Size of image file in bytes (READ-ONLY)”,
                        “type”: “integer”
                    },
                    “status”: {
                        “description”: “Status of the image (READ-ONLY)”,
                        “enum”: [
                            “queued”,
                            “saving”,
                            “active”,
                            “killed”,
                            “deleted”,
                            “pending_delete”
                        ],
                        “type”: “string”
                    },
                    “tags”: {
                        “description”: “List of strings related to the image”,
                        “items”: {
                            “maxLength”: 255,
                            “type”: “string”
                        },
                        “type”: “array”
                    },
                    “updated_at”: {
                        “description”: “Date and time of the last image modification (READ-ONLY)”,
                        “type”: “string”
                    },
                    “virtual_size”: {
                        “description”: “Virtual size of image in bytes (READ-ONLY)”,
                        “type”: “integer”
                    },
                    “visibility”: {
                        “description”: “Scope of image accessibility”,
                        “enum”: [
                            “public”,
                            “private”
                        ],
                        “type”: “string”
                    }
                }
            },
            “type”: “array”
        },
        “next”: {
            “type”: “string”
        },
        “schema”: {
            “type”: “string”
        }
    }
}

 

Description

image_id を指定し該当するイメージの情報を取得します。

Request URL

Image API v2
GET /v2/images/{image_id}

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
image_id イメージID URI イメージID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “Content-Type: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/images/イメージID

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 08:09:19 GMT
Server: Apache
Content-Length: 1106
Content-Type: application/json

{
    “bootable”: “true”,
    “checksum”: “8ceaf2f4a3c4d14ad50000f9476404e2”,
    “container_format”: “ovf”,
    “created_at”: “2016-07-08T06:30:11Z”,
    “direct_url”: “file:///var/lib/glance/images_04/テナントID/イメージID“,
    “disk_format”: “qcow2”,
    “display_order”: “1100”,
    “dst”: “CentOS-6.8-100GB-64bit”,
    “file”: “/v2/images/イメージID/file”,
    “hw_qemu_guest_agent”: “yes”,
    “id”: “イメージID“,    “locations”: [
        {
            “metadata”: {
                “domain_id”: “default”,
                “mount_point”: “/var/lib/glance/images_04/”,
                “share_location”: “nfs://172.25.6.244/image_vol_04”,
                “type”: “nfs”
            },
            “url”: “file:///var/lib/glance/images_04/テナントID/イメージID
        }
    ],
    “min_disk”: 100,
    “min_ram”: 0,
    “name”: “vmi-centos-6.8-amd64”,
    “os_type”: “lin”,
    “owner”: “テナントID“,
    “protected”: false,
    “schema”: “/v2/schemas/image”,
    “self”: “/v2/images/イメージID“,
    “size”: 1546256384,
    “status”: “active”,
    “tags”: [],
    “updated_at”: “2016-07-08T06:30:29Z”,
    “visibility”: “public”
}

 

Description

イメージ一覧を取得します。

Request URL

Image API v2

GET /v2/images

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
limit
(Optinal)
  query イメージ表示数
marker
(Optional)
  query 表示される最後のUUID
name
(Optional)
  query イメージ名
visibility
(Optional)
  query 公開(public)または、非公開(private)を指定
member_status
(Optional)
  query イメージメンバーの状態でフィルター
owner
(Optional)
  query イメージ所有者(テナントID指定)
status
(Optional)
  query イメージの状態
size_min
(Optional)
  query イメージの最小サイズ。単位は bytes
size_max
(Optional)
  query イメージの最大サイズ。単位は bytes
sort_key
(Optional)
  query ソート対象となる項目。Deault:created_at
sort_dir
(Optional)
  query ソートする方向性 default:desc
tag
(Optional)
  query イメージタグでフィルター

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “Content-Type: application/json” \
-H “X-Auth-Token: トークンID” \
https://image-service.odc01.eva-clouds.com/v2/images

Response

HTTP/1.1 200 OK
Date: Wed, 06 Jul 2016 05:28:22 GMT
Server: Apache
Content-Type: application/json

{
    “images”: [
        {
            “container_format”: “ovf”,
            “min_ram”: 0,
            “updated_at”: “2016-06-30T10:09:59Z”,
            “file”: “/v2/images/イメージID/file”,
            “owner”: “テナントID“,
            “id”: “イメージID“,
            “size”: 2137980928,
            “dst”: “CentOS-7.2-100GB-64bit”,
            “disk_format”: “qcow2”,
            “display_order”: “400”,
            “direct_url”: “file:///var/lib/glance/images_02/テナントID/イメージID“,
            “schema”: “/v2/schemas/image”,
            “status”: “active”,
            “tags”: [],
            “hw_qemu_guest_agent”: “yes”,
            “visibility”: “public”,
            “locations”: [
                {
                    “url”: “file:///var/lib/glance/images_02/テナントID/イメージID“,
                    “metadata”: {
                        “mount_point”: “/var/lib/glance/images_02/”,
                        “type”: “nfs”,
                       “domain_id”: “default”,
                        “share_location”: “nfs://172.25.6.242/image_vol_02”
                    }
                }
            ],
            “min_disk”: 100,
            “name”: “vmi-centos-7.2-amd64”,
            “bootable”: “true”,
            “checksum”: “4aaa4cdb95d3ddc0d59f8c6533a79afc”,
            “created_at”: “2016-06-28T06:00:58Z”,
            “protected”: false,
            “os_type”: “lin”,
            “self”: “/v2/images/イメージID
        }
    ],
    “schema”: “/v2/schemas/images”,
    “first”: “/v2/images”
}

 

Description

任意のコンテナにあるオブジェクトをWeb公開したい場合に使用します。 ACLsにてRead権限をすべて許可する設定となります。
※StaticWeb機能とは異なります。

Request URL

ObjectStorage API v1
POST /v1/ze_{account}/{container}

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
account テナントID URI テナントID
container コンテナ名 URI コンテナ名
X-Container-Read(Optional) string header  
X-Remove-Container-Read(Optional) string header  

Response

Normal response codes

202

Example

Request

curl -i -X POST \
-H “Accept: application/json” \
-H “Content-Type: application/json” \
-H “X-Auth-Token: トークンID” \
-H “X-Container-Read: .r:*” \
https://object-storage.odc01.eva-clouds.com/v1/ze_テナントID/コンテナ名

Response

HTTP/1.1 202 Accepted
Content-Length: 76
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx05fdba96a9624a89843d3-0057bcfae4
Date: Wed, 24 Aug 2016 01:39:52 GMT

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