LogoLogo
DocumentationWebsiteCommunityPortal
  • Get Started
    • Quickstart
    • Tutorials
    • Wizards
  • Features
    • Release Notes
      • 2024
        • 04-05 Apr Update
        • 03-27 Mar Update
        • 02-07 Feb Update
        • 01-23 Jan Update
        • 01-05 Jan Update
      • 2023
        • 12-18 Dec Update
        • 11-30 Nov Update
        • 10-30 Oct Update
        • 10-04 Oct Update
        • 09-18 Sep Update
        • 09-11 Sep Update
        • 08-28 Aug Update
        • 08-14 Aug Update
        • 07-23 July Update
        • 07-14 July Update
        • 06-16 June Update
        • 06-6 June Update
        • 05-16 May Update
        • 03-31 Mar Update
        • 03-16 Mar Update
        • 03-10 Mar Update
        • 02-07 Feb Update
        • 01-24 Jan Update
        • 01-10 Jan Update
      • 2022
        • 12-08 Dec Update
        • 11-13 Nov Update
        • 11-07 Nov Update
        • 10-26 Oct Update
        • 10-14 Oct Update
        • 10-01 Oct Update
        • 08-26 Aug Update
        • 08-02 Aug Update
        • 07-01 July Update
        • 06-08 June Update
        • 05-20 May Update
        • 05-05 May Update
        • 04-25 Apr Update
        • 02-11 Feb Update
        • 01-28 Jan Update
        • 01-10 Jan Update
      • 2021
        • 12-10 Dec Update
        • 12-01 Dec Update
        • 11-26 Nov Update
        • 11-17 Nov Update
        • 11-12 Nov Update
        • 11-09 Nov Update
        • 11-02 Nov Update
        • 10-26 Oct Update
        • 10-21 Oct Update
        • 10-14 Oct Update
        • 09-27 Sep Update
        • 08-31 Aug Update
        • 07-20 July Update
        • 07-02 July Update
        • 06-31 June Update
  • Metaverse
    • Building
      • Portal
        • Team Members
        • Defining Global Variables
      • Editor
        • File Manager
          • Selecting a file
          • Sketchfab Integration
        • Placement in 3D Space
        • Project Settings
          • Preferences
          • Branding
          • Collaborators
          • Menu
          • Variables in Settings
          • Lead Generation
          • Tour Mode
          • Advanced
          • E-Commerce in Settings
        • Preview
          • Headset Testing - WebXR Emulator
        • Viewport Properties
        • Editor Keyboard Shortcuts
      • Scenes
        • 3D Scene
          • Avatar System
          • Colliders
          • Zones
          • Lights
        • 360 Scene
        • Orbit Scene
      • Elements
        • Image
        • Video
        • Audio
        • GIF
        • Text to Speech
        • Character
        • Character AI
        • Actionbar
        • Timer
        • Polygon
        • Linked Popups
        • Variants
      • Rules
        • Shared Rules
        • How Rules Work
        • Number Variable Rules
        • String Variable Rules
        • Boolean Variable Rules
      • Variables
        • Autogenerated Variables
        • String Substitution
        • Capturing User Input
      • Build FAQs
    • Publishing
      • URL or QR Code
      • Embed on your Website
      • Full-Page HTML
      • Embedding within Apps
        • Android Embed
        • React Native Embed
      • Export as SCORM package
      • Authentication
        • SSO
        • Password With Expiry
        • Email with OTP
        • Custom List
        • Token
        • Load from another Experience
      • Publishing FAQs
      • Private Cloud Deployment
    • Multiplayer
      • Host Mode
      • Broadcast Mode
      • Voice Chat
      • Text Chat
      • Video Chat
      • Screenshare
      • Comments
      • Share Reactions
      • Notifications
      • Troubleshooting webcam and microphone
    • Analytics
      • Advanced Analytics
      • Leaderboard
      • Viewer Sessions
    • Integrations
      • GMetri with SCORM
        • Embed a SCORM package in a GMetri experience
      • Live Stream on GMetri
        • Live Stream Zoom on YouTube
        • Live Stream Zoom on Vimeo
          • Zoom Setup
      • E-Commerce with GMetri
        • Shopify Integration
        • WooCommerce Integration
        • Custom Integration
        • Using an E-Commerce Plugin
      • Adding a Chatbot
      • Sending data to GMetri Deployment
    • Viewing
      • Avatars
      • First/Third Person
      • Concurrency
      • Oculus Controls
      • Viewer Keyboard Shortcuts
      • IT Permissions
        • Whitelisting for Viewing Experiences
        • Whitelisting for Editing Experiences
        • Whitelisting for Analytics
        • Subprocessors
    • GMetri SDK
      • GMetri Player
      • GMetri SDK APIs
        • Project
        • Deployment
        • File
        • Viewer Group
      • GMetri Webhooks
      • API Token
      • Examples
  • Guidelines/Compatibility
    • Guidelines
      • Content Creation Guidelines
        • XR Experience Storyboard
        • 360 Degree Video Shoots
        • Avatars vs Characters
        • Designing 3D Models for Immersive VR mode
      • Asset Guidelines
        • 3D Models
          • Export GLB/GLTF from 3DS Max
          • Export GLB/GLTF from Blender
        • 360 Pano Images Render
        • Resources for Assets
        • Asset FAQs
        • Image Aspect Ratio
      • Experience Optimizations
        • Scene Optimizations
          • Performance Monitor
        • Image Optimizations
        • Audio Optimizations
        • Video Optimizations
        • 3D Model Optimizations
      • Workflows
        • Green Screen
          • Apply Green Screen to Videos
          • Accurate Color Selection
        • QR Code Scanner
        • Adding Sprites
        • Adding Background Music & Persistent Logo
        • EmbedHTML Snippets
    • Compatibility
      • Platform Requirements - Viewer
      • Platform Compatibility Matrix
      • Supported File Formats
      • Supported Browsers
      • Capture Network and Console Logs from Chrome Browser
    • Limitations
      • iOS Limitations
      • VR Mode Limitations
  • Platform
    • Billing
    • Platform FAQs
    • Security
    • Legal
