Skip to content

Latest commit

 

History

History
1620 lines (1243 loc) · 44.6 KB

File metadata and controls

1620 lines (1243 loc) · 44.6 KB
title XRCLOUD API v1.1
language_tabs
javascript
JavaScript
python
Python
language_clients
javascript
python
toc_footers
includes
search true
highlight_theme darkula
headingLevel 2

XRCLOUD API v1.1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

project

A Project in XRCLOUD can be a developer's project, platform, or 3rd-party application. It serves as a management unit for Scenes and Rooms, where multiple Scenes and Rooms can belong to a specific Project.

Retrieve Projects by Label

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/projects',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/projects', headers = headers)

print(r.json())

GET /api/projects

Fetch projects filtered by label. Use the label query parameter to filter projects by a specific label.

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
label query string false The label of the project to filter. If not provided, all projects will be returned.

Example responses

200 Response

[
  {
    "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
    "name": "example project name",
    "webhookUrl": "https://api.xrcloud.app/events/webhook",
    "createdAt": "2023-07-12T09:27:41.600Z",
    "updatedAt": "2023-07-12T09:27:41.600Z",
    "faviconUrl": "https://api.xrcloud.app/storage/favicon/4a3/4a3e946e-2776-4182-afb7-204d982b727d.ico",
    "logoUrl": "https://api.xrcloud.app/storage/favicon/51d/51dc73cc-36db-4046-af8d-1e61e4b59c19.jpg"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Project] false none none
» id string false none (projectId) Unique ID of the Project.
» name string false none Name of the Project.
» webhookUrl string false none The endpoint of the external system that sends event information when a user enters or exits the Room. The Room enter/exit information will be sent as a POST request to the URL. You can use this value to record the user's activity.
Note: As of 2024-12-01, the IP and UserAgent values are not being sent correctly.

Example:

json<br> {<br> "code": "room-join",<br> "resourceId": "c322b49b-6e12-47d9-b293-b5ab3727459c",<br> "sessionId": "4f7edfb6-b8a1-4f58-96ee-1deb4da98740",<br> "reticulumId": "0934212312120(XRCLOUD's user ID for getRoom, the userId will be created.)",<br> "logTime": "2023-12-12T09:27:41.600Z",<br> "action": "enter",<br> "ip": "123.0.0.1",<br> "userAgent": "Mozilla/5.0",<br> "device": "VR"<br> }<br>
» createdAt string(date-time) false none Date and time when the Project was created.
» updatedAt string(date-time) false none Date and time when the Project was last updated.
» faviconUrl string false none URL of the favicon of the Project.
» logoUrl string false none URL of the logo of the Project.
This operation does not require authentication

Create a Project

Code samples

const inputBody = '{
  "favicon": "string",
  "logo": "string",
  "name": "string",
  "label": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json'
};

fetch('/api/projects',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json'
}

r = requests.post('/api/projects', headers = headers)

print(r.json())

POST /api/projects

You can create a project using the following format:

RES=$(curl -s -X POST "$XRCLOUD_HOST/api/projects" \
    -H "Authorization: Bearer $ACCESS_TOKEN" \
    -H "Content-Type: multipart/form-data" \
    -F "favicon=@$FILE_DIR/favicon.ico" \
    -F "logo=@$FILE_DIR/logo.png" \
    -F "name=lms" \
    -F "label=lms"
)

This API uses multipart/form-data format to include the favicon, logo, name, and label of the project.

Body parameter

favicon: string
logo: string
name: string
label: string

Parameters

Name In Type Required Description
body body object true none
» favicon body string(binary) false Favicon file for the project.
» logo body string(binary) false Logo file for the project.
» name body string false Name of the project.
» label body string false Label of the project.

Example responses

201 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example project name",
  "webhookUrl": "https://api.xrcloud.app/events/webhook",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "faviconUrl": "https://api.xrcloud.app/storage/favicon/4a3/4a3e946e-2776-4182-afb7-204d982b727d.ico",
  "logoUrl": "https://api.xrcloud.app/storage/favicon/51d/51dc73cc-36db-4046-af8d-1e61e4b59c19.jpg"
}

Responses

