Download OpenAPI specification:Download
All API calls in this document require an ApiKey.
ApiKey from My page in the upper right corner after logging into the XRCLOUD page.XRCLOUD delivers event logs to the configured webhook URL whenever specific Room and Scene events occur.
Room Events
Scene Events
Webhook Request Information
Request Data Format
{
"code": "room-join", // Type of event that occurred
"resourceId": "uuid", // Room/Scene ID
"sessionId": "uuid", // Session ID
"reticulumId": "string", // XRCLOUD(Hubs) user ID
"logTime": "2024-01-01T00:00:00Z", // Timestamp when the event occurred
"action": "string", // Specific action performed (e.g., "enter", "exit")
"ip": "string", // User IP (extracted from X-Forwarded-For header)
"userAgent": "string", // User browser information
"device": "string" // User's device type (pc/mobile/vr)
}```
**Note**:
- The webhook URL can be set when creating or modifying a Project.
- Currently, ip and userAgent values may not be transmitted correctly.
- If the webhook request response returns a status code of 300 or higher, it will be treated as an error.
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.
Fetch projects filtered by label. Use the label query parameter to filter projects by a specific label.
| label | string The label of the project to filter. If not provided, all projects will be returned. |
| X-XRCLOUD-API-KEY required | string You must include the |
[- {
- "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
- "name": "example project name",
- "createdAt": "2023-07-12T09:27:41.600Z",
- "updatedAt": "2023-07-12T09:27:41.600Z",
}
]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.
| favicon | string <binary> Favicon file for the project. |
| logo | string <binary> Logo file for the project. |
| name | string Name of the project. |
| label | string Label of the project. |
{- "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
- "name": "example project name",
- "createdAt": "2023-07-12T09:27:41.600Z",
- "updatedAt": "2023-07-12T09:27:41.600Z",
}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.
| projectId required | string Unique ID of the project. |
| accountId required | string Account ID of the user. |
| X-XRCLOUD-API-KEY required | string You must include the |
{ }| X-XRCLOUD-API-KEY required | string You must include the |
{- "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
- "name": "example project name",
- "createdAt": "2023-07-12T09:27:41.600Z",
- "updatedAt": "2023-07-12T09:27:41.600Z",
}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.
optId value is a callback value used by XRCLOUD to verify Scene creation and modification. Modifying it may cause errors.| projectId required | uuid Unique ID of the Project. |
| name | string (search) Retrieve objects with the specified name. |
| creator | string (search) Retrieve objects created by a specific creator. |
| take | number (pagination) The number of items to retrieve. |
| skip | number (pagination) The number of items to skip. |
| X-XRCLOUD-API-KEY required | string You must include the |
{- "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",
- "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}
], - "total": 0,
- "skip": 0,
- "take": 0
}| projectId required | uuid Unique ID of the Project. |
| creator | string 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 | string Example: callback=https://api.xrcloud.app/rooms 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 }) } |
| X-XRCLOUD-API-KEY required | string You must include the |
{
}| X-XRCLOUD-API-KEY required | string You must include the |
{- "id": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
- "name": "example scene name",
- "createdAt": "2023-07-12T09:27:41.600Z",
- "updatedAt": "2023-07-12T09:27:41.600Z",
- "sceneModificationUrl": "https://room.xrcloud.app:4000/spoke/projects/ASJCJK1?optId=35e75895-9db7-4eee-bae3-87e20ee156dc"
}| X-XRCLOUD-API-KEY required | string You must include the |
{- "statusCode": 400,
- "method": "Method",
- "url": "/example/endpoint",
- "body": {
- "key": "value"
}, - "message": "Detailed error messages"
}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.
| X-XRCLOUD-API-KEY required | string You must include the |
| projectId required | uuid Unique ID of the Project. |
| sceneId required | uuid Unique ID of the Scene. |
| name required | string Name of the Room. |
| returnUrl required | string URL to return to when leaving the Room. |
| size | number Maximum number of people that can enter the Room. |
{- "projectId": "f24ee5ba-8f1f-4f7a-86ed-738f95ea1f8b",
- "sceneId": "1234e5ba-5678-4f7a-86ed-abcd95ea1efg",
- "name": "example room name",
- "size": 10
}{- "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",
- "roomUrl": {
},
}This API must include either projectId or sceneId.
| projectId | uuid Unique ID of the Project. |
| sceneId | uuid Unique ID of the Scene. |
| name | string (search) Retrieve objects with the specified name. |
| userId | string User of the Project (app). It is used to distinguish between users who enter the Room. |
| avatarUrl | string Example: avatarUrl=https://storage.com/bucket/avatar-file.glb The path to the avatar file for the Room. |
| linkPayload | string Example: linkPayload=userName:Tom|UserGrade:10 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 | number (pagination) The number of items to retrieve. |
| skip | number (pagination) The number of items to skip. |
| X-XRCLOUD-API-KEY required | string You must include the |
{- "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",
- "roomUrl": {
},
}
], - "total": 0,
- "skip": 0,
- "take": 0
}| userId | string User of the Project (app). It is used to distinguish between users who enter the Room. |
| avatarUrl | string Example: avatarUrl=https://storage.com/bucket/avatar-file.glb The path to the avatar file for the Room. |
| linkPayload | string Example: linkPayload=userName:Tom|UserGrade:10 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. |
| X-XRCLOUD-API-KEY required | string You must include the |
{- "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",
- "roomUrl": {
},
}| X-XRCLOUD-API-KEY required | string You must include the |
| name | string Name of the Room. |
| size | number Maximum number of people that can enter the Room. |
| returnUrl | string URL to return to when leaving the Room. |
{- "name": "example room name",
- "size": 10,
}{- "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",
- "roomUrl": {
},
}| X-XRCLOUD-API-KEY required | string You must include the |
{- "statusCode": 400,
- "method": "Method",
- "url": "/example/endpoint",
- "body": {
- "key": "value"
}, - "message": "Detailed error messages"
}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.)
| X-XRCLOUD-API-KEY required | string You must include the |
[- {
- "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
}
]