Skip to main content
Skip table of contents

Asset Hub API - State

Server

State

The server has the following per-show state:

CODE
{
  "State": {}
}

Properties:

  • None.

To read and/or update the state, use commands Get, Set and Reset. The server will respond with command Update. Command Startup is sent by the server on startup.

Get topic

CODE
{"Type":"Get","Target":"AssetHubServer","Name":"State","RespondTo":"Explorer"}

Get message

CODE
{}

Set topic

CODE
{"Type":"Set","Target":"AssetHubServer","Name":"State"}

Set message

CODE
{
  "Value": {}
}

Reset topic

CODE
{"Type":"Reset","Target":"AssetHubServer"}

Reset message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "Explorer",
  "Source": "AssetHubServer",
  "Name": "State"
}

Update message

CODE
{
  "Value": {}
}

SystemInfo

The server has the following per-machine state:

CODE
{
  "SystemInfo": {
    "Status": {
      "Incoming": false,
      "Outcoming": false,
      "Activity": "Sync",
      "Stage": "Finalizing",
      "Current": 100,
      "Total": 100,
      "Progress": 1.0
    },
    "Clients": [
      {
        "Name": "MSI-AssetHubClient",
        "Status": {
          "Incoming": false,
          "Outcoming": false,
          "Activity": "Sync",
          "Stage": "Finalizing",
          "Current": 100,
          "Total": 100,
          "Progress": 1.0
        },
        "Engine": {
          "Running": true,
          "Type": "Editor",
          "Dirty": false,
          "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
          "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
          "Branch": "Main",
          "AutoPull": false,
          "Reload": false
        }
      }
    ]
  }
}

Properties:

  • Status - System info of the service.

    • Incoming - true if there are remote changes, otherwise false.

    • Outcoming - true if there are local changes, otherwise false.

    • Activity - One of Idle or Sync.

    • Stage - One of Initiating, InProgress or Finalizing.

    • Current - Current step.

    • Total - Total number of steps.

    • Progress - Progress information.

  • Clients - System info of client services.

    • Name - Name of the client service.

    • Status - System info of the service in respect to all active workspaces.

      • Incoming - true if there are remote changes, otherwise false.

      • Outcoming - true if there are local changes, otherwise false.

      • Activity - One of Idle or Sync.

      • Stage - One of Initiating, InProgress or Finalizing.

      • Current - Current step.

      • Total - Total number of steps.

      • Progress - Progress information.

    • Engine - System info of the service in respect to Engine.

      • Running - true if Engine (Editor or launched level) is running, otherwise false.

      • Type - One of Editor, PIE or Game.

      • Dirty - true if there are unsaved changes in Editor, otherwise false. If the Engine is not running, it is not provided.

      • Workspace - Name of workspace if the Engine is running from one of them, otherwise not provided.

      • Repository - Name of repository if Workspace is provided, otherwise not provided.

      • Branch - Name of branch if Workspace is provided, otherwise not provided.

      • AutoPull - Value of AutoPull flag if Workspace is provided, otherwise not provided.

      • Reload - true if Engine (Editor or launched level) is expected to be reloaded when new changes are pushed to the repository and branch, otherwise false. if Workspace is not provided, it is not provided.

To read the state, use command Get. The server will respond with command Update.

Get topic

CODE
{"Type":"Get","Target":"AssetHubServer","Name":"SystemInfo","RespondTo":"Explorer"}

Get message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "Explorer",
  "Source": "AssetHubServer",
  "Name": "SystemInfo"
}

Update message

CODE
{
  "Value": {
    "Status": {
      "Incoming": false,
      "Outcoming": false,
      "Activity": "Sync",
      "Stage": "Finalizing",
      "Current": 100,
      "Total": 100,
      "Progress": 1.0
    },
    "Clients": [
      {
        "Name": "MSI-AssetHubClient",
        "Status": {
          "Incoming": false,
          "Outcoming": false,
          "Activity": "Sync",
          "Stage": "Finalizing",
          "Current": 100,
          "Total": 100,
          "Progress": 1.0
        },
        "Engine": {
          "Running": true,
          "Type": "Editor",
          "Dirty": false,
          "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
          "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
          "Branch": "Main",
          "AutoPull": false,
          "Reload": false
        }
      }
    ]
  }
}

PersistentState

The server has the following per-machine state:

CODE
{
  "PersistentState": {
    "Repositories": [
      {
        "Name": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
        "Branches": [
          {
            "Name": "Main",
            "Commits": [
              {
                "ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
                "Author": "AssetHubServer",
                "Comment": "Root commit.",
                "CreatedAt": "2022-01-01T13:55:05.000Z",
                "Tags": ["v1.0"]
              }
            ]
          }
        ]
      }
    ]
  }
}

