Apps and Identities¶
Catalogs, users, groups and app permissions.
Every call in this group
- Method
POSTtohttps://{tenant}/api/{Group}/{Action}, also for reads. - Header
TempIdentityToken: <token>. Create tokens in Configuration > Services > API Access. - Success HTTP 200 with
{ "Success": true, "MessageKey": ..., "Data": ... }. Always checkSuccess. - Failure HTTP 412 with
{ "Success": false, "Messages": [ { "MessageKey": ... } ] }. The spec lists failures as 400; the server sends 412. HTTP 401 means the token or its features; HTTP 422 means the body does not match the model. - C# samples Use the generated client
KL.APIClient. Generate the client from your tenant's spec (how). A non-200 status throwsKL.APIClient.Client.ApiException. - Guides API introduction, Authentication
Actions¶
| Action | Summary |
|---|---|
| GetAllAppsPermissionsDefinitions | Retrieves all defintions for apps permissions that are assignable to apps identities. |
| GetAppsPermissionsForIdentity | Retrieves authorized apps permissions and identity information associated with the specified identity token. |
| GetCatalogs | Retrieves the collection of catalogs configured. |
| GetGroups | Retrieves the collection of groups associated with the specified catalog. |
| GetUsers | Retrieves the collection of users associated with the specified catalog. |
| SyncCatalog | Syncs the users and groups associated with the specified catalog. |
GetAllAppsPermissionsDefinitions¶
Retrieves all defintions for apps permissions that are assignable to apps identities.
- Token feature View Catalogs
- Content type application/json
Request¶
No body. Send {} or an empty body.
Response¶
Returns a collection apps permissions definitions.
Envelope: DataResponseAppPermissionsDTOCollection. Data is array of AppFeaturePermissionsDTO.
{
"Success": true,
"MessageKey": null,
"Data": [
{
"ApplicationId": "taxonomy",
"AuthorizedFeatureKeys": [
"taxonomy_ft_use_app",
"taxonomy_ft_caneditconfig"
]
},
{
"ApplicationId": "webindex",
"AuthorizedFeatureKeys": [
"webindex_ft_batch_editstructure",
"webindex_ft_batch_view",
"webindex_ft_batch_index",
"webindex_ft_indexpanel_view",
"webindex_ft_app",
"webindex_ft_batchgrid_view"
]
}
]
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerGetAllAppsPermissionsDefinitionsAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetAllAppsPermissionsDefinitions",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetAllAppsPermissionsDefinitions", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
GetAppsPermissionsForIdentity¶
Retrieves authorized apps permissions and identity information associated with the specified identity token.
- Token feature View Catalogs
- Content type application/json
Request¶
An object containing identifying information about the identity.
Schema: IdentityIdentifierParameter. Identifying information about an identity
| Field | Type | Description |
|---|---|---|
IdentityToken |
string | Token associated with the identity existing in an apps identity catalog |
Response¶
Returns an object representation of the specified identity and all apps permissions granted to that identity.
Envelope: DataResponseIdentityAndAppPermissionsDTO. Data is IdentityAndAppPermissionsDTO.
{
"Success": true,
"MessageKey": null,
"Data": {
"Token": "JohnSmith@acme.com_00000000-0000-0000-0000-000000000000",
"Name": "JohnSmith@acme.com",
"CatalogId": "37c4a8db-70fe-4c35-9876-f2b885e20677",
"IsGroup": false,
"AppFeaturePermissions": [
{
"ApplicationId": "webindex",
"AuthorizedFeatureKeys": [
"webindex_ft_batch_editstructure",
"webindex_ft_batch_view",
"webindex_ft_batch_index",
"webindex_ft_indexpanel_view",
"webindex_ft_app",
"webindex_ft_batchgrid_view"
]
}
]
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerGetAppsPermissionsForIdentityAsync(new IdentityIdentifierParameter
{
IdentityToken = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"IdentityToken": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetAppsPermissionsForIdentity" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetAppsPermissionsForIdentity",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"IdentityToken": "string"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetAppsPermissionsForIdentity", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"IdentityToken": "string"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
GetCatalogs¶
Retrieves the collection of catalogs configured.
- Token feature View Catalogs
- Content type application/json
Request¶
No body. Send {} or an empty body.
Response¶
Returns a collection of catalogs.
Envelope: DataResponseCatalogDTOCollection. Data is array of CatalogDTO.
{
"Success": true,
"MessageKey": null,
"Data": {
"CatalogTypeId": "3a37199f-5d73-47f6-853f-37e520349f54",
"CatalogTypeNameKey": "Catalog type name key",
"CatalogName": "Catalog Name",
"CatalogId": "d0440103-b389-400c-af80-21e33fd10d82",
"CatalogFeatures": null,
"FactoryFeatures": null,
"CatalogMetadata": null
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerGetCatalogsAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetCatalogs", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
GetGroups¶
Retrieves the collection of groups associated with the specified catalog.
- Token feature View Catalogs
- Content type application/json
Request¶
An object containing identifying information about the catalog.
Schema: CatalogIdentifierParameter. Identifying information about a catalog
| Field | Type | Description |
|---|---|---|
CatalogId |
string (uuid) | ID of the catalog |
Response¶
Returns a collection of groups, including identifying information for each group.
Envelope: DataResponseCatalogIdentityBaseDTOCollection. Data is array of CatalogIdentityBaseDTO.
{
"Success": true,
"MessageKey": null,
"Data": {
"Token": "Sales_00000000-0000-0000-0000-000000000000",
"CatalogId": "a8ef4227-ce1f-4563-b565-49a8a122403f",
"DisplayName": "Sales"
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerGetGroupsAsync(new CatalogIdentifierParameter
{
CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"CatalogId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetGroups" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetGroups",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetGroups", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
GetUsers¶
Retrieves the collection of users associated with the specified catalog.
- Token feature View Catalogs
- Content type application/json
Request¶
An object containing identifying information about the catalog.
Schema: CatalogIdentifierParameter. Identifying information about a catalog
| Field | Type | Description |
|---|---|---|
CatalogId |
string (uuid) | ID of the catalog |
Response¶
Returns a collection of groups, including identifying information for each group.
Envelope: DataResponseCatalogIdentityUserDTOCollection. Data is array of CatalogIdentityUserDTO.
{
"Success": true,
"MessageKey": null,
"Data": {
"Token": "JohnSmith@acme.com_00000000-0000-0000-0000-000000000000",
"CatalogId": "c8c03118-e35b-4abb-91ba-95665ae19fae",
"DisplayName": "John Smith",
"Email": "john.smit@example.com"
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerGetUsersAsync(new CatalogIdentifierParameter
{
CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"CatalogId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetUsers" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetUsers",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/GetUsers", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);
SyncCatalog¶
Syncs the users and groups associated with the specified catalog.
- Token feature View Catalogs
- Content type application/json
Request¶
An object containing identifying information about the catalog.
Schema: CatalogIdentifierParameter. Identifying information about a catalog
| Field | Type | Description |
|---|---|---|
CatalogId |
string (uuid) | ID of the catalog |
Response¶
Returns a collection of groups, including identifying information for each group.
Envelope: DataResponseCatalogSyncDTO. Data is CatalogSyncResultsDTO.
{
"Success": true,
"MessageKey": null,
"Data": {
"Removed": [
{
"Token": "JohnSmith@acme.com_00000000-0000-0000-0000-000000000000",
"CatalogId": "7be13974-7333-4de0-a6a4-3b0c98153723",
"DisplayName": "John Smith"
}
],
"Added": [
{
"Token": "Sales_00000000-0000-0000-0000-000000000000",
"CatalogId": "bf6790c5-b9b4-4f44-846f-8bf98d01c0b7",
"DisplayName": "Sales"
}
]
}
}
Example¶
using KL.APIClient.Api;
using KL.APIClient.Client;
using KL.APIClient.Model;
var config = new Configuration { BasePath = "https://yourcompany.knowledgelake.io/api" };
config.AddApiKey("TempIdentityToken", Environment.GetEnvironmentVariable("KL_TOKEN"));
var api = new V1AppsAPIApi(config);
var response = await api.V1AppsAPIControllerSyncCatalogAsync(new CatalogIdentifierParameter
{
CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
$body = @'
{
"CatalogId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_AppsAPI/SyncCatalog" `
-Headers @{ TempIdentityToken = $env:KL_TOKEN } `
-ContentType "application/json" -Body $body
if (-not $r.Success) { throw $r.MessageKey }
$r.Data
import os, requests
r = requests.post("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/SyncCatalog",
headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
json={
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
data = r.json()
if not data.get("Success"):
raise RuntimeError(data.get("MessageKey") or data.get("Messages"))
print(data["Data"])
const r = await fetch("https://yourcompany.knowledgelake.io/api/V1_AppsAPI/SyncCatalog", {
method: "POST",
headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({
"CatalogId": "00000000-0000-0000-0000-000000000000"
})
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);