Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The latest Kantega SSO REST API offers the following resources:

  1. General plugin information

  2. Snapshots of Config

  3. API Tokens


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 our APIs 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

GET
https://<atlassian-product-base-url>/rest/ksso/api/info/1.0/ping

...

Code Block
{
    "datetime": "2022-04-09T05:10:06.160+02:00[Europe/Oslo]",
    "response": "pong",
    "timestamp": 1649473806160
}

2. Snapshots of Config

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

GET
https://<atlassian-product-base-url>/rest/ksso/api/snapshot/1.0/config/snapshot/
Returns a list of available snapshots like

...

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/2.0

Resources under /rest for sysadmin

HTTP method

Description

ksso/api/apitokens/2.0/admin/delete/{id}

DELETE

Deletes the token with the given ID. Requires system administrator access.

ksso/api/apitokens/2.0/admin/tokens

GET

Returns a list of all API tokens in the system.

Resources under /rest for user

ksso/api/apitokens/2.0/user/tokens

GET

Returns a list of all API tokens for the logged in user

ksso/api/apitokens/2.0/user/tokens

POST

Accepts a JSON body with an entry like below, or an empty JSON body where default values are generated. The default is 30 day expiry and description api_token_<ISO formatted timestamp>

Code Block
languagejson
{
"tokenName":"Name"
"description":"****",
"validForDays":"180"
}

ksso/api/apitokens/2.0/user/delete/{id}

DELETE

Deletes the token with the given ID and returns plain text with a confirmation.

ksso/api/apitokens/2.0/user/expiry/status

GET

Accepts an API token ID in a query parameter as ?id Returns a JSON body with data about the expiry status for the given API token.

ksso/api/apitokens/2.0/user/refresh

PUT

Accepts a json body like below with the secret, or using the API token in the Authorization header if present and the JSON body is empty.

Code Block
languagejson
{
"apiToken":"BBSVAkksjASLS****"
}

Examples

GET

rest/ksso/api/apitokens/2.0/user/tokens as an admin user

...