Status Meaning Description Schema
201 Created The project was successfully created. Project
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve or Generate XRCLOUD User ID

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/projects/{projectId}/getIdFromUserId/{accountId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/projects/{projectId}/getIdFromUserId/{accountId}', headers = headers)

print(r.json())

GET /api/projects/{projectId}/getIdFromUserId/{accountId}

Pass a user ID from your service to generate and retrieve a reticulumId (XRCLOUD's user ID) in XRCLOUD. This user ID is used in other APIs to identify specific user actions on the platform. Logging information will be reported using this reticulumId.

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
projectId path string true Unique ID of the project.
accountId path string true Account ID of the user.

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successfully retrieved user ID. Inline
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse

Response Schema

This operation does not require authentication

Retrieve Project Information

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/projects/{projectId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/projects/{projectId}', headers = headers)

print(r.json())

GET /api/projects/{projectId}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.

Example responses

200 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example project name",
  "webhookUrl": "https://api.xrcloud.app/events/webhook",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "faviconUrl": "https://api.xrcloud.app/storage/favicon/4a3/4a3e946e-2776-4182-afb7-204d982b727d.ico",
  "logoUrl": "https://api.xrcloud.app/storage/favicon/51d/51dc73cc-36db-4046-af8d-1e61e4b59c19.jpg"
}

Responses

Status Meaning Description Schema
200 OK Success Project
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

scene

A space for creating web-based 3D virtual environments that are required for Room creation.

To create a Scene, call the get-creation-url api to obtain the 'sceneCreationUrl', access the editor (Spoke), and click the Publish Scene button in the upper right corner. You can also modify existing Scenes by accessing the 'sceneModificationUrl' field obtained from the get-scene api.

  • The optId value is a callback value used by XRCLOUD to verify Scene creation and modification. Modifying it may cause errors.

Retrieve Scene List Information

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/scenes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/scenes', params={
  'projectId': null
}, headers = headers)

print(r.json())

GET /api/scenes

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
projectId query uuid true Unique ID of the Project.
name query string false (search) Retrieve objects with the specified name.
creator query string false (search) Retrieve objects created by a specific creator.
take query number false (pagination) The number of items to retrieve.
skip query number false (pagination) The number of items to skip.

Example responses

200 Response

{
  "items": [
    {
      "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
      "name": "example scene name",
      "createdAt": "2023-07-12T09:27:41.600Z",
      "updatedAt": "2023-07-12T09:27:41.600Z",
      "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg",
      "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
    }
  ],
  "total": 0,
  "skip": 0,
  "take": 0
}

Responses

Status Meaning Description Schema
200 OK Success GetScenesSuccessResponse
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve Scene Editor (Spoke) URL

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/scenes/get-creation-url',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/scenes/get-creation-url', params={
  'projectId': null
}, headers = headers)

print(r.json())

GET /api/scenes/get-creation-url

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
projectId query uuid true Unique ID of the Project.
creator query string false You can specify the creator of the Scene. It is used to distinguish between 'My Assets' for each user. If you call without this parameter, it will be treated as if it was created by 'Admin'.
callback query string false You can call this if you need a specific action after creating the Scene (such as creating a Room immediately after creating the Scene). The call from XRCloud will be as follows.

Detailed descriptions

callback: You can call this if you need a specific action after creating the Scene (such as creating a Room immediately after creating the Scene). The call from XRCloud will be as follows.

{ method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ sceneId }) }

Example responses

200 Response

{
  "sceneCreationUrl": "https://room.xrcloud.app:4000/spoke/projects/new?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}

Responses

Status Meaning Description Schema
200 OK Success GetSceneCreationUrlSuccessResponse
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve Scene Information

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/scenes/{sceneId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/scenes/{sceneId}', headers = headers)

print(r.json())

GET /api/scenes/{sceneId}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.

Example responses

200 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example scene name",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg",
  "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}

Responses

Status Meaning Description Schema
200 OK Success Scene
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Remove a Scene

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/scenes/{sceneId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.delete('/api/scenes/{sceneId}', headers = headers)

print(r.json())

DELETE /api/scenes/{sceneId}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.

Example responses

default Response

{
  "statusCode": 400,
  "method": "Method",
  "url": "/example/endpoint",
  "body": {
    "key": "value"
  },
  "message": "Detailed error messages"
}

Responses

Status Meaning Description Schema
200 OK Success None
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

room

A Room is a virtual space based on a Scene created through the editor (Spoke).

Each Room provides two types of URLs: a private room URL that changes with each request and a public room URL with a fixed address. These URLs are further divided into host URLs that grant host permissions and guest URLs that grant guest permissions.

The 'returnUrl' specifies the web address to return to when leaving the room, which can be configured in the Rooms tab of XRCloud.

Create a Room

Code samples

const inputBody = '{
  "projectId": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "sceneId": "1234e5ba-5678-4f7a-86ed-abcd95ea1efg",
  "name": "example room name",
  "returnUrl": "https://www.google.com/",
  "size": 10
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.post('/api/rooms', headers = headers)

print(r.json())

POST /api/rooms

Body parameter

{
  "projectId": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "sceneId": "1234e5ba-5678-4f7a-86ed-abcd95ea1efg",
  "name": "example room name",
  "returnUrl": "https://www.google.com/",
  "size": 10
}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
body body CreateRoomRequest true none

Example responses

201 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example room name",
  "size": 10,
  "tags": [],
  "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "returnUrl": "https://www.google.com/",
  "roomUrl": {
    "public": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
    },
    "private": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
    }
  },
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
}

