Skip to main content
Skip table of contents

Asset Hub API - Calls

Server

Health

Get health information.

Request topic

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

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

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

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

None.

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": "%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:

  • 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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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 PersistentState.Repositories and 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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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

Health

Get health information.

Request topic

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

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

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

Response message on success

CODE
{
  "Result": {}
}

Properties:

  • None.

Response message on failure

None.

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 which is not a conflict 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.

GetLocalChanges

Get local changes in workspace.

Request topic

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

Request message

CODE
{
  "Params": {
    "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
  }
}

Properties:

  • Workspace - Name of the workspace.

Response topic

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

Response message on success

CODE
{
  "Result": [
    {
      "Type": "PutFile",
      "URI": "FileSystem:/pixotope.mp4",
      "Blocks": [
        "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f",
        "f28ad8dca5901824f00d925316fa422b84c3999d69021a4e7a40cf6a205f9a99",
        "5b1deb8a41ababa6f848021fa805de30b2b3e219b11e673b495dab85d2843fcd",
        "4192299ae5fb60e2e33651dd031323c9a7b5b196861b7241c71275d544b19f09"
      ]
    },
    {
      "Type": "PutDirectory",
      "URI": "FileSystem:/textures"
    },
    {
      "Type": "Delete",
      "URI": "FileSystem:/meshes"
    }
  ]
}

Properties:

  • 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 message on failure

CODE
{
  "Failure": {
    "Message": "No such workspace.",
    "Code": "NO_SUCH_WORKSPACE"
  }
}
CODE
{
  "Failure": {
    "Message": "Make sure the folder path is still accessible.",
    "Code": "INVALID_PATH"
  }
}

GetRemoteChanges

Get remote changes in repository.

Request topic

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

Request message

CODE
{
  "Params": {
    "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
  }
}

Properties:

  • Workspace - Name of the workspace.

Response topic

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

Response message on success

CODE
{
  "Result": [
    {
      "Type": "PutFile",
      "URI": "FileSystem:/pixotope.mp4",
      "Blocks": [
        "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f",
        "f28ad8dca5901824f00d925316fa422b84c3999d69021a4e7a40cf6a205f9a99",
        "5b1deb8a41ababa6f848021fa805de30b2b3e219b11e673b495dab85d2843fcd",
        "4192299ae5fb60e2e33651dd031323c9a7b5b196861b7241c71275d544b19f09"
      ]
    },
    {
      "Type": "PutDirectory",
      "URI": "FileSystem:/textures"
    },
    {
      "Type": "Delete",
      "URI": "FileSystem:/meshes"
    }
  ]
}

Properties:

  • 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 message on failure

CODE
{
  "Failure": {
    "Message": "No such workspace.",
    "Code": "NO_SUCH_WORKSPACE"
  }
}
CODE
{
  "Failure": {
    "Message": "Force pull this folder and try again.",
    "Code": "NO_SUCH_COMMIT"
  }
}

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": "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:

  • 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, SystemInfo and PersistentState.Workspaces update.

Request topic

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

Request message

CODE
{
  "Params": {
    "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
    "Path": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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, SystemInfo and PersistentState.Workspaces update.

Request topic

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

Request message

CODE
{
  "Params": {
    "Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
  }
}

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, SystemInfo 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%\\Projects\\Project Alpha",
    "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
    "Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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. In case of success, it broadcasts a PersistentState.Workspaces update and Push update. It uses server commands Fetch, Commit and PutBlock internally.

Unlike Pull, Push supports only single mode. If there is a conflict between local and remote changes, the remote changes are overwritten by the local changes.

Request topic

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

Request message

CODE
{
  "Params": {
    "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
    "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"
  }
}
CODE
{
  "Failure": {
    "Message": "\"pixotope.mp4\" has been deleted while initiating. Please, try again.",
    "Code": "ASSET_HAS_BEEN_CHANGED"
  }
}
CODE
{
  "Failure": {
    "Message": "There have been changes in \"pixotope.mp4\" while initiating. Please, try again.",
    "Code": "ASSET_HAS_CHANGED"
  }
}

PushSyncedConfig

Push local changes from workspace for config files to repository. It is a shortcut for calling command Push for workspace with display path %SYNCED_CONFIG%. For more information, see command Push.

Request topic

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

Request message

CODE
{
  "Params": {
    "Comment": "No comment."
  }
}

Properties:

  • Comment - Comment associated with the commit.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "PushSyncedConfig",
  "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": "Make sure the folder path is still accessible.",
    "Code": "INVALID_PATH"
  }
}
CODE
{
  "Failure": {
    "Message": "\"pixotope.mp4\" has been deleted while initiating. Please, try again.",
    "Code": "ASSET_HAS_BEEN_CHANGED"
  }
}
CODE
{
  "Failure": {
    "Message": "There have been changes in \"pixotope.mp4\" while initiating. Please, try again.",
    "Code": "ASSET_HAS_CHANGED"
  }
}

Pull

