Skip to content

Backend Requests and Responses

Ethan edited this page Oct 13, 2026 · 1 revision

Backend Requests and Responses (WIP)

This page details how requests and responses are read and returned by the GnuCOBOL backend of this application.

Requests

How Requests are Received

Requests can be sent to the backend in three ways:

  1. Directly running the backend executable and passing the request via command-line arguments
  2. Testing the API through Postman with the exported collection and environment included in the repository
  3. Using the frontend of the app as an end-user

Request Format

A backend request must have 2 parts if the request type is READ or DEL:

  1. Request type (ADD, READ, UPD or DEL)
  2. Stash entry ID (an integer from 1 to 999,999)

If the request type is UPD or ADD, the following parts must also be specified:

  1. Stash title (e.g., Bash)
  2. Stash description (e.g., Default scripting language for Unix-like systems)

Each part is delimited by a pipe character (|).

A full request would be as follows if directly running the backend through the command-line:

./CobStash "ADD|1|Bash|Default scripting language for Unix-like systems"

Responses

How Responses are Returned

The backend returns responses to the API via stdout. The API reads the backend's responses through stdout.

(WIP)

Clone this wiki locally