MENU
データベース一覧取得 - Database API v1
Description
データベースの一覧を取得します。
Request URL
Database API v1.0 GET /v1/databases
Request Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
X-Auth-Token | - | header | string | Userトークン |
service_id(Optional) | - | query | UUID | サービスID 未指定の場合はテナントに紐づくすべてのデータベースを返却 |
offset(Optional) | - | query | int | 取得開始位置 Default:0 |
limit(Optional) | - | query | int | 取得数 Default:1000 |
sort_key(Optional) | db_name/status/create_date/memo | query | string | ソートキー Default:create_date |
sort_type(Optional) | asc/desc | query | string | ソート順 Default:asc |
Response Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
databases | - | - | list | - |
service_id | - | plain | UUID | サービスID |
database_id | - | plain | UUID | データベースID |
internal_hostname | - | plain | string | 接続先(プライベート) |
external_hostname | - | plain | string | 接続先(グローバル) |
db_name | - | plain | string | データベース名 |
db_size | - | plain | float | 使用DB容量(GB単位)、小数点第二位まで表示 |
memo | - | plain | string | メモ |
type | - | plain | string | DBタイプ |
charset | - | plain | string | DB文字コード |
status | active/pending/creating/deleting/error | plain | string | ステータス |
total_count | - | plain | int | 総件数 |
current_count | - | plain | int | 現在の取得件数 |
Request Json
This operation does not accept a request body.
Normal response codes
200 - Success
Error response codes
400 - Bad Request
401 - Access Denied
Repeatable
Yes
Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。
- REQ
curl -i -X GET \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \ https://database-hosting.tyo1.conoha.io/v1/databases?service_id=9d6441f6-c5a0-4dcf-a1a9-1a4d724e51fd
- RES
HTTP/1.1 200 Success Date: Tue, 09 Dec 2014 01:46:58 GMT Server: Apache Content-Length: 1003 Content-Type: application/json { "databases": [ { "service_id": "9d6441f6-c5a0-4dcf-a1a9-1a4d724e51fd", "database_id": "148147ba-8999-4901-9cd6-634db82f80ea", "internal_hostname": "private.02p8y.tyo1.database-hosting.conoha.io", "external_hostname": "public.02p8y.tyo1.database-hosting.conoha.io", "db_name": "02p8y_dbname01", "db_size": 2, "memo": "memo", "type": "mysql", "charset": "utf8", "status": "active" }, { "service_id": "9d6441f6-c5a0-4dcf-a1a9-1a4d724e51fd", "database_id": "f2d55856-ee66-4efb-9663-a501f3f29edb", "internal_hostname": "private.02p8y.tyo1.database-hosting.conoha.io", "external_hostname": "public.02p8y.tyo1.database-hosting.conoha.io", "db_name": "02p8y_dbname02", "db_size": 32.25, "memo": "memo", "type": "mysql", "charset": "utf8", "status": "pending" } ], "total_count":100, "current_count":10 }