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/feat/fromlist

Post

Added in 1.7.8

Get a list of feats by ID
{
    "Feats": [
        {
            "ID": "27",
            "Custom": false
        },
        {
            "ID": "61",
            "Custom": false
         }
    ]
}
ID – ID of the feat in either the library or the DB
Custom – Is the feat in the Custom DB or the library

/api/feat/get

Get

Added in 1.7.8

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

/api/feat/list

Post

Returns a list of feats matching the parameters
{
    "Name" : "Rapid"
    "IsCustom" : false
    "Type" : "combat"
}

Name (optional) – Case insensitive text, matches if feat name contains text
IsCustom (optional) – Is from the player’s custom DB or from the build in library
Type (optional) – Case insensitive test, type of the feat

/api/magicitem/fromlist

Post

Added in 1.7.8

Get a list of magic items by ID
{
    "MagicItems": [
        {
            "ID": "134",
            "Custom": false
        },
        {
            "ID": "95",
            "Custom": false
         }
    ]
}
ID – ID of the magic item in either the library or the DB
Custom – Is the magic in the Custom DB or the library.

Note: There are currently no custom magic items.

/api/magicitem/get

Get

Added in 1.7.8

Get a single magic item
{
    "ID": "245",
    "Custom": false
}
ID – ID of the magic item in either the library or the DB
Custom – Is the magic item in the Custom DB or the library Note: Custom magic items not currently available.

/api/magicitem/list

Post

Returns a list of magic items matching the parameters
{
    "Name" : "Wonder"
    "IsCustom" : false
    "MinCL" : 1
    "MaxCL" : 8
    "Slot" : "none"
    "Group" : "Rod"
}

Name (optional) – Case insensitive text, matches if feat name contains text
IsCustom (optional) – Is from the player’s custom DB or from the build in library
MinCL (optional) – Minimum CL of the item
MaxCL (optional) – Maximum CL of the Item
Slot (optional) – Case insensitive text, slot of the item
Group (optional) – Case insensitive text, group of the item

/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/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/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/getcustom/{id}

Get

Get a monster from the Custom DB by ID

/api/monster/getregular/{id}

Get

Get a monster from the library by 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/spell/fromlist

Post

Added in 1.7.8

Get a list of spells by ID
{
    "Spells": [
        {
            "ID": "88",
            "Custom": false
        },
        {
            "ID": "120",
            "Custom": false
         }
    ]
}
ID – ID of the spell in either the library or the DB
Custom – Is the spell in the Custom DB or the library

/api/spell/get

Get

Added in 1.7.8

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

/api/spell/list

Post

Returns a list of spells matching the parameters
{
    "Name" : "Revenge"
    "IsCustom" : false
    "School" : "illusion"
    "Subschool" : "phantasm"
}

Name (optional) – Case insensitive text, matches if spell name contains text
IsCustom (optional) – Is from the player’s custom DB or from the build in library
School (optional) – Case insensitive text, school of the spell
Subschool (optional) – Case insensitive text, subschool of the spell

/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