AIT REST API

GET /

Return index page

GET /events

Endpoint that pushes Server-Sent Events to client

POST /events

Add an event to the event stream :jsonparam name: The name of the event to add. :jsonparam data: The data to include with the event.

GET /evr/dict

Return JSON EVR dictionary

POST /messages

Log a message via core library logging utilities :jsonparam severity: The log message severity :jsonparam message: The message to be sent

GET /messages

Endpoint that pushes syslog output to client

GET /tlm/dict

Return JSON Telemetry dictionary Example Response: .. sourcecode: json

{
ExaplePacket1: {

uid: 1, fields: {

Voltage_B: {

type: “MSB_U16”, bytes: [2, 3], name: “Voltage_B”, desc: “Voltage B as a 14-bit DN. Conversion to engineering units is TBD.”

}, Voltage_C: {

type: “MSB_U16”, bytes: [4, 5], name: “Voltage_C”, desc: “Voltage C as a 14-bit DN. Conversion to engineering units is TBD.”

}

}, ExamplePacket2: {

}

}

GET /cmd/dict

Return JSON Command dictionary Example Response: .. sourcecode: json

{
NO_OP: {

subsystem: “CORE”, name: “NO_OP”, title: “NO_OP”, opcode: 1, arguments: [], desc: “Standard NO_OP command. “

}, SEQ_START: {

subsystem: “CMD”, name: “SEQ_START”, title: “Start Sequence”, opcode: 2, arguments: [

{

name: “sequence_id”, bytes: [0, 1], units: “none”, fixed: false, type: “MSB_U16”, desc: “Sequence ID”

}

], desc: “This command starts a specified command sequence. “

},

}

GET /cmd/hist.json

Return sent command history Example Response: .. sourcecode: json

[

“NO_OP”, “SEQ_START 3423”

]

If you set the detailed query string flag the JSON returned will include timestamp information. Example Detailed Response .. sourcecode: json

[
{

“timestamp”: “2017-08-01 15:41:13.117805”, “command”: “NO_OP”

}, {

“timestamp”: “2017-08-01 15:40:23.339886”, “command”: “NO_OP”

}

]

POST /cmd/validate
GET /log

Endpoint that pushes syslog output to client

GET /tlm/realtime/openmct

Return telemetry packets in realtime to client

GET /tlm/realtime

Return telemetry packets in realtime to client

GET /tlm/latest

Return latest telemetry packet to client

POST /tlm/query
GET /data

Expose ait.config.data info to the frontend

GET /leapseconds

Return UTC-GPS Leapsecond data Example Response: .. sourcecode: json

[

[“1981-07-01 00:00:00”, 1], [“1982-07-01 00:00:00”, 2], [“1983-07-01 00:00:00”, 3]

]

GET /seq

Return a JSON array of filenames in the SEQRoot directory Example Response: .. sourcecode: json

[

sequenceOne.txt, sequenceTwo.txt

]

POST /seq

Run requested sequence file :formparam seqfile: The sequence filename located in SEQRoot to execute

POST /seq/abort

Abort the active running sequence

GET /scripts

Return a JSON array of script filenames Scripts are located via the script.directory configuration parameter.

GET /scripts/load/(name)

Return the text of a script Scripts are located via the script.directory configuration parameter. :param name: The name of the script to load. Should be one of the values

returned by /scripts.

Status Codes

Example Response: .. sourcecode: json

{

script_text: “This is the example content of a fake script”

}

POST /script/run

Run a script Scripts are located via the script.directory configuration parameter. :formparam scriptPath: The name of the script to load. This should be one

of the values returned by /scripts.

Status Codes
PUT /script/run

Resume a paused script

PUT /script/pause

Pause a running script

PUT /script/step

Step a paused script

DELETE /script/abort

Abort a running script

GET /limits/dict
POST /prompt
POST /prompt/response
GET /playback/range

Return a JSON array of [packet_name, start_time, end_time] to represent the time range of each packet in the database

Example Response: .. sourcecode: json

[

[“1553_HS_Packet”, “2019-07-15T18:10:00.0”, “2019-07-15T18:12:00.0”], [“Ethernet_HS_Packet”, “2019-07-15T19:25:16.0”, “2019-07-15T19:28:50.0”],

]

POST /playback/query

Set playback query with packet name, start time, and end time from form

PUT /playback/on

Indicate that playback is on

POST /playback/send

Send timestamp to be put into playback queue if in database

PUT /playback/abort

Abort playback and return to realtime