Powered by GitBook
On this page
  • Upload File From URL
  • Get File
  • Create Folder
  • List Folder
  • Get Root File ID

Was this helpful?

Edit on GitHub
Export as PDF
  1. Metaverse
  2. GMetri SDK
  3. GMetri SDK APIs

File

File Schema
  • id: Unique id for every file

  • parent_id: Unique id for parent file

  • name: name of the file

  • is_folder: File type, True means folder and false means file

  • ext:

  • type: Type of file

  • file_paths: paths of file

  • uuid: Unique identifier string(UUID Format)

  • size: Size of the file

  • active: Active/Inactive state of file

  • created_at: File creation timestamp

  • modified_at: Last modified timestamp of file

  • mime_type: Mime type of the file

  • num_files:

  • lable: The lable of the file

  • metadata: The file metadata

  • file_urls: The actual url of the file

Upload File From URL

POST https://api.gmetri.com/sdk/file/uploadFileFromURL

Create new file from url

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

Unique identifier string of the organization

url*

String

The file url

relativePath

String

name

String

Name of the file

thumbnailURL

String

The url of thumbnail

{
    "status": {
        "success": true
    },
    "data": {
        "id": 438554,
        "parent_id": 438477,
        "name": "1 (3).jpg",
        "is_folder": false,
        "ext": null,
        "type": "IMAGE",
        "file_paths": {
            "o": "o/1.jpg"
        },
        "uuid": "c6f34f02-0cb9-46b2-a40d-62ea41b895b7",
        "size": "44891",
        "active": true,
        "created_at": "2022-10-20T12:53:35.228Z",
        "modified_at": "2022-10-20T12:53:35.382Z",
        "mime_type": null,
        "num_files": null,
        "label": null,
        "metadata": null,
        "file_urls": {
            "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/o/1.jpg"
        }
    }
}

Get File

POST https://api.gmetri.com/sdk/file/get

Get file by id

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

Unique identifier string of the organization

fileId*

Number

Unique ID of the file

{
    "status": {
        "success": true
    },
    "data": {
        "id": 438555,
        "parent_id": 438477,
        "name": "1 (4).jpg",
        "is_folder": false,
        "ext": null,
        "type": "IMAGE",
        "file_paths": {
            "o": "o/1.jpg",
            "t": "t/1 (4).jpg"
        },
        "uuid": "c00b65c6-924c-47f9-a9e5-e13a88bd4bb8",
        "size": "44891",
        "active": true,
        "created_at": "2022-10-21T09:07:57.771Z",
        "modified_at": "2022-10-21T09:07:58.521Z",
        "mime_type": null,
        "num_files": null,
        "label": null,
        "metadata": {
            "ext": "jpg",
            "mimeType": "image/jpeg",
            "resolution": {
                "x": 550,
                "y": 368
            }
        },
        "file_urls": {
            "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg",
            "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/t/1%20(4).jpg",
            "r": "https://u.vrgmetri.com/image/{{TRANSFORM_PARAMS}}/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg"
        }
    }
}
{
    "status": {
        "success": false,
        "errorMessage": "No file found"
    }
}

