Combat Manager Local API

These are the HTTP commands that can be sent to the web server inside Combat Manager when the Local Service API is turned on.

General Info

Passcode - if a passcode is set in the client, all API calls will require a header named passcode set to the client's passcode value

Current Character ID (added 1.7.7) - on any Get API with {charid} in the URL, you can use "current" to reference the character with the current turn, if there is one. If there is one, the API will fail.

/api/combat/state

Get

Gets the current combat list in order with character ID’s, initiative order, hp and conditions

/api/combat/next

Get

Move to the next character turn

/api/combat/prev

Get

Move back to the previous player turn

/api/combat/rollinit

Get

Roll initiative for all characters and sort the combat list

/api/combat/moveupcharacter/{charid}

Get

Move character up on the combat list order

/api/combat/movedowncharacter/{charid}

Get

Move character down on the combat list

/api/combat/delay/{charid}
/api/combat/undelay/{charid}

Get

Added in 1.7.7

Set or remove the delaying state on the character

/api/combat/ready/{charid}
/api/combat/unready/{charid}

Get

Added in 1.7.7

Set or remove the readying state on the character

/api/combat/actnow/{charid}

Get

Added in 1.7.7

Causes a character to take action immediately, moving to the current place in the initiative order

/api/character/details/{charid}

Get

Get all of the details for a character

/api/combat/deletecharacter/{charid}

Get

Delete a character from the combat list

/api/character/changehp/{charid}/{amount}

Get

Increase/decrease character HP

/api/character/changemaxhp/{charid}/{amount}

Get

Increase or Decrease a character’s maximum HP

/api/character/changetemporaryhp/{charid}/{amount})

Get

Increase or Decrease temporary HP

/api/character/changenonlethaldamage/{charid}/{amount}

Get

Increase or decrease temporary damage

/api/character/hide/{charid}/{true/false}

Get

Added in 1.7.7

Hides or unhides a character

/api/character/idle/{charid}/{true/false}

Get

Added in 1.7.7

Idles or activates character

/api/character/addcondition

Post

Add the named condition to a character

{
    "ID": "a70f10db-820f-4a7b-9587-0949b0be8d62",
    "Name": "Dazed",
    "Turns": "3"
}
ID – Character ID
Name – Name of the condition
Turns(optional) – Duration of the condition

 

/api/character/removecondition

Post

Remote the named condition from a character
{
    "ID": "a70f10db-820f-4a7b-9587-0949b0be8d62",
    "Name": "Dazed"
}

Name – Condition name
ID – Character ID

/api/monster/list

Post

Returns a list of monsters matching the parameters
{
    "Name" : "Kobold"
    "IsCustom" : false
    "IsNPC" : false
    "MinCR" : "1/4"
    "Max" : "5"
}

Name (optional) – Case insensitive text, matches if monster name contains text
IsCustom (optional) – Is from the player’s custom DB or from the build in library
IsNPC (optional) – Is from the NPC section of the library or the bestiary section
MinCR (optional) – Minimum CR
MaxCR (optional) – Maximum CR

/api/monster/get

Post

Get a single monster
{
    "ID": "245",
    "Custom": false
}
ID – ID of the monster in either the library or the DB
Custom – Is the monster in the Custom DB or the library

/api/monster/getregular/{id}

Get

Get a monster from the library by ID

/api/monster/getcustom/{id}

Get

Get a monster from the Custom DB by ID

/api/monster/fromlist

Post

Get a list of monsters by ID
{
    "Monsters": [
        {
            "ID": "245",
            "Custom": false
        },
        {
            "ID": "247",
            "Custom": false
         }
    ]
}
ID – ID of the monster in either the library or the DB
Custom – Is the monster in the Custom DB or the library

/api/monster/add

Post

Add existing monsters to combat
{
    "IsMonster": true,
    "Monsters": [
        {
            "ID": "245",
            "Custom": false
        }
    ]
}
IsMonster – Add to the monster list or the player list
Monsters – List of monsters to add
ID – ID of the monster in either the library or the DB
Custom – Is the monster in the Custom DB or the library

/api/ui/bringtofront

Get

Active the Combat Manager UI window

/api/ui/minimize

Get

Minimize the Combat Manager UI Window

/api/ui/goto/{place}

Get

Show the listed tab/place in the UI

Combat – Combat Tab
Feats – Feats Tab
Spells – Spells Tab
Monsters – Monster Tab
Rules – Rules Tab
Treasure – Treasure Tab
Magicitems – Magic Items Sub Tab
Treasure Generator – Treasure Generator Sub Tab
Maps – Maps Tab

/api/ui/showcombatlist

Get

Open the Combat List Window

/api/ui/hidecombatlist

Get

Close the Combat List window

/api/notifications

Websocket (updated 1.7.7)

Sends updates

{
    "Name": "State",
    "ID": 1,
    "Data": {
        Combat state here
    }
}

Name – Name of the message. Determines type of data being sent
ID – An ID Number for the message
Data – The JSON Data for the message

Messages

State – An updated Combat State



© 2019 Kyle Olson