User Tools

Site Tools


packet:bpq-api

This is an old revision of the document!


BPQ APIs

The one built into BPQ

BPQ has a latent, undocumented, API, which Steve is going to document here :D

The one Tom built

Tom is building a docker container that sits next to BPQ and wraps its various interfaces, including the UI, exposing OpenAPI / Swagger endpoints.

Perhaps one day this one will become redundant and can be put out to pasture.

https://github.com/M0LTE/bpqapi

The one Twom is building

Twom is patching MQTT support into BPQ itself.

Some bits from Steve G7TAJ

Getting a message list with parameters

M$ID = the token

the options can be null

/Mail/MsgInfo.txt?M$ID --data "<FROM>|<TO>|<VIA>|<BID>|"

response: a list of message numbers delimitered by | (odd end of html at the end)

1234|1235|1236|</body></html>

Get the message header information

/Mail/MsgDetails?M$ID --data "54144"
<html>
    <head>
        <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
        <title>MsgEdit</title>
    </head>
    <body>
        <h4>Message 54144</h4>
        <form style="font-family: monospace;" method=post action=/Mail/Msg?M0000FBE24729 name=Msgs>
            From &nbsp;<input style="font-family: monospace;" size=10 name=From value=CX2SA>
            Sent &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input readonly=readonly size=12 name=Sent value="06-Oct 11:33Z">
            &nbsp;Type &nbsp;&nbsp;&nbsp;&nbsp;
            <select tabindex=1 size=1 name=Type>
                <option selected value=B>B</option>
                <option value=P>P</option>
                <option value=T>T</option>
            </select>
            <br>
            To &nbsp;&nbsp;<input style="font-family: monospace;" size=10 name=To value=NTS>
            Received &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input readonly=readonly size=12 name=RX value="06-Oct 12:05Z">
            &nbsp;Status &nbsp;&nbsp;
            <select tabindex=1 size=1 name=Status>
                <option value=N>N</option>
                <option value=Y>Y</option>
                <option value=F>F</option>
                <option value=K>K</option>
                <option value=H>H</option>
                <option value=D>D</option>
                <option selected value=$>$</option>
            </select>
            <br>
            BID &nbsp;&nbsp;<input style="width:100px; font-family: monospace; " name=BID value="NTS092024">
            Last Changed <input readonly=readonly size=12 name=LastChange value="06-Oct 12:05Z">
            &nbsp;Size &nbsp;<input readonly=readonly size=5 name=Size value=18347>
            <br>
            <br>
            Email From <input style="width:320px;" name=EFROM value=>
            <br>
            &nbsp;VIA &nbsp;<input style="width:360px;" name=VIA value=ARRL>
            <br>
            Title &nbsp;<input style="width:360px;" name=Title value="September 2024 NTS Letter">
            <br>
            <br>
            <span align=center>
                <input onclick=editmsg("EditM?M0000FBE24729?54144" ) value="Edit Text" type=button class='btn'>
                <input onclick=save(this.form) value=Save type=button class='btn'>
                <td>
                    <a href=/Mail/SaveMessage?M0000FBE24729>
                        <button type=button class='btn'>Save Message</button>
                    </a>
                </td>
                <td>
                    <a href=/Mail/SaveAttachment?M0000FBE24729>
                        <button type=button class='btn' disabled>Save Attachment</button>
                    </a>
                </td>
                <input onclick=doit("Print" ) value=Print type=button class='btn'>
                <input onclick=doit("Export" ) value=Export type=button class='btn'>
            </span>
            <br>
            <br>
            Green = Sent, Yellow = Queued
            <table style="text-align: left; width: 490px; font-family: monospace; align=center " border=1 cellpadding=2 cellspacing=2>
                <tr>
                    <td style="background-color: #FFFFFF;" onclick=ck("13" )>G6JME</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("16" )>G7TAJ</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("2" )>G8BPQ</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("14" )>GB7BED</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("8" )>GB7BEX</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("12" )>GB7BPQ</td>
                    <td style="background-color: #FFFFFF;" onclick=ck("52" )>GB7BTN</td>
                    <td style="background-color: #98FFA0;" onclick=ck("37" )>GB7CIP</td>
                </tr>
            </table>
        </form>
    </body>
</html>
packet/bpq-api.1728247028.txt.gz · Last modified: 2024/10/06 20:37 by g7taj