Project / Room Design API
GET /(v0|v1)/project/room_designs
リクエストヘッダーに Authorization Key が必要です。
使用箇所
アプリはこのAPIに基づいてクラウドセーブ(Cloud Saves)のリストを生成します。

APIの戻り値からは BOM データを削除する必要があります。
概要
room_designs 情報を返します。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
app_version | integer | はい | フィルタリングするルームデザインバージョン。指定がない場合、app_version = 0 が適用されます。 |
sort_by | string | created_at, updated_at または name | |
page | integer | リソースビューのページ番号。デフォルト: 1 | |
per | integer | APIレスポンスで返すルームデザインの数。デフォルト: 25 | |
term | string | ルームデザイン名、ルームID、オーナー名、レベルファイル、または説明を指定可能 |
例
リクエスト
GET /v0/project/room_designs?app_version=1 HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5レスポンス
{
"results": [
{
"uuid": "as23dWOsdfdWOMCqwpoassd21",
"image_url": "/uploads/room_design/0008/template-image-size.png",
"status": "limited",
"is_preset": false,
"product_ids": "",
"name": "Design 08",
"description": "0008 Lorem ipsum dolor sit amet, consectetur adipiscing elit. In iaculis ut elit molestie gravida. Cras tristique imperdiet congue.",
"created_at": "2019-11-25T06:29:09.401Z",
"created_by": "a58O0000000HumJIAS",
"updated_at": "2019-11-28T03:50:03.541Z",
"updated_by": "a58O0000000HumJIAS",
"role": "owner",
"level_file": ""
},
{
"uuid": "JSLWjfdWOMCqwpoas23dWOssd21",
"image_url": "/uploads/room_design/0011/template-image-size.png",
"status": "limited",
"is_preset": false,
"product_ids": "",
"name": "Design 11",
"description": "0011 Lorem ipsum dolor sit amet, consectetur adipiscing elit. In iaculis ut elit molestie gravida. Cras tristique imperdiet congue.",
"created_at": "2019-11-25T06:29:10.292Z",
"created_by": "003O0000017Vly2IAC",
"updated_at": "2019-11-25T06:29:10.292Z",
"updated_by": "003O0000017Vly2IAC",
"role": "admin",
"level_file": ""
},
{
"uuid": "JSLWjfdWOMCqwpoas2301dsad21",
"image_url": "/uploads/room_design/0003/template-image-size.png",
"status": "opened",
"is_preset": false,
"product_ids": "",
"name": "Design 03",
"description": "0003 Lorem ipsum dolor sit amet, consectetur adipiscing elit. In iaculis ut elit molestie gravida. Cras tristique imperdiet congue.",
"created_at": "2019-11-25T06:29:07.928Z",
"created_by": "a58O0000000LNAwIAO",
"updated_at": "2019-11-25T06:29:07.928Z",
"updated_by": "a58O0000000HumJIAS",
"role": "viewer",
"level_file": ""
}
]
}GET Project / Room Designs (Detail)
GET /(v0|v1)/project/room_designs/:id
リクエストヘッダーに Authorization Key が必要です。
使用箇所
ルームデザインがクリックされると、このAPIがBOMを返し、アプリがルームを読み込みます。

