Skip to main content
Skip table of contents

Asset Hub API - Calls

Server

GetRepositories

Get all repositories.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"GetRepositories","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "GetRepositories",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": [
    {
      "Name": "Default",
      "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:

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

Response message on failure

None.

CreateRepository

Create a new repository. In case of success, it broadcasts a PersistentState.Repositories update.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateRepository","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Name": "Default",
    "Branch": "Main"
  }
}

Properties:

  • Name - Name of the repository.

  • Branch - Branch to be created in the repository.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "CreateRepository",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
  }
}

Properties:

  • Commit - ID of root commit in the repository.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Repository with given name already exists.",
    "Code": "REPOSITORY_ALREADY_EXISTS"
  }
}

CreateBranch

Create a new branch in existing repository. In case of success, it broadcasts a PersistentState.Repositories update.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateBranch","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Name": "Develop",
    "Repository": "Default",
    "Branch": "Main"
  }
}

Properties:

  • Name - Name of the branch.

  • Repository - Name of the repository.

  • Branch - Name of the base branch.

  • Tag - Name of the base tag.

  • Commit - ID of the base commit.

  • Properties Branch, Tag and Commit are exclusive. If none of them is provided, an empty branch will be created from scratch.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "CreateBranch",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
  }
}

Properties:

  • Commit - ID of the last commit in the repository and branch.

Response message on failure

CODE
{
  "Failure": {
    "Message": "No such repository.",
    "Code": "NO_SUCH_REPOSITORY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such branch.",
    "Code": "NO_SUCH_BRANCH"
  }
}
CODE
{
  "Failure": {
    "Message": "No such tag.",
    "Code": "NO_SUCH_TAG"
  }
}
CODE
{
  "Failure": {
    "Message": "No such commit.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Commit does not belong to given repository.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Reference with given name already exists.",
    "Code": "REFERENCE_ALREADY_EXISTS"
  }
}

CreateTag

Create a new tag in existing repository. In case of success, it broadcasts a PersistentState.Repositories update.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateTag","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Name": "v1.0",
    "Repository": "Default",
    "Branch": "Main"
  }
}

Properties:

  • Name - Name of the tag.

  • Repository - Name of the repository.

  • Branch - Name of the base branch.

  • Tag - Name of the base tag.

  • Commit - ID of the base commit.

  • Properties Branch, Tag and Commit are exclusive.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "CreateTag",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
  }
}

Properties:

  • Commit - ID of commit to which the tag belongs.

Response message on failure

CODE
{
  "Failure": {
    "Message": "No such repository.",
    "Code": "NO_SUCH_REPOSITORY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such branch.",
    "Code": "NO_SUCH_BRANCH"
  }
}
CODE
{
  "Failure": {
    "Message": "No such tag.",
    "Code": "NO_SUCH_TAG"
  }
}
CODE
{
  "Failure": {
    "Message": "No such commit.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Commit does not belong to given repository.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Reference with given name already exists.",
    "Code": "REFERENCE_ALREADY_EXISTS"
  }
}

Commit

Commit changes to repository. In case of success, it broadcasts a Commit update. See client command OnAssetHubServerCommitUpdate.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"Commit","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Repository": "Default",
    "Branch": "Main",
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
    "Author": "MSI-AssetHubClient",
    "Comment": "No comment.",
    "Changes": [
      {
        "Type": "PutFile",
        "URI": "FileSystem:/pixotope.mp4",
        "Blocks": [
          "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f",
          "f28ad8dca5901824f00d925316fa422b84c3999d69021a4e7a40cf6a205f9a99",
          "5b1deb8a41ababa6f848021fa805de30b2b3e219b11e673b495dab85d2843fcd",
          "4192299ae5fb60e2e33651dd031323c9a7b5b196861b7241c71275d544b19f09"
        ]
      },
      {
        "Type": "PutDirectory",
        "URI": "FileSystem:/textures"
      },
      {
        "Type": "Delete",
        "URI": "FileSystem:/meshes"
      }
    ]
  }
}

