Kantega SSO Enterprise REST API
Starting with version 5.2 Kantega SSO Enterprise introduces REST API for managing plugin configuration. Our plugin exposes REST resources under the /ksso/api
path.
The latest Kantega SSO REST API offers the following resources:
There is a neat plugin from Atlassian for discovery and testing of REST services that you can use for running requests on your Jira installation, you can get it here:
https://marketplace.atlassian.com/apps/1211542/atlassian-rest-api-browser?hosting=server&tab=overview
You can find the Kantega SSO REST API by searching for ksso/api and uncheck the “show only public APIs” checkbox.
1. General plugin information
On the resource /rest/ksso/api/info/1.0/ping, you can perform GET requests to check the liveness of Kantega SSO Enterprise.
Example
GEThttps://<atlassian-product-base-url>/rest/ksso/api/info/1.0/ping
Returns a HTTP 200 with a JSON document when Kantega SSO Enterprise is alive:
{
"datetime": "2022-04-09T05:10:06.160+02:00[Europe/Oslo]",
"response": "pong",
"timestamp": 1649473806160
}
2. Snapshots of Config (Now Backup & restore in GUI)
The available services under /rest/ksso/api/snapshot are:
Resources under /rest for sysadmin | HTTP method | Description |
---|---|---|
ksso/api/snapshot/1.0/config/snapshot/ | GET | Returns a list of available snapshots |
ksso/api/snapshot/1.0/config/snapshot/ | POST | Saves a snapshot of the Kantega SSO configuration, with optional description |
ksso/api/snapshot/1.0/config/snapshot/restore/{id} | POST | Restores snapshot with id |
Examples
GEThttps://<atlassian-product-base-url>/rest/ksso/api/snapshot/1.0/config/snapshot/
Returns a list of available snapshots like
[
{
"applicationName": "JIRA",
"applicationVersion": "8.16.1",
"pluginVersion": "5.2.1-SNAPSHOT",
"baseUrl": "https://elisor-p1:8443/jira",
"timeMillis": 1641298623998,
"description": "test",
"filename": "sso-snapshot-2022-01-04-13_17_04.zip",
"id": "sso-snapshot-2022-01-04-13_17_04",
"readable": true
},
{
"applicationName": "JIRA",
"applicationVersion": "8.16.1",
"pluginVersion": "5.2.1-SNAPSHOT",
"baseUrl": "https://elisor-p1:8443/jira",
"timeMillis": 1641224273947,
"description": "Backup before upgrade of config from version [unknown version] to 5.2.1-SNAPSHOT",
"filename": "sso-snapshot-2022-01-03-16_37_53.zip",
"id": "sso-snapshot-2022-01-03-16_37_53",
"readable": true
}
]
POST/rest/ksso/api/snapshot/1.0/config/snapshot/
Without parameter will automatically generate a description like:
sso-snapshot-2021-12-02-19_51_50
You can also provide a description to tag the snapshot with more info:/rest/ksso/api/snapshot/1.0/config/snapshot/?description=test-snapshot-2021-12-01
POST/rest/ksso/api/snapshot/1.0/config/snapshot/restore/{id}
example:/rest/ksso/api/snapshot/1.0/config/snapshot/restore/sso-snapshot-2021-12-02-19_51_50
Restores the snapshot with id sso-snapshot-2021-12-02-19_51_50. The description does not affect the id, so it’s best to retrieve the id of a snapshot with a specific description by running GET /rest/ksso/api/snapshot/1.0/config/snapshot/
and filtering the results with a specific description.
3. API Tokens
Resources under /rest/ksso/api/apitokens/3.0
Resources under /rest for sysadmin | HTTP method | Description |
---|