logo
24.1
search
No matching documents found.
list
search
No matching documents found.
logo
Please be aware that there is newer version of documentation available for Webswing. Documentation 24.2

Admin Console REST API

Admin Console backend provides REST API to the frontend React app and for monitoring purposes. Since version 22.1.1 the authentication has been simplified. If you want to use any functionality of the Admin Console configure the access as in the following example:

Basic Authentication

To simplify the REST API authentication process you can also use HTTP Basic authentication. First configure basic auth users in Webswing Server root ("/") configuration.

"/" : {
  "path" : "/",
  ...
  "restUsers" : [ {
    "permissions" : [ "rest_getPaths", "rest_getStats" ],
    "password" : "$hashed$VJ_dl_7dmWgfhPT1MVb37YDyj9Kr1QAEHHqgkMdjRsk",
    "username" : "rest_user"
  } ]
}

or in Admin Console

![Rest users config] (/storage/user_content/markdown_uploads/2ndILb9Sgkc1jNGqVXkac2X3yRtXfjZhUVPG21gs.png)

Now you can call REST API in Admin Console Server with basic auth.

>curl -u rest_user:webswing http://localhost:8090/rest/activeSessionsCount
1

Following file specifies the REST API provided by Webswing Server in OpenAPI 3.0.2 format: webswing_api.yaml

You can create your own client from the file (Admin Console uses generated typescript client). The file is also in the source code: /webswing/webswing-admin/webswing-admin-server/src/main/resources/openapi/webswing_api.yaml