Properties:

  • Repository - Repository to commit changes to.

  • Branch - Branch to commit changes to.

  • Commit - ID of the last commit in the repository and branch (as believed by client). If not null and it differs from real ID of the last commit on the server, the server will reject the commit. This property can be used for purposes of optimistic locking. Can be null if the client is not concerned about overwriting unknown commit on the server.

  • Author - Author of the commit. We recommend to use machine name.

  • Comment - Comment associated with the commit.

  • Changes - Changes to be committed.

    • Type - One of PutFile, PutDirectory or Delete.

    • URI - URI identifying the asset. All files and directories start with schema FileSystem:/. Other kinds of assets may start with different schema in the future.

    • Blocks - Hashes (algorithm: sha256, encoding: hex) of data blocks of which file consists of. Only applicable if Type is PutFile.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "Commit",
  "ID": "correlation1"
}

Response message on success

If some blocks are missing on the server, it will report them using the response shown below. Client should then use command PutBlock to upload them to the server and try to repeat command Commit. Server can respond with similar response again, as there is maximum limit of the number of blocks asked at once.

CODE
{
  "Result": {
    "Blocks": [
      "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f",
      "f28ad8dca5901824f00d925316fa422b84c3999d69021a4e7a40cf6a205f9a99",
      "5b1deb8a41ababa6f848021fa805de30b2b3e219b11e673b495dab85d2843fcd"
    ]
  }
}

Properties:

  • Blocks - Blocks missing on the server, limited to maximum number.

If all blocks are present and there is no other error, the server will send the response shown below.

CODE
{
  "Result": {
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
  }
}

Properties:

  • Commit - ID of the new commit.

Response message on failure

CODE
{
  "Failure": {
    "Message": "No such repository.",
    "Code": "NO_SUCH_REPOSITORY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such branch.",
    "Code": "NO_SUCH_BRANCH"
  }
}
CODE
{
  "Failure": {
    "Message": "There have been new commits on the server meanwhile.",
    "Code": "OPTIMISTIC_LOCKING_FAILED"
  }
}
CODE
{
  "Failure": {
    "Message": "No such commit. Has the server changed to different machine?",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Invalid URI \"FileSystem:/../pixotope.mp4\".",
    "Code": "INVALID_URI"
  }
}
CODE
{
  "Failure": {
    "Message": "No changes.",
    "Code": "NO_CHANGES"
  }
}
CODE
{
  "Failure": {
    "Message": "Duplicate URIs.",
    "Code": "DUPLICATE_URIS"
  }
}
CODE
{
  "Failure": {
    "Message": "Change for asset \"FileSystem:/pixotope.mp4\" has no effect.",
    "Code": "CHANGE_HAS_NO_EFFECT"
  }
}

Fetch

Fetch changes from repository.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"Fetch","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Repository": "Default",
    "BaseCommit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
    "Branch": "Main"
  }
}

Properties:

  • Repository - Repository to fetch changes from.

  • BaseCommit - ID of the base commit (where clients workspace is at). If not null, the server will respond with changes leading from the given commit to the last commit. Can be null if the client is interested in all changes since the beginning of changelog.

  • Branch - Name of the target branch.

  • Tag - Name of the target tag.

  • Commit - ID of the target commit.

  • Properties Branch, Tag and Commit are exclusive.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "Fetch",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
    "Changes": [
      {
        "Type": "PutFile",
        "URI": "FileSystem:/pixotope.mp4",
        "Blocks": [
          "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f",
          "f28ad8dca5901824f00d925316fa422b84c3999d69021a4e7a40cf6a205f9a99",
          "5b1deb8a41ababa6f848021fa805de30b2b3e219b11e673b495dab85d2843fcd",
          "4192299ae5fb60e2e33651dd031323c9a7b5b196861b7241c71275d544b19f09"
        ]
      },
      {
        "Type": "PutDirectory",
        "URI": "FileSystem:/textures"
      },
      {
        "Type": "Delete",
        "URI": "FileSystem:/meshes"
      }
    ]
  }
}