概要
room_design 情報を返します。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ルームデザインID |
例
リクエスト
GET /v0/project/room_designs/7d1b3403-da8c-4b4a-a800-a34b1103a0d9 HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5レスポンス
{
"results": {
"uuid": "7d1b3403-da8c-4b4a-a800-a34b1103a0d9",
"image_url": "/uploads/pexels-photo-404630.jpeg",
"bom": "<?xml version=\"1.0\"?>\n<catalog>\n <book id=\"bk101\">\n <author>Gambardella, Matthew</author>\n <title>XML Developer's Guide</title>\n <genre>Computer</genre>\n <price>44.95</price>\n <publish_date>2000-10-01</publish_date>\n <description>An in-depth look at creating applications\n with XML.</description>\n </book>\n</catalog>\n",
"status": "opened",
"is_preset": false,
"product_ids": "",
"name": "Design 110",
"description": "0110 Lorem ipsum dolor sit amet, consectetur adipiscing elit. In iaculis ut elit molestie gravida. Cras tristique imperdiet congue. Cras mi massa, varius a leo vel, placerat elementum neque. Integer non dapibus tellus. Nullam feugiat eget urna non commodo. Nam condimentum sapien dui, a suscipit nisi dictum a. Suspendisse scelerisque diam ac elit congue pellentesque. Suspendisse dapibus dui nisl, non pulvinar enim consectetur eget.",
"created_at": "2018-09-06T02:36:10.018Z",
"created_by": "a58O0000000HumJIAS",
"updated_at": "2018-09-06T02:36:10.018Z",
"updated_by": "a58O0000000HumJIAS",
"lock_version": 1,
"level_file": "",
"delete_all_images": false,
"room_design_images": [
{
"id": "bbf4da55-4515-4597-b3e4-7f198a0118e8",
"name": "Picture 20",
"description": "The xxx picture",
"url": "/uploads/pexels-photo-404630.jpeg",
"created_at": "2018-09-06T02:36:25.280Z",
"updated_at": "2018-09-06T02:36:25.280Z"
},
{
"id": "fee578b8-cbc1-4055-846e-f541009445db",
"name": "Picture 19",
"description": "The xxx picture",
"url": "/uploads/pexels-photo-308663.jpeg",
"created_at": "2018-09-06T02:36:25.275Z",
"updated_at": "2018-09-06T02:36:25.275Z"
},
{
"id": "83a32427-2c02-41ad-b7d0-e2a5b9c00ae5",
"name": "Picture 18",
"description": "The xxx picture",
"url": "/uploads/pexels-photo-308663.jpeg",
"created_at": "2018-09-06T02:36:25.270Z",
"updated_at": "2018-09-06T02:36:25.270Z"
}
]
}
}注意点:
lock_version フィールドはルームデザインのバージョンを示し、レスポンスに含まれます。
ルームデザインの更新または削除をリクエストする場合、lock_version フィールドは必須です。
lock_version がサーバー上の現在の lock_version よりも古い場合、APIは 409 Conflict を返します。正しい lock_version を指定してください。
POST Project / Room Designs (Create)
POST /(v0|v1)/project/room_designs/
リクエストヘッダーに Authorization Key が必要です。
概要
room_design 情報を作成し、返します。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
room_design * | hash | はい | |
- bom | string | はい | BOM |
- image | data/image | はい | 画像 |
- mesh_n_elements | Base64 encoded string[] | プロダクト要素の配列 | |
- name | string[] | プロダクトIDの配列 | |
- description | string | 説明 | |
- is_preset | boolean | ||
- status | string | status は hidden, limited, closed または :opened | |
- level_file | string | レベルファイル | |
- additional_level_file | string | レベルファイル | |
- app_version | integer | はい | |
- chunk_ids | Array | ||
- total_file_size | float | ||
- graphics_quality | string | ||
- scenario_name | string | ライティングシナリオまたはダイナミックスカイ | |
- hdri_sfid | string | HDRIアイテムの design_mesh_junction_sfid | |
- delete_all_images | boolean | ||
- is_configurable | boolean | ||
- configurable_items_attributes | |||
- guid | string | はい | |
- indexes | array |
- リクエストボディはJSON形式である必要があります。
例
リクエスト
POST /v0/project/room_designs HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5
Content-Type: application/x-www-form-urlencodedリクエストボディ
{
"room_design": {
"bom": "eDb...",
"image": "base64:...",
"mesh_n_elements": "aTyi...",
"name": "edited name",
"level_file": "PR-0000",
"description": "edited description",
"status": "opened",
"additional_level_file": "PR-0001",
"chunk_ids": [1, 2],
"total_file_size": 100.0,
"graphics_quality": "High",
"hdri_sfid": "aDf...",
"scenario_name": "scenario_name",
"delete_all_images": false,
"is_configurable": true,
"configurable_items_attributes": [
{ "guid": "guid1", "indexes": [1,2,3] },
{ "guid": "guid2", "indexes": [1,2,3] }
]
}
}レスポンス
{
"results": {
"uuid": "efad9cc3-ef9b-4d77-88cd-9e036826dc62",
"image_url": "/uploads/image.jpeg",
"bom": "<note>\n<to>Tove</to>\n</note>\n",
"status": "opened",
"is_preset": false,
"product_ids": "\"products\":[{\"product_id\":\"01t10000002rGFXAA2\",\"value\":10.5},{\"product_id\":\"01t10000002rF1OAAU\",\"value\":9.8}]",
"mesh_n_elements": "\"products\":[{\"elements\":[\"AV-00002585\",\"BASE_GLASS\"],\"design_version_id\":\"a40100000017maMAAQ\",\"mesh\":\"MS-00002005\",\"value\":\"1\"}]",
"name": "",
"description": "",
"level_file": "level file data",
"created_at": "2019-10-15T04:44:34.834Z",
"created_by": "a58O0000000HumJIAS",
"updated_at": "2019-10-15T04:44:34.834Z",
"updated_by": "a58O0000000HumJIAS",
"delete_all_images": true,
"is_configurable": true,
"configurable_items": []
}
}PUT Project / Room Designs (Update)
PUT /(v0|v1)/project/room_designs/:id
リクエストヘッダーに Authorization Key が必要です。
概要
room_design 情報を更新し、返します。
注意: このAPIは既存のすべてのルームデザイン画像を削除します。新しい画像を必ず渡してください。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ルームデザインID |
room_design * | hash | はい | |
lock_version * | integer | はい | |
- bom | string | BOM | |
- image | data/image | 画像 | |
- mesh_n_elements | Base64 encoded string[] | プロダクト要素の配列 | |
- name | string | 名前 | |
- description | string | 説明 | |
- is_preset | boolean | ||
- status | string | status は :hidden, :closed または :opened (デフォルト)。 | |
- level_file | string | レベルファイル | |
- additional_level_file | string | ||
- chunk_ids | string | ||
- app_version | string | ||
- is_development | boolean | ||
- graphics_quality | string | ||
- scenario_name | string | ライティングシナリオ名 | |
- hdri_sfid | string | HDRIアイテムの design_mesh_junction_sfid | |
- delete_all_images | boolean | ||
- is_configurable | boolean | ||
- configurable_items_attributes | |||
- guid | string | ||
- indexes | array |
- リクエストボディはJSON形式である必要があります。
例
リクエスト
PUT /v0/project/room_designs/686ae546-1115-46f2-b774-3a725dadf339 HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5
Content-Type: application/x-www-form-urlencodedリクエストボディ
{
"room_design": {
"bom": "eDb...",
"image": "base64:...",
"mesh_n_elements": "aTyi...",
"name": "edited name",
"level_file": "PR-0000",
"description": "edited description",
"status": "opened",
"additional_level_file": "PR-0001",
"chunk_ids": [1, 2],
"total_file_size": 100.0,
"graphics_quality": "High",
"hdri_sfid": "aDf...",
"scenario_name": "scenario_name",
"delete_all_images": false,
"is_configurable": true,
"configurable_items_attributes": [
{ "guid": "guid1", "indexes": [1,2,3] },
{ "guid": "guid2", "indexes": [1,2,3] }
]
}
}レスポンス
{
"results": {
"uuid": "686ae546-1115-46f2-b774-3a725dadf339",
"image_url": "/uploads/image.jpeg",
"bom": "<note>\n<to>Tove</to>\n<from>Jani</from>\n<heading>Reminder</heading>\n<body>Don't forget me this weekend!</body>\n</note>\n",
"status": "opened",
"is_preset": false,
"product_ids": "\"products\":[{\"product_id\":\"01t10000002rGFXAA2\",\"value\":10.5},{\"product_id\":\"01t10000002rF1OAAU\",\"value\":9.8}]",
"mesh_n_elements": "\"products\":[{\"elements\":[\"AV-00002585\",\"BASE_GLASS\"],\"design_version_id\":\"a40100000017maMAAQ\",\"mesh\":\"MS-00002005\",\"value\":\"1\"}]",
"name": "",
"description": "",
"level_file": "level file data",
"additional_level_file": "",
"chunk_ids": "",
"chunk_id": "",
"chunk_size": "",
"additional_chunk_id": "",
"additional_chunk_size": "",
"created_at": "2018-05-18T08:40:17.361Z",
"created_by": "516a42c87ef287c024",
"updated_at": "2018-05-18T08:40:17.411Z",
"updated_by": "516a42c87ef287c024",
"lock_version": 1,
"delete_all_images": true,
"is_configurable": true
}
}POST Project / Room Designs (Update Variant)
POST /(v0|v1)/project/room_designs/:id/update
リクエストヘッダーに Authorization Key が必要です。
概要
room_design 情報を更新し、情報を返します。
注意: このAPIは既存のすべてのルームデザイン画像を削除します。新しい画像を必ず渡してください。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ルームデザインID |
room_design * | hash | はい | |
lock_version * | integer | はい | |
- bom | string | BOM | |
- image | data/image | 画像 | |
- mesh_n_elements | Base64 encoded string[] | プロダクト要素の配列 | |
- name | string | 名前 | |
- description | string | 説明 | |
- is_preset | boolean | ||
- status | string | status は :hidden, :closed または :opened (デフォルト)。 | |
- level_file | string | レベルファイル | |
- additional_level_file | string | ||
- chunk_ids | string | ||
- delete_all_images | boolean | ||
- is_configurable | boolean | ||
- configurable_items_attributes | |||
- guid | string | ||
- indexes | array |
- リクエストボディはJSON形式である必要があります。
例
リクエスト
POST /v0/project/room_designs/3af7fd30-8fc6-4bf5-b5bb-082dffc8eb97/update HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5
Content-Type: application/x-www-form-urlencodedリクエストボディ
{
"room_design": {
"bom": "eDb...",
"image": "base64:...",
"mesh_n_elements": "aTyi...",
"name": "edited name",
"level_file": "PR-0000",
"description": "edited description",
"status": "opened",
"additional_level_file": "PR-0001",
"chunk_ids": [1, 2],
"total_file_size": 100.0,
"graphics_quality": "High",
"hdri_sfid": "aDf...",
"scenario_name": "scenario_name",
"delete_all_images": false,
"is_configurable": true,
"configurable_items_attributes": [
{ "guid": "guid1", "indexes": [1,2,3] },
{ "guid": "guid2", "indexes": [1,2,3] }
]
}
}レスポンス
{
"results": {
"uuid": "3af7fd30-8fc6-4bf5-b5bb-082dffc8eb97",
"image_url": "/uploads/image.jpeg",
"bom": "<note>\n<to>Tove</to>\n<from>Jani</from>\n<heading>Reminder</heading>\n<body>Don't forget me this weekend!</body>\n</note>\n",
"status": "opened",
"is_preset": false,
"product_ids": "\"products\":[{\"product_id\":\"01t10000002rGFXAA2\",\"value\":10.5},{\"product_id\":\"01t10000002rF1OAAU\",\"value\":9.8}]",
"mesh_n_elements": "\"products\":[{\"elements\":[\"AV-00002585\",\"BASE_GLASS\"],\"design_version_id\":\"a40100000017maMAAQ\",\"mesh\":\"MS-00002005\",\"value\":\"1\"}]",
"name": "",
"description": "",
"level_file": "level file data",
"additional_level_file": "",
"chunk_ids": "",
"chunk_id": "",
"chunk_size": "",
"additional_chunk_id": "",
"additional_chunk_size": "",
"created_at": "2018-05-18T08:40:18.407Z",
"created_by": "6b7c63ce3130941803",
"updated_at": "2018-05-18T08:40:18.458Z",
"updated_by": "6b7c63ce3130941803",
"lock_version": 1,
"delete_all_images": true,
"is_configurable": true
}
}DELETE Project / Room Designs
DELETE /(v0|v1)/project/room_designs/:id
リクエストヘッダーに Authorization Key が必要です。
概要
room_design を削除し、コンテンツなし(No Content)を返します。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ルームデザインID |
lock_version * | integer | はい |
例
リクエスト
DELETE /v0/project/room_designs/884c68af-8f72-4bf0-9924-e0d2715c3477 HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5レスポンス
HTTP/1.1 204 No ContentPOST Project / Room Designs (Delete Variant)
POST /v0/project/room_designs/:id/delete
リクエストヘッダーに Authorization Key が必要です。
概要
room_design を削除し、コンテンツなし(No Content)を返します。
パラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
id | string | はい | ルームデザインID |
lock_version * | integer | はい |
例
リクエスト
POST /v0/project/room_designs/1a1fae95-aa04-4686-aa2f-132c8baa4765/delete HTTP/1.1
Authorization: Token 9c31d8018f8930c24e8f28c52186ece0dc8296bb46caf4e5レスポンス
HTTP/1.1 204 No Content