Asset Hub API - Calls
Server
GetRepositories
Get all repositories.
Request topic
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"GetRepositories","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "GetRepositories",
"ID": "correlation1"
}
Response message on success
{
"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
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateRepository","ID":"correlation1"}
Request message
{
"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
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "CreateRepository",
"ID": "correlation1"
}
Response message on success
{
"Result": {
"Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
}
}
Properties:
Commit
- ID of root commit in the repository.
Response message on failure
{
"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
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateBranch","ID":"correlation1"}
Request message
{
"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
andCommit
are exclusive. If none of them is provided, an empty branch will be created from scratch.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "CreateBranch",
"ID": "correlation1"
}
Response message on success
{
"Result": {
"Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
}
}
Properties:
Commit
- ID of the last commit in the repository and branch.
Response message on failure
{
"Failure": {
"Message": "No such repository.",
"Code": "NO_SUCH_REPOSITORY"
}
}
{
"Failure": {
"Message": "No such branch.",
"Code": "NO_SUCH_BRANCH"
}
}
{
"Failure": {
"Message": "No such tag.",
"Code": "NO_SUCH_TAG"
}
}
{
"Failure": {
"Message": "No such commit.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Commit does not belong to given repository.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"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
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"CreateTag","ID":"correlation1"}
Request message
{
"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
andCommit
are exclusive.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "CreateTag",
"ID": "correlation1"
}
Response message on success
{
"Result": {
"Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
}
}
Properties:
Commit
- ID of commit to which the tag belongs.
Response message on failure
{
"Failure": {
"Message": "No such repository.",
"Code": "NO_SUCH_REPOSITORY"
}
}
{
"Failure": {
"Message": "No such branch.",
"Code": "NO_SUCH_BRANCH"
}
}
{
"Failure": {
"Message": "No such tag.",
"Code": "NO_SUCH_TAG"
}
}
{
"Failure": {
"Message": "No such commit.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Commit does not belong to given repository.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"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
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"Commit","ID":"correlation1"}
Request message
{
"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 notnull
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 benull
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 ofPutFile
,PutDirectory
orDelete
.URI
- URI identifying the asset. All files and directories start with schemaFileSystem:/
. 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 ifType
isPutFile
.
Response topic
{
"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.
{
"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.
{
"Result": {
"Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4"
}
}
Properties:
Commit
- ID of the new commit.
Response message on failure
{
"Failure": {
"Message": "No such repository.",
"Code": "NO_SUCH_REPOSITORY"
}
}
{
"Failure": {
"Message": "No such branch.",
"Code": "NO_SUCH_BRANCH"
}
}
{
"Failure": {
"Message": "There have been new commits on the server meanwhile.",
"Code": "OPTIMISTIC_LOCKING_FAILED"
}
}
{
"Failure": {
"Message": "No such commit. Has the server changed to different machine?",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Invalid URI \"FileSystem:/../pixotope.mp4\".",
"Code": "INVALID_URI"
}
}
{
"Failure": {
"Message": "No changes.",
"Code": "NO_CHANGES"
}
}
{
"Failure": {
"Message": "Duplicate URIs.",
"Code": "DUPLICATE_URIS"
}
}
{
"Failure": {
"Message": "Change for asset \"FileSystem:/pixotope.mp4\" has no effect.",
"Code": "CHANGE_HAS_NO_EFFECT"
}
}
Fetch
Fetch changes from repository.
Request topic
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"Fetch","ID":"correlation1"}
Request message
{
"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 notnull
, the server will respond with changes leading from the given commit to the last commit. Can benull
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
andCommit
are exclusive.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "Fetch",
"ID": "correlation1"
}
Response message on success
{
"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 ofPutFile
,PutDirectory
orDelete
.URI
- URI identifying the asset. All files and directories start with schemaFileSystem:/
. 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 ifType
isPutFile
.
Client can then use command GetBlock
to download missing blocks from the server.
Response message on failure
{
"Failure": {
"Message": "No such repository.",
"Code": "NO_SUCH_REPOSITORY"
}
}
{
"Failure": {
"Message": "No such base commit. Has the server changed to different machine?",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Base commit does not belong to given repository.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "No such branch.",
"Code": "NO_SUCH_BRANCH"
}
}
{
"Failure": {
"Message": "No such tag.",
"Code": "NO_SUCH_TAG"
}
}
{
"Failure": {
"Message": "No such commit.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Commit does not belong to given repository.",
"Code": "NO_SUCH_COMMIT"
}
}
PutBlock
Upload block of data to the server.
Request topic
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"PutBlock","ID":"correlation1"}
Request message
{
"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
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "PutBlock",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Storage is busy.",
"Code": "STORAGE_IS_BUSY"
}
}
{
"Failure": {
"Message": "Invalid hash.",
"Code": "INVALID_HASH"
}
}
{
"Failure": {
"Message": "Invalid length of block.",
"Code": "INVALID_BLOCK_LENGTH"
}
}
GetBlock
Download block of data from the server.
Request topic
{"Type":"Call","Target":"AssetHubServer","RespondTo":"Explorer","Method":"GetBlock","ID":"correlation1"}
Request message
{
"Params": {
"Hash": "4fdac23064b34d8994ec6a72cabf7d3c500fbf304ee527ec84e846b63f87e02f"
}
}
Properties:
Hash
- Hash (algorithm: sha256, encoding: hex) of the block of data.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "AssetHubServer",
"Method": "GetBlock",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
The raw binary data is sent as an attachment (3rd message part).
Response message on failure
{
"Failure": {
"Message": "Storage is busy.",
"Code": "STORAGE_IS_BUSY"
}
}
{
"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 which is not a conflict file.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetProjects","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "GetProjects",
"ID": "correlation1"
}
Response message on success
{
"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 settingPersistentState.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, otherwisenull
.
Response message on failure
None.
GetLocalChanges
Get local changes in workspace.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetLocalChanges","ID":"correlation1"}
Request message
{
"Params": {
"Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
}
}
Properties:
Workspace
- Name of the workspace.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "GetLocalChanges",
"ID": "correlation1"
}
Response message on success
{
"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 ofPutFile
,PutDirectory
orDelete
.URI
- URI identifying the asset. All files and directories start with schemaFileSystem:/
. 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 ifType
isPutFile
.
Response message on failure
{
"Failure": {
"Message": "No such workspace.",
"Code": "NO_SUCH_WORKSPACE"
}
}
{
"Failure": {
"Message": "Make sure the folder path is still accessible.",
"Code": "INVALID_PATH"
}
}
GetRemoteChanges
Get remote changes in repository.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetRemoteChanges","ID":"correlation1"}
Request message
{
"Params": {
"Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
}
}
Properties:
Workspace
- Name of the workspace.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "GetRemoteChanges",
"ID": "correlation1"
}
Response message on success
{
"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 ofPutFile
,PutDirectory
orDelete
.URI
- URI identifying the asset. All files and directories start with schemaFileSystem:/
. 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 ifType
isPutFile
.
Response message on failure
{
"Failure": {
"Message": "No such workspace.",
"Code": "NO_SUCH_WORKSPACE"
}
}
{
"Failure": {
"Message": "Force pull this folder and try again.",
"Code": "NO_SUCH_COMMIT"
}
}
GetSyncedStoragePath
Get synced storage path.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetSyncedStoragePath","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "GetSyncedStoragePath",
"ID": "correlation1"
}
Response message on success
{
"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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"GetWorkspaces","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "GetWorkspaces",
"ID": "correlation1"
}
Response message on success
{
"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 settingPersistentState.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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"CreateWorkspace","ID":"correlation1"}
Request message
{
"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 propertyPersistentState.SyncedStoragePath
.Repository
- Repository to link the workspace to.Branch
- Branch to link the workspace to.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "CreateWorkspace",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace with given name already exists.",
"Code": "WORKSPACE_ALREADY_EXISTS"
}
}
{
"Failure": {
"Message": "Workspace for given path already exists.",
"Code": "WORKSPACE_ALREADY_EXISTS"
}
}
{
"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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"DeleteWorkspace","ID":"correlation1"}
Request message
{
"Params": {
"Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha"
}
}
Properties:
Name
- Name of the workspace.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "DeleteWorkspace",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"SetUpWorkspace","ID":"correlation1"}
Request message
{
"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 propertyPersistentState.SyncedStoragePath
.Workspace
- Name of the workspace.Repository
- Repository to link the workspace to.Branch
- Branch to link the workspace to.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "SetUpWorkspace",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace path must be either absolute or follow the pattern \"%SYNCED_STORAGE%\\**\\<Workspace name>\"",
"Code": "INVALID_PATH"
}
}
{
"Failure": {
"Message": "Make sure the folder path is still accessible.",
"Code": "INVALID_PATH"
}
}
{
"Failure": {
"Message": "Workspace with given name already exists for different path.",
"Code": "WORKSPACE_ALREADY_EXISTS"
}
}
{
"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. It uses server commands Fetch
, Commit
and PutBlock
internally.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"Push","ID":"correlation1"}
Request message
{
"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
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "Push",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace is busy.",
"Code": "WORKSPACE_IS_BUSY"
}
}
{
"Failure": {
"Message": "No such workspace.",
"Code": "NO_SUCH_WORKSPACE"
}
}
{
"Failure": {
"Message": "Force pull this folder and try again.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Make sure the folder path is still accessible.",
"Code": "INVALID_PATH"
}
}
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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"PushSyncedConfig","ID":"correlation1"}
Request message
{
"Params": {
"Comment": "No comment."
}
}
Properties:
Comment
- Comment associated with the commit.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "PushSyncedConfig",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace is busy.",
"Code": "WORKSPACE_IS_BUSY"
}
}
{
"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. In case of success, it broadcasts a PersistentState.Workspaces
update. It uses server commands Fetch
and GetBlock
internally.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"Pull","ID":"correlation1"}
Request message
{
"Params": {
"Workspace": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
"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
andCommit
are exclusive and require propertyBranch
to be present. If none of them is provided, the latest version of respective branch is pulled.Alias
- Symbolic alias of the target. PropertiesBranch
andAlias
are exclusive. The only supported value isHEAD~1
.Mode
- One ofBackup
,ForceBackup
orForceReset
. If not provided,Backup
is assumed.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "Pull",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace is busy.",
"Code": "WORKSPACE_IS_BUSY"
}
}
{
"Failure": {
"Message": "No such workspace.",
"Code": "NO_SUCH_WORKSPACE"
}
}
{
"Failure": {
"Message": "No such branch.",
"Code": "NO_SUCH_BRANCH"
}
}
{
"Failure": {
"Message": "No such tag.",
"Code": "NO_SUCH_TAG"
}
}
{
"Failure": {
"Message": "No such commit.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Force pull this folder and try again.",
"Code": "NO_SUCH_COMMIT"
}
}
{
"Failure": {
"Message": "Make sure the folder path is still accessible.",
"Code": "INVALID_PATH"
}
}
{
"Failure": {
"Message": "Folder cannot be pulled because some files are being used by other application.",
"Code": "FILE_SYSTEM_IS_BUSY"
}
}
{
"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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"PullProjects","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "PullProjects",
"ID": "correlation1"
}
Response message on success
{
"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
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"PullSyncedConfig","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "PullSyncedConfig",
"ID": "correlation1"
}
Response message on success
{
"Result": {}
}
Properties:
None.
Response message on failure
{
"Failure": {
"Message": "Workspace is busy.",
"Code": "WORKSPACE_IS_BUSY"
}
}
{
"Failure": {
"Message": "Make sure the folder path is still accessible.",
"Code": "INVALID_PATH"
}
}
{
"Failure": {
"Message": "Folder cannot be pulled because some files are being used by other application.",
"Code": "FILE_SYSTEM_IS_BUSY"
}
}
{
"Failure": {
"Message": "Pulling folder failed because some files are being used by other application.",
"Code": "FILE_SYSTEM_IS_BUSY"
}
}
UpdateOutcomingStatuses
Update outcoming statuses. In case of success, it broadcasts a SystemInfo
update.
Request topic
{"Type":"Call","Target":"MSI-AssetHubClient","RespondTo":"Explorer","Method":"UpdateOutcomingStatuses","ID":"correlation1"}
Request message
{
"Params": {}
}
Properties:
None.
Response topic
{
"Type": "CallResult",
"Target": "Explorer",
"ExecutedOn": "MSI-AssetHubClient",
"Method": "UpdateOutcomingStatuses",
"ID": "correlation1"
}
Response message on success
{
"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
{"Type":"Update","Target":"BROADCAST","Source":"AssetHubServer","Name":"Commit"}
Request message
{
"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
{"Type":"Update","Target":"BROADCAST","Source":"MSI-Director","Name":"Event.Focus"}
Request message
{}
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
{"Type":"Update","Target":"BROADCAST","Source":"MSI-Daemon","Name":"LocalProjectPaths"}
Request message
{
"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
{"Type":"Update","Target":"BROADCAST","Source":"Store","Name":"State.Projects"}
Request message
{
"Value": [
"C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha\\Project Alpha.uproject"
]
}
Properties:
Value
- List of absolute paths of the.uproject
files.