Properties:

  • Commit - ID of the fetched commit.

  • Changes - Changes to be fetched.

    • Type - One of PutFile, PutDirectory or Delete.

    • URI - URI identifying the asset. All files and directories start with schema FileSystem:/. Other kinds of assets may start with different schema in the future.

    • Blocks - Hashes (algorithm: sha256, encoding: hex) of data blocks of which file consists of. Only applicable if Type is PutFile.

Client can then use command GetBlock to download missing blocks from the server.

Response message on failure

CODE
{
  "Failure": {
    "Message": "No such repository.",
    "Code": "NO_SUCH_REPOSITORY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such base commit. Has the server changed to different machine?",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Base commit does not belong to given repository.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "No such branch.",
    "Code": "NO_SUCH_BRANCH"
  }
}
CODE
{
  "Failure": {
    "Message": "No such tag.",
    "Code": "NO_SUCH_TAG"
  }
}
CODE
{
  "Failure": {
    "Message": "No such commit.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Commit does not belong to given repository.",
    "Code": "NO_SUCH_COMMIT"
  }
}

PutBlock

Upload block of data to the server.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"PutBlock","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Hash": "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f"
  }
}

Properties:

  • Hash - Hash (algorithm: sha256, encoding: hex) of the block of data.

The raw binary data must be sent as an attachment (3rd message part).

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "PutBlock",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Storage is busy.",
    "Code": "STORAGE_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "Invalid hash.",
    "Code": "INVALID_HASH"
  }
}
CODE
{
  "Failure": {
    "Message": "Invalid length of block.",
    "Code": "INVALID_BLOCK_LENGTH"
  }
}

GetBlock

Download block of data from the server.

Request topic

CODE
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"GetBlock","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Hash": "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f"
  }
}

Properties:

  • Hash - Hash (algorithm: sha256, encoding: hex) of the block of data.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "AssetHubServer",
  "Method": "GetBlock",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

The raw binary data is sent as an attachment (3rd message part).

Response message on failure

CODE
{
  "Failure": {
    "Message": "Storage is busy.",
    "Code": "STORAGE_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such block.",
    "Code": "NO_SUCH_BLOCK"
  }
}

Client

GetProjects

Get all projects in directory referenced by setting PersistentState.SyncedProjectsPath. For purposes of this command, the following conditions must be met by a directory to be considered a project:

  • It is located under the directory referenced by setting PersistentState.SyncedProjectsPath, no matter the depth.

  • It contains a .uproject file.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetProjects","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "GetProjects",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": [
    {
      "AbsolutePath": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
      "DisplayPath": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
      "ProjectPath": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha\\Project Alpha.uproject",
      "Workspace": "Project Alpha"
    }
  ]
}

Properties:

  • AbsolutePath - Absolute path of the project directory.

  • DisplayPath - Display path of the project 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.

  • ProjectPath - Absolute path of the .uproject file.

  • Workspace - Name of the workspace if it exists for given directory, otherwise null.

Response message on failure

None.

GetSyncedStoragePath

Get synced storage path.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetSyncedStoragePath","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "GetSyncedStoragePath",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": "C:\\Pixotope\\Synced Storage"
}

Properties:

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

Response message on failure

None.

GetWorkspaces

Get all workspaces.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetWorkspaces","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "GetWorkspaces",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": [
    {
      "Name": "Default",
      "AbsolutePath": "C:\\Pixotope\\Synced Storage\\Common",
      "DisplayPath": "%SYNCED_STORAGE%\\Common",
      "Repository": "Default",
      "Branch": "Main",
      "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4" 
    }
  ]
}

Properties:

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

Response message on failure

None.

CreateWorkspace

Create a new workspace. In case of success, it broadcasts a State.Workspaces and PersistentState.Workspaces update.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"CreateWorkspace","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Name": "Default",
    "Path": "%SYNCED_STORAGE%\\Common",
    "Repository": "Default",
    "Branch": "Main"
  }
}

