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
    }
  }
}

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.

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
    }
  }
}

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
    },
    "Workspaces": [
      {
        "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "Active": true,
        "Status": {
          "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 workspace.

    • 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.

  • 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.

    • 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
    },
    "Workspaces": [
      {
        "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
        "Active": true,
        "Status": {
          "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"
      }
    ]
  }
}

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 commit.

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.