Skip to content

10 API Introduction

Преподобный Ален edited this page Feb 18, 2026 · 1 revision

API Introduction

General Information

  • Base endpoint: localhost:8080
  • All endpoints return either a JSON object or a JSON array, depending on the number of records in the response. To override this behavior, add the query parameter ?data_array=true -- the response will then always be a JSON array regardless of the number of records.
  • Endpoints ending with /list always return a JSON array.

HTTP Return Codes

  • HTTP 4XX return codes are used for malformed requests -- the issue is on the client side.
  • HTTP 5XX return codes are used for internal errors -- the issue is on the server side. It is important NOT to treat this as a failed operation. The execution status is UNKNOWN and may have been successful.

Error Codes

  • Any endpoint may return an error.

Example response:

{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

Endpoint Details

  • For GET endpoints, parameters must be sent as a query string.
  • For POST endpoints, some parameters may be sent as a query string and some as a request body:
    • When sending parameters in the request body, the following content types are supported:
      • application/x-www-form-urlencoded for query string encoding
      • multipart/form-data for HTML forms
      • application/json for JSON
  • Parameters may be sent in any order.

Clone this wiki locally