Responses

Status Meaning Description Schema
201 Created Success Room
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve Room List Information

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/rooms', headers = headers)

print(r.json())

GET /api/rooms

This API must include either projectId or sceneId.

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
projectId query uuid false Unique ID of the Project.
sceneId query uuid false Unique ID of the Scene.
name query string false (search) Retrieve objects with the specified name.
userId query string false User of the Project (app). It is used to distinguish between users who enter the Room.
avatarUrl query string false The path to the avatar file for the Room.
linkPayload query string false The value to be passed to the 'InlineView' element of the Scene. It will be passed to the URL called by the InlineView in the hubsParam parameter.
take query number false (pagination) The number of items to retrieve.
skip query number false (pagination) The number of items to skip.

Example responses

200 Response

{
  "items": [
    {
      "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
      "name": "example room name",
      "size": 10,
      "tags": [],
      "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
      "createdAt": "2023-07-12T09:27:41.600Z",
      "updatedAt": "2023-07-12T09:27:41.600Z",
      "returnUrl": "https://www.google.com/",
      "roomUrl": {
        "public": {
          "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
          "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
        },
        "private": {
          "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
          "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
        }
      },
      "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
    }
  ],
  "total": 0,
  "skip": 0,
  "take": 0
}

Responses

Status Meaning Description Schema
200 OK Success GetRoomsSuccessResponse
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve Room Information

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms/{roomId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/rooms/{roomId}', headers = headers)

print(r.json())

GET /api/rooms/{roomId}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
userId query string false User of the Project (app). It is used to distinguish between users who enter the Room.
avatarUrl query string false The path to the avatar file for the Room.
linkPayload query string false The value to be passed to the 'InlineView' element of the Scene. It will be passed to the URL called by the InlineView in the hubsParam parameter.

Example responses

200 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example room name",
  "size": 10,
  "tags": [],
  "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "returnUrl": "https://www.google.com/",
  "roomUrl": {
    "public": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
    },
    "private": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
    }
  },
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
}

Responses

Status Meaning Description Schema
200 OK Success Room
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Update Room Information

Code samples

const inputBody = '{
  "name": "example room name",
  "size": 10,
  "returnUrl": "https://www.google.com/"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms/{roomId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.patch('/api/rooms/{roomId}', headers = headers)

print(r.json())

PATCH /api/rooms/{roomId}

Body parameter

{
  "name": "example room name",
  "size": 10,
  "returnUrl": "https://www.google.com/"
}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.
body body UpdateRoomRequest true none

Example responses

200 Response

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example room name",
  "size": 10,
  "tags": [],
  "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "returnUrl": "https://www.google.com/",
  "roomUrl": {
    "public": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
    },
    "private": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
    }
  },
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
}

Responses