Properties:

  • Name - Name of the workspace.

  • Path - Path to the workspace directory. It should be pointing to an existing, writable directory on file system. It must be either absolute or follow the pattern %SYNCED_STORAGE%\**\<Workspace name>. The placeholder %SYNCED_STORAGE% refers to property PersistentState.SyncedStoragePath.

  • Repository - Repository to link the workspace to.

  • Branch - Branch to link the workspace to.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "CreateWorkspace",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Workspace with given name already exists.",
    "Code": "WORKSPACE_ALREADY_EXISTS"
  }
}
CODE
{
  "Failure": {
    "Message": "Workspace for given path already exists.",
    "Code": "WORKSPACE_ALREADY_EXISTS"
  }
}
CODE
{
  "Failure": {
    "Message": "Workspace path must be either absolute or follow the pattern \"%SYNCED_STORAGE%\\**\\<Workspace name>\"",
    "Code": "INVALID_PATH"
  }
}

DeleteWorkspace

Delete a workspace. In case of success, it broadcasts a State.Workspaces and PersistentState.Workspaces update.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"DeleteWorkspace","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Name": "Default"
  }
}

Properties:

  • Name - Name of the workspace.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "DeleteWorkspace",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "No such workspace.",
    "Code": "NO_SUCH_WORKSPACE"
  }
}

SetUpWorkspace

Set up a workspace. If there is no respective directory, workspace or repository, they will be created. If a new workspace is created, it broadcasts a State.Workspaces and PersistentState.Workspaces update. If a new repository is created, the server broadcasts a PersistentState.Repositories update.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"SetUpWorkspace","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Path": "%SYNCED_STORAGE%\\Common",
    "Workspace": "Default",
    "Repository": "Default",
    "Branch": "Main"
  }
}

Properties:

  • Path - Path to the directory. It should be pointing to an existing, writable directory on file system. It must be either absolute or follow the pattern %SYNCED_STORAGE%\**\<Workspace name>. The placeholder %SYNCED_STORAGE% refers to property PersistentState.SyncedStoragePath.

  • Workspace - Name of the workspace.

  • Repository - Repository to link the workspace to.

  • Branch - Branch to link the workspace to.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "SetUpWorkspace",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Workspace path must be either absolute or follow the pattern \"%SYNCED_STORAGE%\\**\\<Workspace name>\"",
    "Code": "INVALID_PATH"
  }
}
CODE
{
  "Failure": {
    "Message": "Make sure the folder path is still accessible.",
    "Code": "INVALID_PATH"
  }
}
CODE
{
  "Failure": {
    "Message": "Workspace with given name already exists for different path.",
    "Code": "WORKSPACE_ALREADY_EXISTS"
  }
}
CODE
{
  "Failure": {
    "Message": "Workspace for given path already exists.",
    "Code": "WORKSPACE_ALREADY_EXISTS"
  }
}

Push

Push local changes from workspace to repository. It broadcasts multiple SystemInfo updates to report state of the operation. It uses server commands Fetch, Commit and PutBlock internally.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"Push","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Workspace": "Default",
    "Comment": "No comment."
  }
}

Properties:

  • Workspace - Name of the workspace.

  • Comment - Comment associated with the commit.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "Push",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Workspace is busy.",
    "Code": "WORKSPACE_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such workspace.",
    "Code": "NO_SUCH_WORKSPACE"
  }
}
CODE
{
  "Failure": {
    "Message": "Force pull this folder and try again.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Make sure the folder path is still accessible.",
    "Code": "INVALID_PATH"
  }
}

Pull

Pull remote changes from repository to workspace. It broadcasts multiple SystemInfo updates to report state of the operation. It uses server commands Fetch and GetBlock internally.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"Pull","ID":"correlation1"}

Request message

CODE
{
  "Params": {
    "Workspace": "Default",
    "Branch": "Main",
    "Tag": "v1.0",
    "Mode": "Backup"
  }
}

