State and Status queries

getState

Returns a state.

Query attributes

Reply content

The Daemon replies with more information about the state.

Example

Query:
getState&shortName=TODO

Reply:

{
    "accepted": true,
    "query": "getState",
    "success": true,
    "message": "State retrived.",
    "content": {
            "shortName": "TODO",
            "name": "Waiting...",
            "completionRatio": 0,
            "color": [ 50, 50, 50]
        }
}

getStates

Returns the list of available states.

Query attributes

Reply content

The Daemon replies with the list of States.

Example

Query:
getStates

Reply:

{
    "accepted": true,
    "query": "getStates",
    "success": true,
    "message": "State list retrived.",
    "content": {
        "states": [
            {
                "shortName": "TODO",
                "name": "Waiting...",
                "completionRatio": 0,
                "color": [ 50, 50, 50]
            },
            {
                "shortName": "WIP",
                "name": "Work In Progress",
                "completionRatio": 50,
                "color": [ 255, 0, 0]
            },
            {
                "shortName": "OK",
                "name": "Finished and approved",
                "completionRatio": 100,
                "color": [ 0, 255, 0]
            }
        ]
    }
}

getCurrentStatus

Returns the current status of a given step for a given item (shot or asset).

Query attributes

Reply content

The Daemon replies with more information about the current status.

Example

Query:
getCurrentStatus&shortName=TRI&name=Tristan&type=ASSET&step=RIG

Reply:

{
    "accepted": true,
    "query": "getCurrentUser",
    "success": true,
    "message": "Current user is: John Doe.",
    "content": {
            "step": "RIG",
            "comment": "Working on it!",
            "completionRatio": 75,
            "date": "2021-04-12 10:55:23",
            "state": "WIP",
            "user": "Duduf",
            "version": 12
        }
}

getCurrentStatuses

Returns the current status list (one per step) for a given item (shot or asset).

Query attributes

Reply content

The Daemon replies with the list of status.

Example

Query:
getCurrentStatuses&shortName=TRI&name=Tristan&type=ASSET

Reply:

{
    "accepted": true,
    "query": "getCurrentStatuses",
    "success": true,
    "message": "Current status list retrieved.",
    "content": {
        "status": [
            {
                "step": "RIG",
                "comment": "Working on it!",
                "completionRatio": 75,
                "date": "2021-04-12 10:55:23",
                "state": "WIP",
                "user": "Duduf",
                "version": 12
            },
            {
                "step": "MOD",
                "comment": "Finished",
                "completionRatio": 100,
                "date": "2021-04-12 10:55:23",
                "state": "OK",
                "user": "Duduf",
                "version": 5
            }

        ]
    }
}

setStatus

Sets a new status to an item

Query attributes

Reply content

None.

Example

Query:
setStatus&shortName=TRI&name=Tristan&step=MOD&type=A&state=WIP&comment=A Comment&published=true&completionRatio=55&version=42&user=Duf

Reply:

{
    "accepted": true,
    "query": "setStatus",
    "success": true,
    "message": "Status updated."
}