Status Meaning Description Schema
200 OK Success Room
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Remove a Room

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms/{roomId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.delete('/api/rooms/{roomId}', headers = headers)

print(r.json())

DELETE /api/rooms/{roomId}

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.

Example responses

default Response

{
  "statusCode": 400,
  "method": "Method",
  "url": "/example/endpoint",
  "body": {
    "key": "value"
  },
  "message": "Detailed error messages"
}

Responses

Status Meaning Description Schema
200 OK Success None
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Retrieve Room Logs

Code samples

const headers = {
  'Accept':'application/json',
  'X-XRCLOUD-API-KEY':'string'
};

fetch('/api/rooms/{roomId}/logs',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
import requests
headers = {
  'Accept': 'application/json',
  'X-XRCLOUD-API-KEY': 'string'
}

r = requests.get('/api/rooms/{roomId}/logs', headers = headers)

print(r.json())

GET /api/rooms/{roomId}/logs

Retrieve the user's participation logs for a specific room. This log includes the time, IP address, device information, etc. of the user who joined the room. (As of 2024-12-01, the IP address and UserAgent are not being sent correctly.)

Parameters

Name In Type Required Description
X-XRCLOUD-API-KEY header string true You must include the ApiKey in the header in the following format: X-XRCLOUD-API-KEY: ${ApiKey}.

Example responses

200 Response

[
  {
    "code": "room-join",
    "roomId": "cfdd7716-4ed0-4db2-b7d6-93dc0ff72c2a",
    "sessionId": "6dfbc23a-4193-4979-adde-e984f40fd80a",
    "reticulumId": "1900346259722469400",
    "logTime": "2024-11-29T08:54:27.000Z",
    "action": "hubs join",
    "ip": "0.0.0.0",
    "userAgent": "",
    "device": "unknown/pc",
    "id": 17
  }
]

default Response

{
  "statusCode": 400,
  "method": "Method",
  "url": "/example/endpoint",
  "body": {
    "key": "value"
  },
  "message": "Detailed error messages"
}

Responses

Status Meaning Description Schema
200 OK Success GetRoomLogsSuccessResponse
default Default Errors such as 4XX or 5XX may occur depending on the situation. ErrorResponse
This operation does not require authentication

Schemas

ErrorResponse

{
  "statusCode": 400,
  "method": "Method",
  "url": "/example/endpoint",
  "body": {
    "key": "value"
  },
  "message": "Detailed error messages"
}

Properties

Name Type Required Restrictions Description
statusCode number false none HTTP status code. The actual value varies depending on the error.
method string false none HTTP method of the request that caused the error.
url string false none The endpoint that returned this error. This value varies depending on the endpoint.
body object false none The original data sent in the request body. The actual value varies depending on the request.
message string false none Detailed error message explaining the error.

Project

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example project name",
  "webhookUrl": "https://api.xrcloud.app/events/webhook",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "faviconUrl": "https://api.xrcloud.app/storage/favicon/4a3/4a3e946e-2776-4182-afb7-204d982b727d.ico",
  "logoUrl": "https://api.xrcloud.app/storage/favicon/51d/51dc73cc-36db-4046-af8d-1e61e4b59c19.jpg"
}

Properties

Name Type Required Restrictions Description
id string false none (projectId) Unique ID of the Project.
name string false none Name of the Project.
webhookUrl string false none The endpoint of the external system that sends event information when a user enters or exits the Room. The Room enter/exit information will be sent as a POST request to the URL. You can use this value to record the user's activity.
Note: As of 2024-12-01, the IP and UserAgent values are not being sent correctly.

Example:

json<br> {<br> "code": "room-join",<br> "resourceId": "c322b49b-6e12-47d9-b293-b5ab3727459c",<br> "sessionId": "4f7edfb6-b8a1-4f58-96ee-1deb4da98740",<br> "reticulumId": "0934212312120(XRCLOUD's user ID for getRoom, the userId will be created.)",<br> "logTime": "2023-12-12T09:27:41.600Z",<br> "action": "enter",<br> "ip": "123.0.0.1",<br> "userAgent": "Mozilla/5.0",<br> "device": "VR"<br> }<br>
createdAt string(date-time) false none Date and time when the Project was created.
updatedAt string(date-time) false none Date and time when the Project was last updated.
faviconUrl string false none URL of the favicon of the Project.
logoUrl string false none URL of the logo of the Project.

Scene

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example scene name",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg",
  "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}

Properties

Name Type Required Restrictions Description
id string false none (sceneId) Unique ID of the Scene.
name string false none Name of the Scene.
createdAt string(date-time) false none Date and time when the Scene was created.
updatedAt string(date-time) false none Date and time when the Scene was last updated.
thumbnailUrl string false none Thumbnail URL of the Scene.
sceneModificationUrl string false none URL of the space to modify the Scene.

Room

{
  "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "name": "example room name",
  "size": 10,
  "tags": [],
  "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
  "createdAt": "2023-07-12T09:27:41.600Z",
  "updatedAt": "2023-07-12T09:27:41.600Z",
  "returnUrl": "https://www.google.com/",
  "roomUrl": {
    "public": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
    },
    "private": {
      "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
      "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
    }
  },
  "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
}

Properties