Properties:

  • Repositories - Repositories. See also commands GetRepositories, CreateRepository and CreateBranch.

    • Name - Name of the repository.

    • Branches - Branches in the repository.

      • Name - Name of the branch.

      • Commits - All commits related to the branch.

        • ID - ID of the commit.

        • Author - Author (machine name).

        • Comment - Comment.

        • CreatedAt - Creation timestamp.

        • Tags - Tags.

To read the state, use command Get. The server will respond with command Update.

Get topic

CODE
{"Type":"Get","Target":"AssetHubServer","Name":"PersistentState","RespondTo":"Explorer"}

Get message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "Explorer",
  "Source": "AssetHubServer",
  "Name": "PersistentState"
}

Update message

CODE
{
  "Value": {
    "PersistentState": {
      "Repositories": [
        {
          "Name": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
          "Branches": [
            {
              "Name": "Main",
              "Commits": [
                {
                  "ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
                  "Author": "AssetHubServer",
                  "Comment": "Root commit.",
                  "CreatedAt": "2022-01-01T13:55:05.000Z",
                  "Tags": ["v1.0"]
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Client

State

The client has the following per-show state:

CODE
{
  "State": {
    "Workspaces": {
      "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
        "AutoPull": true
      }
    }
  }
}

Properties:

  • Workspaces - Settings by workspaces. If workspace name contains . (dot), encode/decode it using string [dot].

    • AutoPull - Automatic pull of workspace. Workspace is pulled:

      • when Asset Hub client starts up and the AutoPull flag is enabled,

      • when there is a new commit on the server and the AutoPull flag is enabled,

      • when state has changed either using Set or Reset command and the AutoPull flag is enabled.

To read and/or update the state, use commands Get, Set and Reset. The client will respond with command Update. Command Startup is sent by the client on startup.

Get topic

CODE
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"State","RespondTo":"Explorer"}

Get message

CODE
{}

Set topic

CODE
{"Type":"Set","Target":"MSI-AssetHubClient","Name":"State"}

Set message

CODE
{
  "Value": {
    "Workspaces": {
      "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
        "AutoPull": true
      }
    }
  }
}

Reset topic

CODE
{"Type":"Reset","Target":"MSI-AssetHubClient"}

Reset message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "BROADCAST",
  "Source": "MSI-AssetHubClient",
  "Name": "State"
}

Update message

CODE
{
  "Value": {
    "Workspaces": {
      "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
        "AutoPull": true
      }
    }
  }
}

SystemInfo

The client has the following per-machine state:

CODE
{
  "SystemInfo": {
    "Status": {
      "Incoming": false,
      "Outcoming": false,
      "Activity": "Sync",
      "Stage": "Finalizing",
      "Current": 100,
      "Total": 100,
      "Progress": 1.0
    },
    "Engine": {
      "Running": true,
      "Type": "Editor",
      "Dirty": false,
      "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
      "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
      "Branch": "Main",
      "AutoPull": false,
      "Reload": false
    },
    "Workspaces": [
      {
        "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "Active": true,
        "Status": {
          "Attached": true,
          "Incoming": false,
          "Outcoming": false,
          "Activity": "Pull",
          "Stage": "Finalizing",
          "Auto": false,
          "Current": 100,
          "Total": 100,
          "Progress": 1.0,
          "Result": "Ok",
          "Code": "INTERNAL_ERROR",
          "Changed": true,
          "Message": "Done."
        }
      }
    ]
  }
}

Properties:

  • Status - System info of the service in respect to all active workspaces.

    • Incoming - true if there are remote changes, otherwise false.

    • Outcoming - true if there are local changes, otherwise false.

    • Activity - One of Idle or Sync.

    • Stage - One of Initiating, InProgress or Finalizing.

    • Current - Current step.

    • Total - Total number of steps.

    • Progress - Progress information.

  • Engine - System info of the service in respect to Engine.

    • Running - true if Engine (Editor or launched level) is running, otherwise false.

    • Type - One of Editor, PIE or Game.

    • Dirty - true if there are unsaved changes in Editor, otherwise false. If the Engine is not running, it is not provided.

    • Workspace - Name of workspace if the Engine is running from one of them, otherwise not provided.

    • Repository - Name of repository if Workspace is provided, otherwise not provided.

    • Branch - Name of branch if Workspace is provided, otherwise not provided.

    • AutoPull - Value of AutoPull flag if Workspace is provided, otherwise not provided.

    • Reload - true if Engine (Editor or launched level) is expected to be reloaded when new changes are pushed to the repository and branch, otherwise false. if Workspace is not provided, it is not provided.

  • Workspaces - System info by workspaces.

    • Name - Name of the workspace.

    • Active - true if it is a Common files workspace or Config files workspace or respective project is linked to current show, otherwise false.

    • Status - Status of the workspace.

      • Attached - true if the client is connected to server with matching workspace history, otherwise false.

      • Incoming - true if there are remote changes, otherwise false.

      • Outcoming - true if there are local changes, otherwise false.

      • Activity - One of Idle, Pull or Push.

      • Stage - One of Initiating, InProgress or Finalizing.

      • Auto - true if the activity has been started automatically, otherwise false.

      • Current - Current step.

      • Total - Total number of steps.

      • Progress - Progress information.

      • Result - Either Ok or Error.

      • Code - Error code in case Result is Error, otherwise not provided.

      • Changed - true if there were changes in the current operation, otherwise false.

      • Message - Message.

To read the state, use command Get. The server will respond with command Update.

Get topic

CODE
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"SystemInfo","RespondTo":"Explorer"}

Get message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "Explorer",
  "Source": "MSI-AssetHubClient",
  "Name": "SystemInfo"
}

Update message

CODE
{
  "Value": {
    "Status": {
      "Incoming": false,
      "Outcoming": false,
      "Activity": "Sync",
      "Stage": "Finalizing",
      "Current": 100,
      "Total": 100,
      "Progress": 1.0
    },
    "Engine": {
      "Running": true,
      "Type": "Editor",
      "Dirty": false,
      "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
      "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
      "Branch": "Main",
      "AutoPull": false,
      "Reload": false
    },
    "Workspaces": [
      {
        "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "Active": true,
        "Status": {
          "Attached": true,
          "Incoming": false,
          "Outcoming": false,
          "Activity": "Pull",
          "Stage": "Finalizing",
          "Auto": false,
          "Current": 100,
          "Total": 100,
          "Progress": 1.0,
          "Result": "Ok",
          "Code": "INTERNAL_ERROR",
          "Changed": true,
          "Message": "Done."
        }
      }
    ]
  }
}

PersistentState

The client has the following per-machine state:

CODE
{
  "PersistentState": {
    "SyncedConfigPath": "C:\\Pixotope\\23.2.0\\Synced Config",
    "SyncedStoragePath": "C:\\Pixotope\\Synced Storage",
    "SyncedCommonPath": "C:\\Pixotope\\Synced Storage\\Common",
    "SyncedProjectsPath": "C:\\Pixotope\\Synced Storage\\Projects",
    "Workspaces": [
      {
        "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "AbsolutePath": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "DisplayPath": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
        "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
        "Branch": "Main",
        "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
        "Commits": [
          {
            "ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
            "Author": "AssetHubServer",
            "Comment": "Root commit.",
            "CreatedAt": "2022-01-01T13:55:05.000Z",
            "Tags": ["v1.0"]
          }
        ]
      }
    ]
  }
}

Properties:

  • SyncedConfigPath - Location, where Config files workspace is stored on file system.

  • SyncedStoragePath - Location, where all other synchronized workspaces are stored on file system.

  • SyncedCommonPath - Location, where Common files workspace is stored on file system.

  • SyncedProjectsPath - Location, where all synchronized projects are stored on file system.

  • Workspaces - Workspaces. See also commands GetWorkspaces and CreateWorkspace.

    • Name - Name of the workspace.

    • AbsolutePath - Absolute path of the workspace directory.

    • DisplayPath - Display path of the workspace directory. If it is subdirectory of directory referenced by setting PersistentState.SyncedStoragePath, it will follow the pattern %SYNCED_STORAGE%\**\<Workspace name>. Otherwise, it will be an absolute path.

    • Repository - Name of the repository.

    • Branch - Name of the branch.

    • Commit - ID of the last pulled commit if exists, otherwise null.

    • Commits - All commits related to the workspace if respective repository and branch exists on the server, otherwise null. Notice the commits may not contain the last pulled commit if the workspace is not attached to the server.

      • ID - ID of the commit.

      • Author - Author (machine name).

      • Comment - Comment.

      • CreatedAt - Creation timestamp.

      • Tags - Tags.

To read the state, use command Get. The client will respond with command Update.

Get topic

CODE
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"PersistentState","RespondTo":"Explorer"}

Get message

CODE
{}

Update topic

CODE
{
  "Type": "Update",
  "Target": "BROADCAST",
  "Source": "MSI-AssetHubClient",
  "Name": "PersistentState"
}

Update message

CODE
{
  "Value": {
    "SyncedStoragePath": "C:\\Pixotope\\Synced Storage"
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.