Create Folder

POST https://api.gmetri.com/sdk/file/createFolder

Create folder by name inside given parent

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

Unique identifier string of the organization

name*

String

The name of folder

parentId*

Number

Parent folder unique id

{
    "status": {
        "success": true
    },
    "data": {
        "id": 438557,
        "parent_id": 438477,
        "name": "new folder (1)",
        "is_folder": true,
        "ext": null,
        "type": null,
        "file_paths": null,
        "uuid": null,
        "size": null,
        "active": true,
        "created_at": "2022-10-21T10:42:44.856Z",
        "modified_at": "2022-10-21T10:42:44.856Z",
        "mime_type": null,
        "num_files": null,
        "label": null,
        "metadata": null,
        "file_urls": {}
    }
}
{
    "status": {
        "success": false,
        "errorMessage": "The parent node doesn't belong to the root"
    }
}

List Folder

POST https://api.gmetri.com/sdk/file/listFolder

List all file and folder from root or parent folder

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

Unique identifier string of the organization

folderId*

Number

Parent folder unique id

{
    "status": {
        "success": true
    },
    "data": [
        {
            "id": 438551,
            "parent_id": 438477,
            "name": "1 (1).jpg",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/1.jpg",
                "t": "t/1 (1).jpg"
            },
            "uuid": "8f1453ed-417b-4502-988f-334550cda9b5",
            "size": "44891",
            "active": true,
            "created_at": "2022-10-19T10:24:21.367Z",
            "modified_at": "2022-10-19T10:24:22.076Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "jpg",
                "mimeType": "image/jpeg",
                "resolution": {
                    "x": 550,
                    "y": 368
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/8f1453ed-417b-4502-988f-334550cda9b5/o/1.jpg",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/8f1453ed-417b-4502-988f-334550cda9b5/t/1%20(1).jpg"
            }
        },
        {
            "id": 438553,
            "parent_id": 438477,
            "name": "1 (2).jpg",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/1.jpg",
                "t": "t/1 (2).jpg"
            },
            "uuid": "6a20110c-fcb9-4599-a16c-66190a227152",
            "size": "44891",
            "active": true,
            "created_at": "2022-10-19T20:25:05.934Z",
            "modified_at": "2022-10-19T20:25:06.589Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "jpg",
                "mimeType": "image/jpeg",
                "resolution": {
                    "x": 550,
                    "y": 368
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/6a20110c-fcb9-4599-a16c-66190a227152/o/1.jpg",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/6a20110c-fcb9-4599-a16c-66190a227152/t/1%20(2).jpg"
            }
        },
        {
            "id": 438554,
            "parent_id": 438477,
            "name": "1 (3).jpg",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/1.jpg",
                "t": "t/1 (3).jpg"
            },
            "uuid": "c6f34f02-0cb9-46b2-a40d-62ea41b895b7",
            "size": "44891",
            "active": true,
            "created_at": "2022-10-20T12:53:35.228Z",
            "modified_at": "2022-10-20T12:53:36.175Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "jpg",
                "mimeType": "image/jpeg",
                "resolution": {
                    "x": 550,
                    "y": 368
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/o/1.jpg",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c6f34f02-0cb9-46b2-a40d-62ea41b895b7/t/1%20(3).jpg"
            }
        },
        {
            "id": 438555,
            "parent_id": 438477,
            "name": "1 (4).jpg",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/1.jpg",
                "t": "t/1 (4).jpg"
            },
            "uuid": "c00b65c6-924c-47f9-a9e5-e13a88bd4bb8",
            "size": "44891",
            "active": true,
            "created_at": "2022-10-21T09:07:57.771Z",
            "modified_at": "2022-10-21T09:07:58.521Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "jpg",
                "mimeType": "image/jpeg",
                "resolution": {
                    "x": 550,
                    "y": 368
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/o/1.jpg",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/c00b65c6-924c-47f9-a9e5-e13a88bd4bb8/t/1%20(4).jpg"
            }
        },
        {
            "id": 438550,
            "parent_id": 438477,
            "name": "1.jpg",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/1.jpg",
                "t": "t/1.jpg"
            },
            "uuid": "07aa3620-d689-41b6-8089-9296c0f318b0",
            "size": "44891",
            "active": true,
            "created_at": "2022-10-19T10:22:10.758Z",
            "modified_at": "2022-10-19T10:22:11.532Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "jpg",
                "mimeType": "image/jpeg",
                "resolution": {
                    "x": 550,
                    "y": 368
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/07aa3620-d689-41b6-8089-9296c0f318b0/o/1.jpg",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/07aa3620-d689-41b6-8089-9296c0f318b0/t/1.jpg"
            }
        },
        {
            "id": 438479,
            "parent_id": 438477,
            "name": "image-1662354253607.png",
            "is_folder": false,
            "ext": null,
            "type": "IMAGE",
            "file_paths": {
                "o": "o/image-1662354253607.png",
                "t": "t/image-1662354253607.jpg"
            },
            "uuid": "1ffd81f0-21ab-4a84-9ff3-943d43804a4e",
            "size": "76351",
            "active": true,
            "created_at": "2022-09-15T10:21:38.019Z",
            "modified_at": "2022-09-15T10:21:38.660Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": {
                "ext": "png",
                "mimeType": "image/png",
                "resolution": {
                    "x": 932,
                    "y": 610
                }
            },
            "file_urls": {
                "o": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/1ffd81f0-21ab-4a84-9ff3-943d43804a4e/o/image-1662354253607.png",
                "t": "https://u.vrgmetri.com/gm-gb-test/media/2022-9/yzvcei/1ffd81f0-21ab-4a84-9ff3-943d43804a4e/t/image-1662354253607.jpg"
            }
        },
        {
            "id": 438481,
            "parent_id": 438477,
            "name": "imported",
            "is_folder": true,
            "ext": null,
            "type": null,
            "file_paths": null,
            "uuid": null,
            "size": null,
            "active": true,
            "created_at": "2022-09-22T10:30:28.782Z",
            "modified_at": "2022-09-22T10:30:28.782Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": null,
            "file_urls": {}
        },
        {
            "id": 438556,
            "parent_id": 438477,
            "name": "new folder",
            "is_folder": true,
            "ext": null,
            "type": null,
            "file_paths": null,
            "uuid": null,
            "size": null,
            "active": true,
            "created_at": "2022-10-21T10:42:11.772Z",
            "modified_at": "2022-10-21T10:42:11.772Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": null,
            "file_urls": {}
        },
        {
            "id": 438557,
            "parent_id": 438477,
            "name": "new folder (1)",
            "is_folder": true,
            "ext": null,
            "type": null,
            "file_paths": null,
            "uuid": null,
            "size": null,
            "active": true,
            "created_at": "2022-10-21T10:42:44.856Z",
            "modified_at": "2022-10-21T10:42:44.856Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": null,
            "file_urls": {}
        },
        {
            "id": 438558,
            "parent_id": 438477,
            "name": "new folder (2)",
            "is_folder": true,
            "ext": null,
            "type": null,
            "file_paths": null,
            "uuid": null,
            "size": null,
            "active": true,
            "created_at": "2022-10-21T10:57:39.351Z",
            "modified_at": "2022-10-21T10:57:39.351Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": null,
            "file_urls": {}
        },
        {
            "id": 438537,
            "parent_id": 438477,
            "name": "wizards",
            "is_folder": true,
            "ext": null,
            "type": null,
            "file_paths": null,
            "uuid": null,
            "size": null,
            "active": true,
            "created_at": "2022-09-22T10:35:07.122Z",
            "modified_at": "2022-09-22T10:35:07.122Z",
            "mime_type": null,
            "num_files": null,
            "label": null,
            "metadata": null,
            "file_urls": {}
        }
    ]
}
{
    "status": {
        "success": false,
        "errorMessage": "The parent node doesn't belong to the root"
    }
}

Get Root File ID

POST https://api.gmetri.com/sdk/file/getRootFileId

Get root file by root name

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

Unique identifier string of the organization

{
    "status": {
        "success": true
    },
    "data": {
        "file": {
            "id": 438477
        }
    }
}
{
    "status": {
        "success": false,
        "errorMessage": "No root file found"
    }
}
PreviousDeploymentNextViewer Group

Last updated 2 years ago

Was this helpful?