Asset Hub API - State
Server
State
The server has the following per-show state:
{
"State": {}
}
Properties:
None.
To read and/or update the state, use commands Get
, Set
and Reset
. The server will respond with command Update
. Command Startup
is sent by the server on startup.
Get topic
{"Type":"Get","Target":"AssetHubServer","Name":"State","RespondTo":"Explorer"}
Get message
{}
Set topic
{"Type":"Set","Target":"AssetHubServer","Name":"State"}
Set message
{
"Value": {}
}
Reset topic
{"Type":"Reset","Target":"AssetHubServer"}
Reset message
{}
Update topic
{
"Type": "Update",
"Target": "Explorer",
"Source": "AssetHubServer",
"Name": "State"
}
Update message
{
"Value": {}
}
SystemInfo
The server has the following per-machine state:
{
"SystemInfo": {
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Sync",
"Stage": "Finalizing",
"Current": 100,
"Total": 100,
"Progress": 1.0
}
}
}
Properties:
Status
- System info of the service.Incoming
-true
if there are remote changes, otherwisefalse
.Outcoming
-true
if there are local changes, otherwisefalse
.Activity
- One ofIdle
orSync
.Stage
- One ofInitiating
,InProgress
orFinalizing
.Current
- Current step.Total
- Total number of steps.Progress
- Progress information.
To read the state, use command Get
. The server will respond with command Update
.
Get topic
{"Type":"Get","Target":"AssetHubServer","Name":"SystemInfo","RespondTo":"Explorer"}
Get message
{}
Update topic
{
"Type": "Update",
"Target": "Explorer",
"Source": "AssetHubServer",
"Name": "SystemInfo"
}
Update message
{
"Value": {
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Sync",
"Stage": "Finalizing",
"Current": 100,
"Total": 100,
"Progress": 1.0
}
}
}
PersistentState
The server has the following per-machine state:
{
"PersistentState": {
"Repositories": [
{
"Name": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
"Branches": [
{
"Name": "Main",
"Commits": [
{
"ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
"Author": "AssetHubServer",
"Comment": "Root commit.",
"CreatedAt": "2022-01-01T13:55:05.000Z",
"Tags": ["v1.0"]
}
]
}
]
}
]
}
}
Properties:
Repositories
- Repositories. See also commandsGetRepositories
,CreateRepository
andCreateBranch
.Name
- Name of the repository.Branches
- Branches in the repository.Name
- Name of the branch.Commits
- All commits related to the branch.ID
- ID of the commit.Author
- Author (machine name).Comment
- Comment.CreatedAt
- Creation timestamp.Tags
- Tags.
To read the state, use command Get
. The server will respond with command Update
.
Get topic
{"Type":"Get","Target":"AssetHubServer","Name":"PersistentState","RespondTo":"Explorer"}
Get message
{}
Update topic
{
"Type": "Update",
"Target": "Explorer",
"Source": "AssetHubServer",
"Name": "PersistentState"
}
Update message
{
"Value": {
"PersistentState": {
"Repositories": [
{
"Name": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
"Branches": [
{
"Name": "Main",
"Commits": [
{
"ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
"Author": "AssetHubServer",
"Comment": "Root commit.",
"CreatedAt": "2022-01-01T13:55:05.000Z",
"Tags": ["v1.0"]
}
]
}
]
}
]
}
}
}
Client
State
The client has the following per-show state:
{
"State": {
"Workspaces": {
"C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
"AutoPull": true
}
}
}
}
Properties:
Workspaces
- Settings by workspaces. If workspace name contains.
(dot), encode/decode it using string[dot]
.AutoPull
- Automatic pull of workspace. Workspace is pulled:when Asset Hub client starts up and the
AutoPull
flag is enabled,when there is a new commit on the server and the
AutoPull
flag is enabled,when state has changed either using
Set
orReset
command and theAutoPull
flag is enabled.
To read and/or update the state, use commands Get
, Set
and Reset
. The client will respond with command Update
. Command Startup
is sent by the client on startup.
Get topic
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"State","RespondTo":"Explorer"}
Get message
{}
Set topic
{"Type":"Set","Target":"MSI-AssetHubClient","Name":"State"}
Set message
{
"Value": {
"Workspaces": {
"C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
"AutoPull": true
}
}
}
}
Reset topic
{"Type":"Reset","Target":"MSI-AssetHubClient"}
Reset message
{}
Update topic
{
"Type": "Update",
"Target": "BROADCAST",
"Source": "MSI-AssetHubClient",
"Name": "State"
}
Update message
{
"Value": {
"Workspaces": {
"C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha": {
"AutoPull": true
}
}
}
}
SystemInfo
The client has the following per-machine state:
{
"SystemInfo": {
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Sync",
"Stage": "Finalizing",
"Current": 100,
"Total": 100,
"Progress": 1.0
},
"Workspaces": [
{
"Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
"Active": true,
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Pull",
"Stage": "Finalizing",
"Auto": false,
"Current": 100,
"Total": 100,
"Progress": 1.0,
"Result": "Ok",
"Code": "INTERNAL_ERROR",
"Changed": true,
"Message": "Done."
}
}
]
}
}
Properties:
Status
- System info of the service in respect to all active workspace.Incoming
-true
if there are remote changes, otherwisefalse
.Outcoming
-true
if there are local changes, otherwisefalse
.Activity
- One ofIdle
orSync
.Stage
- One ofInitiating
,InProgress
orFinalizing
.Current
- Current step.Total
- Total number of steps.Progress
- Progress information.
Workspaces
- System info by workspaces.Name
- Name of the workspace.Active
-true
if it is aCommon files
workspace orConfig files
workspace or respective project is linked to current show, otherwisefalse
.Incoming
-true
if there are remote changes, otherwisefalse
.Outcoming
-true
if there are local changes, otherwisefalse
.Activity
- One ofIdle
,Pull
orPush
.Stage
- One ofInitiating
,InProgress
orFinalizing
.Auto
-true
if the activity has been started automatically, otherwisefalse
.Current
- Current step.Total
- Total number of steps.Progress
- Progress information.Result
- EitherOk
orError
.Code
- Error code in caseResult
isError
, otherwise not provided.Changed
-true
if there were changes in the current operation, otherwisefalse
.Message
- Message.
To read the state, use command Get
. The server will respond with command Update
.
Get topic
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"SystemInfo","RespondTo":"Explorer"}
Get message
{}
Update topic
{
"Type": "Update",
"Target": "Explorer",
"Source": "MSI-AssetHubClient",
"Name": "SystemInfo"
}
Update message
{
"Value": {
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Sync",
"Stage": "Finalizing",
"Current": 100,
"Total": 100,
"Progress": 1.0
},
"Workspaces": [
{
"Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
"Active": true,
"Status": {
"Incoming": false,
"Outcoming": false,
"Activity": "Pull",
"Stage": "Finalizing",
"Auto": false,
"Current": 100,
"Total": 100,
"Progress": 1.0,
"Result": "Ok",
"Code": "INTERNAL_ERROR",
"Changed": true,
"Message": "Done."
}
}
]
}
}
PersistentState
The client has the following per-machine state:
{
"PersistentState": {
"SyncedConfigPath": "C:\\Pixotope\\23.2.0\\Synced Config",
"SyncedStoragePath": "C:\\Pixotope\\Synced Storage",
"SyncedCommonPath": "C:\\Pixotope\\Synced Storage\\Common",
"SyncedProjectsPath": "C:\\Pixotope\\Synced Storage\\Projects",
"Workspaces": [
{
"Name": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
"AbsolutePath": "C:\\Pixotope\\Synced Storage\\Projects\\Project Alpha",
"DisplayPath": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
"Repository": "%SYNCED_STORAGE%\\Projects\\Project Alpha",
"Branch": "Main",
"Commit": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
"Commits": [
{
"ID": "f99a16c5-4a1a-4797-8a0c-d5eb5485b8a4",
"Author": "AssetHubServer",
"Comment": "Root commit.",
"CreatedAt": "2022-01-01T13:55:05.000Z",
"Tags": ["v1.0"]
}
]
}
]
}
}
Properties:
SyncedConfigPath
- Location, whereConfig files
workspace is stored on file system.SyncedStoragePath
- Location, where all other synchronized workspaces are stored on file system.SyncedCommonPath
- Location, whereCommon files
workspace is stored on file system.SyncedProjectsPath
- Location, where all synchronized projects are stored on file system.Workspaces
- Workspaces. See also commandsGetWorkspaces
andCreateWorkspace
.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.Commits
- All commits related to the workspace.ID
- ID of the commit.Author
- Author (machine name).Comment
- Comment.CreatedAt
- Creation timestamp.Tags
- Tags.
To read the state, use command Get
. The client will respond with command Update
.
Get topic
{"Type":"Get","Target":"MSI-AssetHubClient","Name":"PersistentState","RespondTo":"Explorer"}
Get message
{}
Update topic
{
"Type": "Update",
"Target": "BROADCAST",
"Source": "MSI-AssetHubClient",
"Name": "PersistentState"
}
Update message
{
"Value": {
"SyncedStoragePath": "C:\\Pixotope\\Synced Storage"
}
}