Name Type Required Restrictions Description
id string false none (roomId) Unique ID of the Room.
name string false none Name of the Room.
size number false none Maximum number of people that can enter the Room.
tags array false none (Before Use) Field to distinguish specific Rooms.
sceneId string false none ID of the Scene (uuid).
createdAt string(date-time) false none Date and time when the Room was created.
updatedAt string(date-time) false none Date and time when the Room was last updated.
returnUrl string false none URL to return to when leaving the Room.
roomUrl object false none Room entry URL.
» public object false none Users cannot distinguish between URLs that do not change. Users cannot distinguish between URLs that do not change.
»» host string false none Room URL of the host.
»» guest string false none Room URL of the guest.
» private object false none Users can distinguish between URLs that change with each request to get the URL. Users can distinguish between URLs that change with each request to get the URL.
»» host string false none Room URL of the host.
»» guest string false none Room URL of the guest.
thumbnailUrl string false none Thumbnail URL of the Room.

GetScenesSuccessResponse

{
  "items": [
    {
      "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
      "name": "example scene name",
      "createdAt": "2023-07-12T09:27:41.600Z",
      "updatedAt": "2023-07-12T09:27:41.600Z",
      "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg",
      "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
    }
  ],
  "total": 0,
  "skip": 0,
  "take": 0
}

Properties

Name Type Required Restrictions Description
items [Scene] false none List of Scenes.
total number false none Total number of Scenes.
skip number false none Number of items skipped for pagination.
take number false none Number of items retrieved for pagination.

GetSceneCreationUrlSuccessResponse

{
  "sceneCreationUrl": "https://room.xrcloud.app:4000/spoke/projects/new?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}

Properties

Name Type Required Restrictions Description
sceneCreationUrl string false none URL of the space to create the Scene.

CreateRoomRequest

{
  "projectId": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
  "sceneId": "1234e5ba-5678-4f7a-86ed-abcd95ea1efg",
  "name": "example room name",
  "returnUrl": "https://www.google.com/",
  "size": 10
}

Properties

Name Type Required Restrictions Description
projectId uuid true none Unique ID of the Project.
sceneId uuid true none Unique ID of the Scene.
name string true none Name of the Room.
returnUrl string true none URL to return to when leaving the Room.
size number false none Maximum number of people that can enter the Room.

GetRoomsSuccessResponse

{
  "items": [
    {
      "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
      "name": "example room name",
      "size": 10,
      "tags": [],
      "sceneId": "c322b49b-6e12-47d9-b293-b5ab3727459c",
      "createdAt": "2023-07-12T09:27:41.600Z",
      "updatedAt": "2023-07-12T09:27:41.600Z",
      "returnUrl": "https://www.google.com/",
      "roomUrl": {
        "public": {
          "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=35e75895-9db7-4eee-bae3-87e20ee156dc",
          "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?public=a0166051-1eee-44bb-922a-c988d517a0e1"
        },
        "private": {
          "host": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=fdc306b9-5129-4d83-86d5-52836afeee7e",
          "guest": "https://room.xrcloud.app:4000/7UizZDL/example-room-name?private=72dde871-33d7-4aa3-a8a9-73b8b5f0458d"
        }
      },
      "thumbnailUrl": "https://api.xrcloud.app/files/852a6f47-3978-4201-a637-9699d7845266.jpg"
    }
  ],
  "total": 0,
  "skip": 0,
  "take": 0
}

Properties

Name Type Required Restrictions Description
items [Room] false none List of Rooms.
total number false none Total number of Rooms.
skip number false none Number of items skipped for pagination.
take number false none Number of items retrieved for pagination.

GetRoomLogsSuccessResponse

{
  "id": "77",
  "infraUserId": "user@domain.com",
  "roomId": "1234e5ba-5678-4f7a-86ed-abcd95ea1efg",
  "sessionId": "4f7edfb6-b8a1-4f58-96ee-1deb4da98740",
  "joinedAt": "2023-12-12T09:27:41.600Z",
  "exitedAt": "2023-12-12T09:30:41.600Z"
}

Properties

Name Type Required Restrictions Description
id number false none Unique ID of the entrance/exit log.
infraUserId uuid false none User ID of the 3rd-party application that entered the Room.
roomId uuid false none Unique ID of the Room.
sessionId uuid false none Unique ID of the Session.
joinedAt string(date-time) false none Date and time when the user entered the Room.
exitedAt string(date-time) false none Date and time when the user exited the Room.

UpdateRoomRequest

{
  "name": "example room name",
  "size": 10,
  "returnUrl": "https://www.google.com/"
}

Properties

Name Type Required Restrictions Description
name string false none Name of the Room.
size number false none Maximum number of people that can enter the Room.
returnUrl string false none URL to return to when leaving the Room.