Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Api
  • Websocket

Last edited by Andrea Pavlovic Dec 13, 2021
Page history

Websocket

  • Overview
  • Authentication
  • Data

Overview

A websocket may be set up to communicate db changes directly e.g. to a web-frontend as they happen.

Authentication

To connect, the request has to be authenticated with an api key or bearer token. As far as we could find out, adding an authentication header to the initial get request is not supported by the available JavaScript Libraries, the authentication sting has to be passed on as a cookie.

  • Cookie Name: IronAPI-Auth
  • Content: as no spaces are allowed, replace the space in the authentication header content for the api with a "~". E.g. "apikey~ke3mdieafdei3094ißfadfsa" or "Bearer~adsafjalsfjlaskjfljeoiuoru49tu304tnnlkng"

Data

A message sent from the database to the frontend will generally be a json structure with the client_id of the recipient and the data. The formatting of the data is project specific, but may look like this:

{
  "client_id": 3, 
  "data" : {
    "type": "insert", 
    "module": "core", 
    "entity": "ticket", 
    "instance": {"id":4, "name": "new ticket"}
  }
}
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages