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
  • Create Project
  • Get Project
  • Get All Project
  • Update Project
  • Delete Project
  • Get Project JSON
  • Update JSON
  • Apply JSON Patches
  • Duplicate Project

Was this helpful?

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

Project

PreviousGMetri SDK APIsNextDeployment

Last updated 2 years ago

Was this helpful?

Any experience is called a "project" in the GMetri SDK.

The field you are most interested in is the "json" field, which is an object of type RecordNode<RT.project>

Changes to the project body (project.json) can be sent in via the updateJSON API which takes in the whole json at once or the applyJSONPatches which allows you send in an array of diffs.

In case you send patches, they need to be an array of type "JSON patches"

Project Schema
  • id: Unique id for every project

  • uuid: Unique string identifier for every project (UUID format)

  • name: Name of the project (has to be unique for per workspace for every project)

  • thumbnail: The thumbnail URL

  • created_at: Create at timestamp

  • modified_at: Modified at timestamp

  • organization_id: Unique id of the organization this project belongs to

  • json: the body of the project. Of type RecordNode<RT.project>

Create Project

POST https://api.gmetri.com/sdk/project/create

Create new project with default JSON.

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

name*

String

The name of project

orgSlug*

String

The unique identification string of organization

{
    "status": {
        "success": true
    },
    "data": {
        "id": 37,
        "name": "Mitul Test",
        "uuid": "9ead035f-1ec4-45c8-9fcc-2aaedfc8c4f8",
        "thumbnail": null,
        "created_at": "2022-10-20T18:07:14.193625",
        "modified_at": "2022-10-20T18:07:14.193625",
        "organization_id": 6
    }
}

Get Project

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

Get the project using project uuid

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

projUuid*

String

Unique identifier of the project (UUID format)

{
    "status": {
        "success": true
    },
    "data": {
        "id": 33,
        "name": "test7 (1)",
        "uuid": "6ee092d0-bc12-4c89-8d75-05ba9ea50218",
        "thumbnail": "https://s.vrgmetri.com/image/w_400,q_90/gb-web/r3f-ui/assets/pano/0_grid_02_white.jpg",
        "created_at": "2022-10-19T09:24:32.20418",
        "modified_at": "2022-10-19T09:25:10.131",
        "organization_id": 6
    }
}
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Error from z5api: No Authorization was found in request.headers"
}
{
    "status": {
        "success": false,
        "errorMessage": "Opps! Something went wrong. Please try again later."
    }
}

Get All Project

POST https://api.gmetri.com/sdk/project/getAll

Get all project for the orgnization

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

orgSlug*

String

searchString

String

Search project by name

sortKey*

String

Get project by sorted order by ["modified_at" | "created_at" | "name"]

orderBy*

String

"ASC" | "DESC"

limit*

String

No of records

offset*

String

Next page offset to support pagination

{
    "status": {
        "success": true
    },
    "data": {
        "projects": [
            {
                "id": 35,
                "name": "test7 (3)",
                "uuid": "b1e9360e-86bb-4a79-879a-02041a325d9a",
                "thumbnail": "https://s.vrgmetri.com/image/w_400,q_90/gb-web/r3f-ui/assets/pano/0_grid_02_white.jpg",
                "created_at": "2022-10-19T19:59:27.898471",
                "modified_at": "2022-10-19T19:59:27.988",
                "organization_id": 6
            },
            {
                "id": 34,
                "name": "test7 (2)",
                "uuid": "abd7409f-58f2-4fca-813b-761a47d47092",
                "thumbnail": "https://s.vrgmetri.com/image/w_400,q_90/gb-web/r3f-ui/assets/pano/0_grid_02_white.jpg",
                "created_at": "2022-10-19T09:25:24.306648",
                "modified_at": "2022-10-19T09:25:24.376",
                "organization_id": 6
            }
        ],
        "totalCount": 21
    }
}

Update Project

POST https://api.gmetri.com/sdk/project/update

Update project name or tag by project uuid

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

projUuid*

String

name

String

Project new name

tags

Array of String

Project tag

{
    "status": {
        "success": true
    },
    "data": {
        "id": 21,
        "name": "mitul test",
        "uuid": "39be32c8-0415-4b27-9667-d983de4fc07b",
        "thumbnail": "https://s.vrgmetri.com/image/w_400,q_90/gb-web/r3f-ui/assets/pano/0_grid_02_white.jpg",
        "created_at": "2022-09-22T18:47:38.708681",
        "modified_at": "2022-10-20T09:13:02.826",
        "organization_id": 6
    }
}

Delete Project

POST https://api.gmetri.com/sdk/project/delete

Delete project by project uuid

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

projUuid*

String

{
    "status": {
        "success": true
    }
}

Get Project JSON

POST https://api.gmetri.com/sdk/project/getJSON

Get Project JSON by project uuid

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

projUuid*

String

{​
  "status": {​
    "success": true,​
    "errorCode": "string",​
    "errorMessage": "string"​
  },​
  "data": RecordNode<RT.project> //project's rJSON​
​}

Update JSON

POST https://api.gmetri.com/sdk/project/updateJSON

Update project json(RecordNode<RT.project>) by project uuid

Headers

Name
Type
Description

Authorization*

String

Token <apiToken>

Request Body

Name
Type
Description

projUuid*

String

json*

Object

rJSON of the project RecordNode<RT.project>

{
    "status": {
        "success": true
    }
}

Apply JSON Patches

POST https://api.gmetri.com/sdk/project/applyJSONPatches

Apply JSON patches and by getting diff JSON and update new JSON by project uuid

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

projUuid*

String

patches*

Object

{
    "status": {
        "success": true
    }
}

Duplicate Project

POST https://api.gmetri.com/sdk/project/duplicate

Make copy of project inside same organization

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

projUuid*

String

orgSlug*

String

{
    "status": {
        "success": true
    },
    "data": {
        "projectUuid": "b1e9360e-86bb-4a79-879a-02041a325d9a" // copy project uuid
    }
}

JSON patches

https://immerjs.github.io/immer/patches/
https://immerjs.github.io/immer/patches/