Properties:

  • Workspace - Name of the workspace.

  • Branch - Name of the target branch. If not provided, current workspace branch is used.

  • Tag - Name of the target tag.

  • Commit - ID of the target commit.

  • Properties Tag and Commit are exclusive and require property Branch to be present. If none of them is provided, the latest version of respective branch is pulled.

  • Mode - One of Backup, ForceBackup or ForceReset. If not provided, false is assumed.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "Pull",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

CODE
{
  "Failure": {
    "Message": "Workspace is busy.",
    "Code": "WORKSPACE_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "No such workspace.",
    "Code": "NO_SUCH_WORKSPACE"
  }
}
CODE
{
  "Failure": {
    "Message": "No such branch.",
    "Code": "NO_SUCH_BRANCH"
  }
}
CODE
{
  "Failure": {
    "Message": "No such tag.",
    "Code": "NO_SUCH_TAG"
  }
}
CODE
{
  "Failure": {
    "Message": "No such commit.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Force pull this folder and try again.",
    "Code": "NO_SUCH_COMMIT"
  }
}
CODE
{
  "Failure": {
    "Message": "Make sure the folder path is still accessible.",
    "Code": "INVALID_PATH"
  }
}
CODE
{
  "Failure": {
    "Message": "Folder cannot be pulled because some files are being used by other application.",
    "Code": "FILE_SYSTEM_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "Pulling folder failed because some files are being used by other application.",
    "Code": "FILE_SYSTEM_IS_BUSY"
  }
}

PullProjects

Pull remote changes from repositories to all empty workspaces. For more information, see command Pull.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"PullProjects","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "PullProjects",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

None.

UpdateOutcomingStatuses

Update outcoming statuses.

Request topic

CODE
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"UpdateOutcomingStatuses","ID":"correlation1"}

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "UpdateOutcomingStatuses",
  "ID": "correlation1"
}

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

None.

OnAssetHubServerCommitUpdate

Handle a new commit in repository. If AutoPull flag is enabled for a workspace linked to the given repository, it will be pulled.

Request topic

CODE
{"Type":"Update","Target":"BROADCAST","Source":"AssetHubServer","Name":"Commit"}

Request message

CODE
{
  "Value": {
    "Repository": "Default",
    "Branch": "Main",
    "Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
  }
}

Properties:

  • Repository - Repository where the new commit happened.

  • Branch - Branch where the new commit happened.

  • Commit - ID of the new commit.

Response topic

None.

Response message on success

None.

Response message on failure

None.

OnDaemonLocalProjectPathsUpdate

Handle update of Daemon LocalProjectPaths. It sets up a workspace for every project which is located in a subdirectory of directory referenced by setting PersistentState.SyncedProjectsPath. See also command SetUpWorkspace.

Request topic

CODE
{"Type":"Update","Target":"BROADCAST","Source":"MSI-Daemon","Name":"LocalProjectPaths"}

Request message

CODE
{
  "Value": {
    "LocalPaths": {
      "C:\\Pixotope\\Other Projects\\Project Alpha\\Project Alpha.uproject": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha\\Project Alpha.uproject"
    }
  }
}

Properties:

  • Value - Mapping from absolute paths of the .uproject files registered in a show to machine-local paths.

Response topic

None.

Response message on success

None.

Response message on failure

None.

OnStoreStateUpdate

Handle update of Store per-show state. It sets up a workspace for every project which is located in a subdirectory of directory referenced by setting PersistentState.SyncedProjectsPath. See also command SetUpWorkspace.

Request topic

CODE
{"Type":"Update","Target":"BROADCAST","Source":"Store","Name":"State.Projects"}

Request message

CODE
{
  "Value": [
    "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha\\Project Alpha.uproject"
  ]
}

Properties:

  • Value - List of absolute paths of the .uproject files.

Response topic

None.

Response message on success

None.

Response message on failure

None.

JavaScript errors detected

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

If this problem persists, please contact our support.