2021-03-29 04:50:39 -04:00
# API-Call Documentation
## Introduction
As many of us know YSFReflectors use the YSF protocol to communicate with endpoints. These original commands are well
documented at http://ycs-wiki.xreflector.net/doku.php?id=start:protocols:ysf thanks to the YCS-team for hosting them.
2021-03-29 09:10:36 -04:00
pYSFReflector has also an extended set of commands you can use for fetching information on the state of different things
2021-03-29 04:50:39 -04:00
when running the reflector.
2021-03-29 09:10:36 -04:00
This document will show the commands, and the replies expected from the reflector.
2021-03-29 04:50:39 -04:00
## How To Issue A Call
2021-03-29 09:10:36 -04:00
First it is very easy to have a command sent to a reflector. Simply use a command similar to this:
2021-03-29 04:50:39 -04:00
`echo -n "YSFS" | nc -u 127.0.0.1 42000 -w 2 && echo`
or in a more general form:
`echo -n "<COMMAND>" | nc -u <IP-ADDRESS_OF_REFLECTOR> <PORT_OF_REFLECTOR> -w 2 && echo`
2021-03-29 09:10:36 -04:00
This line will send the chosen command to the reflector and prints out its reply.
2021-03-29 04:50:39 -04:00
## List Of Extended API-Commands
2021-03-29 09:10:36 -04:00
Here we will not describe the standard-commands in the YSF protocol, but the extended command set by the pYSFReflector.
2021-03-29 04:50:39 -04:00
2021-03-29 09:10:36 -04:00
The format of the answer will be the corresponding answer-code, and some values separated by `:` for each object in scope.
2021-03-29 04:50:39 -04:00
Several objects are separated by `;` .
### QSRU - Query Reflector Uptime
#### Reply
`ASRU;57234;`
#### Description
Uptime of reflector in seconds
### QSRI - Query Reflector Info
#### Reply
`ASRI;62829:DE Germany:YSF262 BM263:pYSFReflector:20210326:1;`
#### Description
2021-03-29 09:10:36 -04:00
ID:Name:Description:Software-Name:Version:Status of Regular Expression Check (can be -1/0/1)
2021-03-29 04:50:39 -04:00
### QGWL - Query Gateway List
#### Reply
`AGWL;DL-LNK:161.97.73.43:57313;2622-DL:178.238.234.72:42000;DG9VH:84.58.124.6:42140;`
#### Description
Callsign:IP-Address:Port
### QLHL - Query Last Heard List
#### Reply
`ALHL;DG9VH:DG9VH:ALL:724:29-03-2021 07-32-13:0;2622-DL:DN3VH:ALL:723:29-03-2021 07-31-52:0;`
#### Description
2021-03-29 09:10:36 -04:00
Gateway:Callsign:Target:Timestamp:Position in List
2021-03-29 04:50:39 -04:00
2021-03-29 09:10:36 -04:00
### QREJ - Query Rejected Callsigns/Gateways/IP-Addresses
2021-03-29 04:50:39 -04:00
#### Reply
2021-03-29 09:10:36 -04:00
`AREJ;DG9VH/CS:DG9VH400:ALL:-1:29-03-2021 12-17-08:-1;`
2021-03-29 04:50:39 -04:00
#### Description
2021-03-29 09:10:36 -04:00
### QLHD - Query Last Heard List (with distinct callsigns)
2021-03-29 04:50:39 -04:00
#### Reply
2021-03-29 09:10:36 -04:00
`ALHD;2622-DL:DO7VN:ALL:2:29-03-2021 12-13-27:6;2622-DL:DH1VY:ALL:1:29-03-2021 11-45-30:0;`
2021-03-29 04:50:39 -04:00
#### Description
2021-03-29 09:10:36 -04:00
Gateway:Callsign:Target:Timestamp:Position in List
2021-03-29 04:50:39 -04:00
2021-03-29 09:10:36 -04:00
### QRED - Query Rejected Callsigns/Gateways/IP-Addresses (with distinct data)
2021-03-29 04:50:39 -04:00
#### Reply
2021-03-29 11:32:51 -04:00
`ARED;DG9VH/CS:DG9VH1A:ALL:-1:29-03-2021 15-18-54:-1;`
2021-03-29 04:50:39 -04:00
#### Description
### QACL - Query Access Control List-Statistics
#### Reply
2021-03-29 06:19:49 -04:00
`AACL;CS/2|AL/1|GW/1|IP/0;CS:DN3VH;CS:DG9VH;AL:N0CALL;GW:DN3VH;`
2021-03-29 04:50:39 -04:00
#### Description
2021-03-29 09:10:36 -04:00
CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Addresses;List of Entries from deny.db