v1

latestOpenAPI 3.0.2Apache 2.02026-07-17292234.0 KB
Message

Get a message from the inbound message queue

Get a message from the inbound message queue. By default, the message is removed from the queue and won't be shown again. If the peek query parameter is set to true, the message will be peeked, and the next call to this endpoint will show the same message. This method returns immediately by default: a message is returned if one is ready, and if there isn't nothing is returned. If the timeout query parameter is set, this call won't return for the given amount of seconds, unless a message is received

get/api/v1/messages

Query parameters

peekboolean

Whether to peek the message or not. If this is true, the message won't be removed from the inbound queue when it is read

timeoutinteger

Amount of seconds to wait for a message to arrive if one is not available. Setting this to 0 is valid and will return a message if present, or return immediately if there isn't

topicstring byte

Optional filter for loading messages. If set, the system checks if the message has the given string at the start. This way a topic can be encoded.

Response

Message retrieved

idstring hex

Id of the message, hex encoded

srcIpstring ipv6

Sender overlay IP address

srcPkstring hex

Sender public key, hex encoded

dstIpstring ipv6

Receiver overlay IP address

dstPkstring hex

Receiver public key, hex encoded. This is the public key of the system

topicstring byte

An optional message topic

payloadstring byte

The message payload, encoded in standard alphabet base64

Example response

{
  "id": "0123456789abcdef",
  "srcIp": "449:abcd:0123:defa::1",
  "srcPk": "fedbca9876543210fedbca9876543210fedbca9876543210fedbca9876543210",
  "dstIp": "34f:b680:ba6e:7ced:355f:346f:d97b:eecb",
  "dstPk": "02468ace13579bdf02468ace13579bdf02468ace13579bdf02468ace13579bdf",
  "topic": "hpV+",
  "payload": "xuV+"
}