Pull remote changes from repository to workspace. It broadcasts multiple SystemInfo updates to report state of the operation. In case of success, it broadcasts a PersistentState.Workspaces update and Pull update. It uses server commands Fetch and GetBlock internally.

Pull supports multiple modes. To better understand them, let's first discuss 3 questions that need to be addressed during Pull.

Pull remote changes or content of repository?

You may want to pull A) remote changes made between 2 commits (usually commit of your latest Pull and the latest commit in repository) or B) content of repository at specific commit (usually latest commit). To illustrate the difference, consider the following scenario:

  1. You have made local changes to file pixotope.mp4, but have not pushed them.

  2. Someone else has pushed remote changes to file cone.3ds.

  3. You have pulled the remote changes.

  4. Options:

    • A) Pulling remote changes would mean the changes to file cone.3ds will be brought into your workspace. However, your file pixotope.mp4 will stay untouched, as there were no remote changes regarding that file.

    • B) Pulling content of repository would mean both files pixotope.mp4 and cone.3ds will be brought into your workspace. Since you have made local changes to file pixotope.mp4 and it differs from the one in the repository, there is a conflict which needs to be resolved somehow.

Pulling remote changes is less invasive in general. However, it has a drawback... If your machine has switched to different server between your last and current Pull, the operation cannot be executed, as it is not possible to say which are the new remote changes to pull.

To explain the 2 options from use case perspective, these are the rules to follow in general:

  • If you want to get changes made by others, use pulling remote changes.

  • If you want to revert your local changes, use pulling content of repository.

  • If your machine has switched to different server recently, use pulling content of repository.

Back up or overwrite local changes?

In case of a conflict, you may want to A) back up your local changes or B) overwrite them. To illustrate the difference, consider the following scenario:

  1. You have made local changes to file pixotope.mp4, but have not pushed them.

  2. Someone else has pushed remote changes to the same file pixotope.mp4.

  3. You have pulled the remote changes.

  4. Options:

    • A) Backing up your local changes would mean the file is first renamed using extension -pxconflict... and updated version is brought in it`s place.

    • B) Overwriting your local changes would mean your changes are ignored and the file is overwritten by updated version.

To explain the 2 options from use case perspective, these are the rules to follow in general:

  • If you do not want to lose your local changes, use backing up local changes.

  • If you do not care about loosing your local changes, use overwriting local changes.

Merge remote changes or not?

After you have pulled remote changes, you may want them to A) be merged to your workspace so that they do not show up as local changes or B) not be merged but rather be recognized as local changes so that you can push them.

To explain the 2 options from use case perspective, these are the rules to follow in general:

  • If you want to get changes made by others, use merging.

  • If you want to check out specific commit from history and then push it, do not use merging.

In respect to various aspects of Pull described above, here is an overview of supported Pull modes:

Mode

GUI names

Changes / Content

Backup / Overwrite

Merge

Soft

Pull

Changes

Backup

Yes

Mixed

Force pull

Content

Backup

Yes

Hard

Hard reset

Content

Overwrite

Yes

Checkout

Restore, Revert

Content

Backup

No

Request topic

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

Request message

CODE
{
  "Params": {
    "Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
    "Branch": "Main",
    "Tag": "v1.0",
    "Mode": "Soft"
  }
}

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.

  • Alias - Symbolic alias of the target. Properties Branch and Alias are exclusive. The only supported value is HEAD~1.

  • Mode - One of Soft, Mixed, Hard or Checkout. If not provided, Soft 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 \"pixotope.mp4\" is being used by another application.",
    "Code": "FILE_SYSTEM_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "Pulling folder failed because \"pixotope.mp4\" is being used by another 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.

PullSyncedConfig

Pull remote changes from repository to workspace for config files. It is a shortcut for calling command Pull for workspace with display path %SYNCED_CONFIG%. It automatically decides which pull mode to use. For more information, see command Pull.

Request topic

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

Request message

CODE
{
  "Params": {}
}

Properties:

  • None.

Response topic

CODE
{
  "Type": "CallResult",
  "Target": "Explorer",
  "ExecutedOn": "MSI-AssetHubClient",
  "Method": "PullSyncedConfig",
  "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": "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 another application.",
    "Code": "FILE_SYSTEM_IS_BUSY"
  }
}
CODE
{
  "Failure": {
    "Message": "Pulling folder failed because some files are being used by another application.",
    "Code": "FILE_SYSTEM_IS_BUSY"
  }
}

UpdateOutcomingStatuses

Update outcoming statuses. In case of success, it broadcasts a SystemInfo update.

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": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
    "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.

OnDirectorEventFocusUpdate

Handle an event of Director getting focused. It updates outcoming statuses. In case of success, it broadcasts a SystemInfo update.

Request topic

CODE
{"Type":"Update","Target":"BROADCAST","Source":"MSI-Director","Name":"Event.Focus"}

Request message

CODE
{}

Properties:

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

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.

JavaScript errors detected

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

If this problem persists, please contact our support.