Skip to content

Repository

V1_RepositoryAPI29 actions

Destinations, sources, content types and fields, field behaviors, saved searches, and documents at rest in a destination.

Every call in this group

  • Method POST to https://{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 check Success.
  • 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 throws KL.APIClient.Client.ApiException.
  • Guides API introduction, Authentication

Actions

Action Summary
AddContentType Adds a user-defined content type with a provided name to the specified connector.
AddContentTypeField Adds a user-defined field to a specified content type
AddContentTypeFieldBehavior Adds a user-defined behavior to a specified content type field
AddContentTypePermissionForUser Adds a user to the access list for a content type
DownloadDocument Downloads a document from a destination
GetContentTypes Retrieves a collection of content types that the user associated with the provided token has access to interact with.
GetContentTypesAccessibleByIdentity Retrieves a collection of content types to which the specified identity has access.
GetContentTypesByDestination Retrieves a collection of content types that the user associated with the provided token has access to interact with from the provided destination.
GetDestinations Retrieves a collection of connectors.
GetIdentitiesWithAccessToContentType Retrieves a collection of identities with access to the specified content type.
GetMetadata Retrieves metadata from a specified document at rest in a document repository.
GetRemoteGateways Retrieves state information for all gateways
GetSavedSearches Retrieves list of available Saved Searches
GetSources Retrieves a collection of sources.
RemoveContentTypePermissionForUser Removes a user from the access list for a content type
RunSavedSearch Performs a Saved Search
SendDocumentToRecycleBin Sends the specified Document to the configured Recycle Bin
SetContentTypeDisplayName Sets a new display name for a preexisting content type.
SetContentTypeFieldBehaviorConfiguration Modifies the behavior configuration of an existing behavior on a specified content type field
SetContentTypeFieldBehaviorSequence Sets the sequence of existing behavior on a specified content type field
SetContentTypeFieldEnabled Enables or disables a specified field
SetContentTypeFieldLabel Sets the label of a specified field
SetContentTypeFieldSequence Sets the sequence number of a specified field
SetContentTypeFieldStyle Sets the style of a specified field
SetContentTypeFieldStyleConfiguration Sets the configuration of a field on a specified content type relative to the style already assigned to the field
SetContentTypeFieldVisible Enables or disables a specified field's visibility
SetContentTypeVisible Sets the visibility of a preexisting content type.
UploadDocument Uploads a file with metadata to be sent directly to a specified repository.
UpsertDocumentMetadata Inserts or updates Item Metadata

AddContentType

POST/api/V1_RepositoryAPI/AddContentType

Adds a user-defined content type with a provided name to the specified connector.

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the connector and the desired initial state of the content type to be added.

Schema: AddContentTypeParameter. Information required for creating a content type

Field Type Description
ConnectorId string (uuid) Id of the connector to which the content type should be added
InternalContentTypeId string (uuid) Id of the content type used to refer to it internally. Will be automatically generated if not provided at creation time
DisplayName string Display name of the content type
Visible boolean Determines whether the content type is visible or not. Defaults to true if not provided

Response

Returns an object representation of the newly created content type.

Envelope: DataResponseContentTypeDTO. Data is ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "InternalId": "00000000-0000-0000-0000-000000000000",
    "ContentTypeId": "Example CT 1",
    "ContentTypeDisplayName": "Example CT 1",
    "FieldDefinitions": [
      {
        "MetadataKey": "Example Field Name",
        "ConfiguredUI": {
          "Sequence": "0",
          "UIKind": "Textbox",
          "UIConfig": [
            {
              "Key": "Label",
              "Value": "Example Field Name"
            },
            {
              "Key": "Visible",
              "Value": "true"
            },
            {
              "Key": "Enabled",
              "Value": "true"
            },
            {
              "Key": "Errors",
              "Value": ""
            }
          ]
        },
        "ConfiguredBehaviors": [
          {
            "BehaviorId": "Automatic Indexing",
            "BehaviorKey": "Behavior Key",
            "Sequence": "0",
            "LockedBehavior": false,
            "BehaviorConfig": [
              {
                "Key": "Example Behavior Key",
                "Value": "Example Behavior Value"
              }
            ]
          }
        ],
        "MetadataDescription": [
          {
            "MetadataKey": "Example Key",
            "MetadataValue": "Example Value"
          }
        ]
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerAddContentTypeAsync(new AddContentTypeParameter
{
    ConnectorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DisplayName = "string",
    Visible = false,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentType" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ConnectorId": "00000000-0000-0000-0000-000000000000", "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "DisplayName": "string", "Visible": false}'
$body = @'
{
  "ConnectorId": "00000000-0000-0000-0000-000000000000",
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "DisplayName": "string",
  "Visible": false
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentType" `
  -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_RepositoryAPI/AddContentType",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ConnectorId": "00000000-0000-0000-0000-000000000000",
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "DisplayName": "string",
                    "Visible": false
                  })
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_RepositoryAPI/AddContentType", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ConnectorId": "00000000-0000-0000-0000-000000000000",
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "DisplayName": "string",
    "Visible": false
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

AddContentTypeField

POST/api/V1_RepositoryAPI/AddContentTypeField

Adds a user-defined field to a specified content type

  • Token feature Access Repository
  • Content type application/json

Request

An object containing the desired inital state of the field to be added to the specified content type.

Schema: AddContentTypeFieldParameter. An object containing the desired initial state of the field to be added to the specified content type

Field Type Description
Style object String identifier dictating what kind of UI control should be associated with the field. Possible values: AppendSuggestDropDownList, Boolean, CheckBoxCollection, Currency, DateTime, DropDownList, MultiLineTextbox, NumericUpDown, RadioButtonCollection, Table, TermSet, Textbox, Unsupported
Label string User-friendly display name of the field
Enabled boolean Determines whether the field is enabled or not
Visible boolean Determines whether the field is visible or not
Sequence integer 0-based index of the field's display position relative to other fields on the content type
StyleConfiguration object
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly added field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerAddContentTypeFieldAsync(new AddContentTypeFieldParameter
{
    Style = FieldStyle.Lookup,
    Label = "string",
    Enabled = false,
    Visible = false,
    Sequence = 0,
    StyleConfiguration = new Dictionary<string, string>(),
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypeField" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Style": null, "Label": "string", "Enabled": false, "Visible": false, "Sequence": 0, "StyleConfiguration": {}, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Style": null,
  "Label": "string",
  "Enabled": false,
  "Visible": false,
  "Sequence": 0,
  "StyleConfiguration": {},
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypeField" `
  -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_RepositoryAPI/AddContentTypeField",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Style": null,
                    "Label": "string",
                    "Enabled": false,
                    "Visible": false,
                    "Sequence": 0,
                    "StyleConfiguration": {},
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/AddContentTypeField", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Style": null,
    "Label": "string",
    "Enabled": false,
    "Visible": false,
    "Sequence": 0,
    "StyleConfiguration": {},
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

AddContentTypeFieldBehavior

POST/api/V1_RepositoryAPI/AddContentTypeFieldBehavior

Adds a user-defined behavior to a specified content type field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the content type, field, and behavior, as well as configuration to be set for the specified behavior.

Schema: AddContentTypeFieldBehaviorParameter. An object containing the desired initial state of the behavior to be added to the specified field

Field Type Description
BehaviorId string (uuid) Unique nullable guid representing the behavior's id internal to the product; will be autogenerated if not provided
BehaviorType object Unique string key of the behavior representing its type
Sequence integer Order in which the behavior should fire
BehaviorConfiguration object Key-value pairs representing configuration for the behavior's type
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

A behavior with the specified type has been added to the specified field.

Envelope: DataResponseConfiguredBehaviorDTO. Data is ConfiguredBehaviorDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "BehaviorId": "Automatic Indexing",
    "BehaviorKey": "Behavior Key",
    "Sequence": "0",
    "LockedBehavior": false,
    "BehaviorConfig": [
      {
        "Key": "Example Behavior Key",
        "Value": "Example Behavior Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerAddContentTypeFieldBehaviorAsync(new AddContentTypeFieldBehaviorParameter
{
    BehaviorType = BehaviorType.AlternateRequirementBehavior,
    BehaviorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    Sequence = 0,
    BehaviorConfiguration = new Dictionary<string, string>(),
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypeFieldBehavior" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"BehaviorId": "00000000-0000-0000-0000-000000000000", "BehaviorType": null, "Sequence": 0, "BehaviorConfiguration": {}, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "BehaviorId": "00000000-0000-0000-0000-000000000000",
  "BehaviorType": null,
  "Sequence": 0,
  "BehaviorConfiguration": {},
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypeFieldBehavior" `
  -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_RepositoryAPI/AddContentTypeFieldBehavior",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "BehaviorId": "00000000-0000-0000-0000-000000000000",
                    "BehaviorType": null,
                    "Sequence": 0,
                    "BehaviorConfiguration": {},
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/AddContentTypeFieldBehavior", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "BehaviorId": "00000000-0000-0000-0000-000000000000",
    "BehaviorType": null,
    "Sequence": 0,
    "BehaviorConfiguration": {},
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

AddContentTypePermissionForUser

POST/api/V1_RepositoryAPI/AddContentTypePermissionForUser

Adds a user to the access list for a content type

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the content type and user.

Schema: ContentTypePermissionParameter. Information for adding a user to the access list for a content type

Field Type Description
ContentTypeIdentifierParameter ContentTypeIdentifierParameter
IdentityTokenParameter IdentityTokenParameter

Response

The user has been added to the access list for that content type.

Envelope: KLApiResponse.

Example response
{
  "Success": true,
  "MessageKey": 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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerAddContentTypePermissionForUserAsync(new ContentTypePermissionParameter
{
    ContentTypeIdentifierParameter = new ContentTypeIdentifierParameter
    {
        InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    },
    IdentityTokenParameter = new IdentityTokenParameter
    {
        IdentityToken = "string",
        CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    },
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypePermissionForUser" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ContentTypeIdentifierParameter": {"InternalContentTypeId": "00000000-0000-0000-0000-000000000000"}, "IdentityTokenParameter": {"IdentityToken": "string", "CatalogId": "00000000-0000-0000-0000-000000000000"}}'
$body = @'
{
  "ContentTypeIdentifierParameter": {
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
  },
  "IdentityTokenParameter": {
    "IdentityToken": "string",
    "CatalogId": "00000000-0000-0000-0000-000000000000"
  }
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/AddContentTypePermissionForUser" `
  -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_RepositoryAPI/AddContentTypePermissionForUser",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ContentTypeIdentifierParameter": {
                      "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
                    },
                    "IdentityTokenParameter": {
                      "IdentityToken": "string",
                      "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_RepositoryAPI/AddContentTypePermissionForUser", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ContentTypeIdentifierParameter": {
      "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
    },
    "IdentityTokenParameter": {
      "IdentityToken": "string",
      "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);

DownloadDocument

POST/api/V1_RepositoryAPI/DownloadDocument

Downloads a document from a destination

  • Token feature Download Documents
  • Content type application/json

Request

Schema: DownloadDocumentParameter. Identifying information for a document stored in a repository

Field Type Description
SearchCatalogId string (uuid) The search catalog containing the document
DocumentId string The identifier of the document to retrieve

Response

The requested document

Returns file.

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 V1RepositoryAPIApi(config);

using var stream = await api.V1RepositoryAPIControllerDownloadDocumentAsync(new DownloadDocumentParameter
{
    SearchCatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DocumentId = "string",
});
using var output = File.Create("download.bin");
await stream.CopyToAsync(output);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/DownloadDocument" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"SearchCatalogId": "00000000-0000-0000-0000-000000000000", "DocumentId": "string"}'
$body = @'
{
  "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
  "DocumentId": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/DownloadDocument" `
  -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_RepositoryAPI/DownloadDocument",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
                    "DocumentId": "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_RepositoryAPI/DownloadDocument", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
    "DocumentId": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

GetContentTypes

POST/api/V1_RepositoryAPI/GetContentTypes

Retrieves a collection of content types that the user associated with the provided token has access to interact with.

  • Token feature Access Repository
  • Content type application/json

Request

No body. Send {} or an empty body.

Response

Returns a collection of content types, including associated fields and configurations.

Envelope: DataResponseContentTypeDTOCollection. Data is array of ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "InternalId": "00000000-0000-0000-0000-000000000000",
      "ContentTypeId": "Example CT 1",
      "ContentTypeDisplayName": "Example CT 1",
      "FieldDefinitions": [
        {
          "MetadataKey": "Example Field Name",
          "ConfiguredUI": {
            "Sequence": "0",
            "UIKind": "Textbox",
            "UIConfig": [
              {
                "Key": "Label",
                "Value": "Example Field Name"
              },
              {
                "Key": "Visible",
                "Value": "true"
              },
              {
                "Key": "Enabled",
                "Value": "true"
              },
              {
                "Key": "Errors",
                "Value": ""
              }
            ]
          },
          "ConfiguredBehaviors": [
            {
              "BehaviorId": "Automatic Indexing",
              "BehaviorKey": "Behavior Key",
              "Sequence": "0",
              "LockedBehavior": false,
              "BehaviorConfig": [
                {
                  "Key": "Example Behavior Key",
                  "Value": "Example Behavior Value"
                }
              ]
            }
          ],
          "MetadataDescription": [
            {
              "MetadataKey": "Example Key",
              "MetadataValue": "Example Value"
            }
          ]
        }
      ]
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetContentTypesAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypes" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
$body = @'
{}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypes" `
  -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_RepositoryAPI/GetContentTypes",
                  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_RepositoryAPI/GetContentTypes", {
  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);

GetContentTypesAccessibleByIdentity

POST/api/V1_RepositoryAPI/GetContentTypesAccessibleByIdentity

Retrieves a collection of content types to which the specified identity has access.

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the identity.

Schema: IdentityTokenParameter. Identifying information for an identity

Field Type Description
IdentityToken string User Token
CatalogId string (uuid) Catalog Id

Response

Returns a collection of content types, including associated fields and configurations.

Envelope: DataResponseContentTypeDTOCollection. Data is array of ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "InternalId": "00000000-0000-0000-0000-000000000000",
      "ContentTypeId": "Example CT 1",
      "ContentTypeDisplayName": "Example CT 1",
      "FieldDefinitions": [
        {
          "MetadataKey": "Example Field Name",
          "ConfiguredUI": {
            "Sequence": "0",
            "UIKind": "Textbox",
            "UIConfig": [
              {
                "Key": "Label",
                "Value": "Example Field Name"
              },
              {
                "Key": "Visible",
                "Value": "true"
              },
              {
                "Key": "Enabled",
                "Value": "true"
              },
              {
                "Key": "Errors",
                "Value": ""
              }
            ]
          },
          "ConfiguredBehaviors": [
            {
              "BehaviorId": "Automatic Indexing",
              "BehaviorKey": "Behavior Key",
              "Sequence": "0",
              "LockedBehavior": false,
              "BehaviorConfig": [
                {
                  "Key": "Example Behavior Key",
                  "Value": "Example Behavior Value"
                }
              ]
            }
          ],
          "MetadataDescription": [
            {
              "MetadataKey": "Example Key",
              "MetadataValue": "Example Value"
            }
          ]
        }
      ]
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetContentTypesAccessibleByIdentityAsync(new IdentityTokenParameter
{
    IdentityToken = "string",
    CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypesAccessibleByIdentity" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"IdentityToken": "string", "CatalogId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "IdentityToken": "string",
  "CatalogId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypesAccessibleByIdentity" `
  -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_RepositoryAPI/GetContentTypesAccessibleByIdentity",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "IdentityToken": "string",
                    "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_RepositoryAPI/GetContentTypesAccessibleByIdentity", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "IdentityToken": "string",
    "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);

GetContentTypesByDestination

POST/api/V1_RepositoryAPI/GetContentTypesByDestination

Retrieves a collection of content types that the user associated with the provided token has access to interact with from the provided destination.

  • Token feature Access Repository
  • Content type application/json

Request

A connector DTO object.

Schema: RepositoryConnectorDTO. An object representation of a repository connector

Field Type Description
ConnectorId string (uuid) ID of the connector
DisplayName string Display name of the connector
ConnectorDefinitionId string ID of the connector definition
GatewayId string (uuid) Gateway Id name of the connector

Response

Returns a collection of content types, including associated fields and configurations.

Envelope: DataResponseContentTypeDTOCollection. Data is array of ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "InternalId": "00000000-0000-0000-0000-000000000000",
      "ContentTypeId": "Example CT 1",
      "ContentTypeDisplayName": "Example CT 1",
      "FieldDefinitions": [
        {
          "MetadataKey": "Example Field Name",
          "ConfiguredUI": {
            "Sequence": "0",
            "UIKind": "Textbox",
            "UIConfig": [
              {
                "Key": "Label",
                "Value": "Example Field Name"
              },
              {
                "Key": "Visible",
                "Value": "true"
              },
              {
                "Key": "Enabled",
                "Value": "true"
              },
              {
                "Key": "Errors",
                "Value": ""
              }
            ]
          },
          "ConfiguredBehaviors": [
            {
              "BehaviorId": "Automatic Indexing",
              "BehaviorKey": "Behavior Key",
              "Sequence": "0",
              "LockedBehavior": false,
              "BehaviorConfig": [
                {
                  "Key": "Example Behavior Key",
                  "Value": "Example Behavior Value"
                }
              ]
            }
          ],
          "MetadataDescription": [
            {
              "MetadataKey": "Example Key",
              "MetadataValue": "Example Value"
            }
          ]
        }
      ]
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetContentTypesByDestinationAsync(new RepositoryConnectorDTO
{
    ConnectorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DisplayName = "string",
    ConnectorDefinitionId = "string",
    GatewayId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypesByDestination" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ConnectorId": "00000000-0000-0000-0000-000000000000", "DisplayName": "string", "ConnectorDefinitionId": "string", "GatewayId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "ConnectorId": "00000000-0000-0000-0000-000000000000",
  "DisplayName": "string",
  "ConnectorDefinitionId": "string",
  "GatewayId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetContentTypesByDestination" `
  -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_RepositoryAPI/GetContentTypesByDestination",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ConnectorId": "00000000-0000-0000-0000-000000000000",
                    "DisplayName": "string",
                    "ConnectorDefinitionId": "string",
                    "GatewayId": "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_RepositoryAPI/GetContentTypesByDestination", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ConnectorId": "00000000-0000-0000-0000-000000000000",
    "DisplayName": "string",
    "ConnectorDefinitionId": "string",
    "GatewayId": "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);

GetDestinations

POST/api/V1_RepositoryAPI/GetDestinations

Retrieves a collection of connectors.

  • Token feature Access Repository
  • Content type application/json

Request

No body. Send {} or an empty body.

Response

Returns a collection of connectors.

Envelope: DataResponseRepositoryConnectorDTOCollection. Data is array of RepositoryConnectorDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "ConnectorId": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Display Name",
      "ConnectorDefinitionId": "Connector Definition Id",
      "GatewayId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetDestinationsAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetDestinations" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
$body = @'
{}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetDestinations" `
  -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_RepositoryAPI/GetDestinations",
                  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_RepositoryAPI/GetDestinations", {
  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);

GetIdentitiesWithAccessToContentType

POST/api/V1_RepositoryAPI/GetIdentitiesWithAccessToContentType

Retrieves a collection of identities with access to the specified content type.

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the content type.

Schema: ContentTypeIdentifierParameter. Identifying information for a content type

Field Type Description
InternalContentTypeId string (uuid) Id of the content type used to refer to it internally

Response

Returns a collection of identity tokens representing identities with access to the specified content type.

Envelope: DataResponseIdentityTokenList. Data is array of string.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    "user1_dfb74d8ce0aa6fff6bfec09583005c4daa443663",
    "user2_a51a2d73bf7cea0e2a914ee1430eb33312fc2a4a",
    "user3_08f361abafddec59336972b7e9287b0d182b1883"
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetIdentitiesWithAccessToContentTypeAsync(new ContentTypeIdentifierParameter
{
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetIdentitiesWithAccessToContentType" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"InternalContentTypeId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetIdentitiesWithAccessToContentType" `
  -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_RepositoryAPI/GetIdentitiesWithAccessToContentType",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "InternalContentTypeId": "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_RepositoryAPI/GetIdentitiesWithAccessToContentType", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "InternalContentTypeId": "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);

GetMetadata

POST/api/V1_RepositoryAPI/GetMetadata

Retrieves metadata from a specified document at rest in a document repository.

  • Token feature Edit Documents
  • Content type application/json

Request

Schema: GetMetadataParameter. Identifying information for an item's metadata to retrieve

Field Type Description
ConnectorId string (uuid) ID of the connector
ItemId string ID of the item

Response

Retrieved metadata associated with the specified document

Envelope: DataResponseMetadataItemDTO. Data is MetadataItemDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "ItemId": "6d99f1b7-5a72-408a-a5c2-3921338ce154",
    "ItemHash": "<sha256-hash>",
    "Metadata": {
      "BooleanParameters": [
        {
          "Name": "Indexed",
          "Value": true
        }
      ],
      "IntegerParameters": [
        {
          "Name": "ProductTotal",
          "Value": "1005"
        }
      ],
      "StringParameters": [
        {
          "Name": "ClientName",
          "Value": "Acme, Inc."
        }
      ],
      "StringEncryptedParameters": [
        {
          "Name": "SensitiveString",
          "Value": "*******"
        }
      ],
      "StringArrayParameters": [
        {
          "Name": "ProductNames",
          "Value": [
            "Pen",
            "Paper",
            "Ink"
          ]
        }
      ],
      "DateTimeParameters": [
        {
          "Name": "Timestamp",
          "Value": "2026-10-07T20:19:08.9216464+00:00"
        }
      ],
      "ByteArrayParameters": [
        {
          "Name": "FileContent",
          "Value": [
            0,
            0,
            0,
            0,
            0
          ]
        }
      ],
      "DecimalParameters": [
        {
          "Name": "InvoiceAmount",
          "Value": null
        }
      ]
    },
    "SystemMetadata": {
      "BooleanParameters": [
        {
          "Name": "Indexed",
          "Value": true
        }
      ],
      "IntegerParameters": [
        {
          "Name": "ProductTotal",
          "Value": "1005"
        }
      ],
      "StringParameters": [
        {
          "Name": "ClientName",
          "Value": "Acme, Inc."
        }
      ],
      "StringEncryptedParameters": [
        {
          "Name": "SensitiveString",
          "Value": "*******"
        }
      ],
      "StringArrayParameters": [
        {
          "Name": "ProductNames",
          "Value": [
            "Pen",
            "Paper",
            "Ink"
          ]
        }
      ],
      "DateTimeParameters": [
        {
          "Name": "Timestamp",
          "Value": "2026-10-07T20:19:08.9216522+00:00"
        }
      ],
      "ByteArrayParameters": [
        {
          "Name": "FileContent",
          "Value": [
            0,
            0,
            0,
            0,
            0
          ]
        }
      ],
      "DecimalParameters": [
        {
          "Name": "InvoiceAmount",
          "Value": null
        }
      ]
    },
    "UIHints": {
      "ContentType": {
        "title": "ContentType"
      }
    }
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetMetadataAsync(new GetMetadataParameter
{
    ConnectorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    ItemId = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetMetadata" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ConnectorId": "00000000-0000-0000-0000-000000000000", "ItemId": "string"}'
$body = @'
{
  "ConnectorId": "00000000-0000-0000-0000-000000000000",
  "ItemId": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetMetadata" `
  -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_RepositoryAPI/GetMetadata",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ConnectorId": "00000000-0000-0000-0000-000000000000",
                    "ItemId": "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_RepositoryAPI/GetMetadata", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ConnectorId": "00000000-0000-0000-0000-000000000000",
    "ItemId": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

GetRemoteGateways

POST/api/V1_RepositoryAPI/GetRemoteGateways

Retrieves state information for all gateways

  • Token feature Get Gateways
  • Content type application/json

Request

No body. Send {} or an empty body.

Response

Returns an object containing a list of gateways and a timestamp of the retrieval time

Envelope: DataResponseGatewayListResult. Data is TimestampedGatewayInfos.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "Gateways": [
      {
        "DisplayName": "Example Gateway",
        "LastConnectedUTC": "0001-01-01T00:00:00.0000000+00:00",
        "GatewayId": "00000000-0000-0000-0000-000000000000",
        "IsOnline": true
      }
    ],
    "StatusLastRetrievedUTC": "0001-01-01T00:00:00.0000000+00:00"
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetRemoteGatewaysAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetRemoteGateways" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
$body = @'
{}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetRemoteGateways" `
  -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_RepositoryAPI/GetRemoteGateways",
                  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_RepositoryAPI/GetRemoteGateways", {
  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);

GetSavedSearches

POST/api/V1_RepositoryAPI/GetSavedSearches

Retrieves list of available Saved Searches

  • Token feature Run Searches
  • Content type application/json

Request

Schema: ParameterGetSavedSearchesListDTO. Parameter for retrieving saved search

Field Type Description
SearchCatalogId string (uuid) The Id of the search catalog to use

Response

The List of possible searches

Envelope: DataResponseSavedSearchDTOCollection. Data is array of SavedSearchDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "SavedSearchId": "c42af062-8eab-41c4-993d-b6c003ce5b4a",
      "SavedSearchName": "Saved Search 1",
      "ResultColumns": [
        {
          "Id": "RecordId",
          "Format": "string"
        }
      ],
      "LastModified": "2026-10-07T20:19:08.9217422+00:00",
      "SearchConditions": [],
      "SearchCatalogId": "e20ef058-f5ae-4fea-9b37-55e3aeed3c72"
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetSavedSearchesAsync(new ParameterGetSavedSearchesListDTO
{
    SearchCatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetSavedSearches" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"SearchCatalogId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "SearchCatalogId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetSavedSearches" `
  -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_RepositoryAPI/GetSavedSearches",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "SearchCatalogId": "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_RepositoryAPI/GetSavedSearches", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "SearchCatalogId": "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);

GetSources

POST/api/V1_RepositoryAPI/GetSources

Retrieves a collection of sources.

  • Token feature Access Repository
  • Content type application/json

Request

No body. Send {} or an empty body.

Response

Returns a collection of sources.

Envelope: DataResponseRepositoryConnectorDTOCollection. Data is array of RepositoryConnectorDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": [
    {
      "ConnectorId": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Display Name",
      "ConnectorDefinitionId": "Connector Definition Id",
      "GatewayId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerGetSourcesAsync();
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetSources" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
$body = @'
{}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/GetSources" `
  -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_RepositoryAPI/GetSources",
                  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_RepositoryAPI/GetSources", {
  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);

RemoveContentTypePermissionForUser

POST/api/V1_RepositoryAPI/RemoveContentTypePermissionForUser

Removes a user from the access list for a content type

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the content type and user.

Schema: ContentTypePermissionParameter. Information for adding a user to the access list for a content type

Field Type Description
ContentTypeIdentifierParameter ContentTypeIdentifierParameter
IdentityTokenParameter IdentityTokenParameter

Response

The user has been removed from the access list for that content type.

Envelope: KLApiResponse.

Example response
{
  "Success": true,
  "MessageKey": 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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerRemoveContentTypePermissionForUserAsync(new ContentTypePermissionParameter
{
    ContentTypeIdentifierParameter = new ContentTypeIdentifierParameter
    {
        InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    },
    IdentityTokenParameter = new IdentityTokenParameter
    {
        IdentityToken = "string",
        CatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    },
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/RemoveContentTypePermissionForUser" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ContentTypeIdentifierParameter": {"InternalContentTypeId": "00000000-0000-0000-0000-000000000000"}, "IdentityTokenParameter": {"IdentityToken": "string", "CatalogId": "00000000-0000-0000-0000-000000000000"}}'
$body = @'
{
  "ContentTypeIdentifierParameter": {
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
  },
  "IdentityTokenParameter": {
    "IdentityToken": "string",
    "CatalogId": "00000000-0000-0000-0000-000000000000"
  }
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/RemoveContentTypePermissionForUser" `
  -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_RepositoryAPI/RemoveContentTypePermissionForUser",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ContentTypeIdentifierParameter": {
                      "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
                    },
                    "IdentityTokenParameter": {
                      "IdentityToken": "string",
                      "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_RepositoryAPI/RemoveContentTypePermissionForUser", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ContentTypeIdentifierParameter": {
      "InternalContentTypeId": "00000000-0000-0000-0000-000000000000"
    },
    "IdentityTokenParameter": {
      "IdentityToken": "string",
      "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);

RunSavedSearch

POST/api/V1_RepositoryAPI/RunSavedSearch

Performs a Saved Search

  • Token feature Run Searches
  • Content type application/json

Request

Schema: ParameterRunSavedSearchDTO. Parameter for executing saved search

Field Type Description
SearchId string (uuid) The Id of the search to perform
SearchCatalogId string (uuid) The Id of the search catalog to use
RowLimit integer The Max amount of rows to pull
StartRow integer The Row index to skip to, before taking up to RowLimit
SearchConditions object The parameters of the search keyed by IDENTIFIER
SortOrders array of QuerySort The Sorting to use for the results

Response

The List of possible searches

Envelope: DataResponseSavedSearchResultDTOCollection. Data is SavedSearchResultDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "Results": [
      {
        "ContentTypeId": "Invoice",
        "Metadata": null,
        "ResultItemId": "a6d3cb64-a603-4a85-92cf-906ef7f69ed8",
        "Data": [
          {
            "InternalPropertyId": "prop1",
            "Value": "value1"
          }
        ]
      }
    ],
    "TotalRows": "300"
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerRunSavedSearchAsync(new ParameterRunSavedSearchDTO
{
    SearchId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    SearchCatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    RowLimit = 0,
    StartRow = 0,
    SearchConditions = new PropertyBagDTOString
    {
        Booleans = new Dictionary<string, bool>(),
        Integers = new Dictionary<string, int>(),
        Decimals = new Dictionary<string, decimal>(),
        Strings = new Dictionary<string, string>(),
        DateTimes = new Dictionary<string, DateTime>(),
    },
    SortOrders = new List<QuerySort> { new QuerySort
        {
            Order = 0,
            Ascending = false,
            InternalPropertyId = "string",
        } },
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/RunSavedSearch" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"SearchId": "00000000-0000-0000-0000-000000000000", "SearchCatalogId": "00000000-0000-0000-0000-000000000000", "RowLimit": 0, "StartRow": 0, "SearchConditions": null, "SortOrders": [{}]}'
$body = @'
{
  "SearchId": "00000000-0000-0000-0000-000000000000",
  "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
  "RowLimit": 0,
  "StartRow": 0,
  "SearchConditions": null,
  "SortOrders": [
    {}
  ]
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/RunSavedSearch" `
  -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_RepositoryAPI/RunSavedSearch",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "SearchId": "00000000-0000-0000-0000-000000000000",
                    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
                    "RowLimit": 0,
                    "StartRow": 0,
                    "SearchConditions": null,
                    "SortOrders": [
                      {}
                    ]
                  })
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_RepositoryAPI/RunSavedSearch", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "SearchId": "00000000-0000-0000-0000-000000000000",
    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
    "RowLimit": 0,
    "StartRow": 0,
    "SearchConditions": null,
    "SortOrders": [
      {}
    ]
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SendDocumentToRecycleBin

POST/api/V1_RepositoryAPI/SendDocumentToRecycleBin

Sends the specified Document to the configured Recycle Bin

  • Token feature Recycle Documents
  • Content type application/json

Request

Schema: RecycleDocumentPayloadParameter. Identifying information for a document to send to the recycle bin.

Field Type Description
SearchCatalogId string (uuid) Search Catalog Id
DocumentId string (uuid) Document Id
OptionalProperties object Dictionary of string values. Such as hash Signature

Response

The specified document has been sent to the recycle bin.

Envelope: KLApiResponse.

Example response
{
  "Success": true,
  "MessageKey": 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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSendDocumentToRecycleBinAsync(new RecycleDocumentPayloadParameter
{
    SearchCatalogId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DocumentId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    OptionalProperties = new Dictionary<string, string>(),
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SendDocumentToRecycleBin" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"SearchCatalogId": "00000000-0000-0000-0000-000000000000", "DocumentId": "00000000-0000-0000-0000-000000000000", "OptionalProperties": {}}'
$body = @'
{
  "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
  "DocumentId": "00000000-0000-0000-0000-000000000000",
  "OptionalProperties": {}
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SendDocumentToRecycleBin" `
  -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_RepositoryAPI/SendDocumentToRecycleBin",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
                    "DocumentId": "00000000-0000-0000-0000-000000000000",
                    "OptionalProperties": {}
                  })
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_RepositoryAPI/SendDocumentToRecycleBin", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "SearchCatalogId": "00000000-0000-0000-0000-000000000000",
    "DocumentId": "00000000-0000-0000-0000-000000000000",
    "OptionalProperties": {}
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeDisplayName

POST/api/V1_RepositoryAPI/SetContentTypeDisplayName

Sets a new display name for a preexisting content type.

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the content type as well as a new display name value.

Schema: SetContentTypeDisplayNameParameter. Identifying information for the content type to modify and a new display name value

Field Type Description
InternalContentTypeId string (uuid) ID of the content type used to refer to it internally
DisplayName string Display name of the content type

Response

Returns the modified content type

Envelope: DataResponseContentTypeDTO. Data is ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "InternalId": "00000000-0000-0000-0000-000000000000",
    "ContentTypeId": "Example CT 1",
    "ContentTypeDisplayName": "Example CT 1",
    "FieldDefinitions": [
      {
        "MetadataKey": "Example Field Name",
        "ConfiguredUI": {
          "Sequence": "0",
          "UIKind": "Textbox",
          "UIConfig": [
            {
              "Key": "Label",
              "Value": "Example Field Name"
            },
            {
              "Key": "Visible",
              "Value": "true"
            },
            {
              "Key": "Enabled",
              "Value": "true"
            },
            {
              "Key": "Errors",
              "Value": ""
            }
          ]
        },
        "ConfiguredBehaviors": [
          {
            "BehaviorId": "Automatic Indexing",
            "BehaviorKey": "Behavior Key",
            "Sequence": "0",
            "LockedBehavior": false,
            "BehaviorConfig": [
              {
                "Key": "Example Behavior Key",
                "Value": "Example Behavior Value"
              }
            ]
          }
        ],
        "MetadataDescription": [
          {
            "MetadataKey": "Example Key",
            "MetadataValue": "Example Value"
          }
        ]
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeDisplayNameAsync(new SetContentTypeDisplayNameParameter
{
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DisplayName = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeDisplayName" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "DisplayName": "string"}'
$body = @'
{
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "DisplayName": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeDisplayName" `
  -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_RepositoryAPI/SetContentTypeDisplayName",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "DisplayName": "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_RepositoryAPI/SetContentTypeDisplayName", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "DisplayName": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldBehaviorConfiguration

POST/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorConfiguration

Modifies the behavior configuration of an existing behavior on a specified content type field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the behavior and configuration to be set for the behavior's type.

Schema: SetContentTypeFieldBehaviorConfigurationParameter. An object containing identifying information for the behavior and configuration to be set for that behavior type

Field Type Description
BehaviorId string (uuid) Unique nullable guid representing the behavior's id internal to the product; must be provided for the set method
BehaviorConfiguration object Key-value pairs representing configuration for the behavior's type
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

An object representation of the behavior after modification.

Envelope: DataResponseConfiguredBehaviorDTO. Data is ConfiguredBehaviorDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "BehaviorId": "Automatic Indexing",
    "BehaviorKey": "Behavior Key",
    "Sequence": "0",
    "LockedBehavior": false,
    "BehaviorConfig": [
      {
        "Key": "Example Behavior Key",
        "Value": "Example Behavior Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldBehaviorConfigurationAsync(new SetContentTypeFieldBehaviorConfigurationParameter
{
    BehaviorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    BehaviorConfiguration = new Dictionary<string, string>(),
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorConfiguration" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"BehaviorId": "00000000-0000-0000-0000-000000000000", "BehaviorConfiguration": {}, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "BehaviorId": "00000000-0000-0000-0000-000000000000",
  "BehaviorConfiguration": {},
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorConfiguration" `
  -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_RepositoryAPI/SetContentTypeFieldBehaviorConfiguration",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "BehaviorId": "00000000-0000-0000-0000-000000000000",
                    "BehaviorConfiguration": {},
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldBehaviorConfiguration", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "BehaviorId": "00000000-0000-0000-0000-000000000000",
    "BehaviorConfiguration": {},
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldBehaviorSequence

POST/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorSequence

Sets the sequence of existing behavior on a specified content type field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the behavior and a sequence value.

Schema: SetContentTypeFieldBehaviorSequenceParameter. An object containing identifying information for the behavior and a sequence value

Field Type Description
BehaviorId string (uuid) Unique nullable guid representing the behavior's id internal to the product; must be provided for the set method
Sequence integer Order in which the behavior should fire
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

An object representation of the behavior after modification.

Envelope: DataResponseConfiguredBehaviorDTO. Data is ConfiguredBehaviorDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "BehaviorId": "Automatic Indexing",
    "BehaviorKey": "Behavior Key",
    "Sequence": "0",
    "LockedBehavior": false,
    "BehaviorConfig": [
      {
        "Key": "Example Behavior Key",
        "Value": "Example Behavior Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldBehaviorSequenceAsync(new SetContentTypeFieldBehaviorSequenceParameter
{
    BehaviorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    Sequence = 0,
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorSequence" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"BehaviorId": "00000000-0000-0000-0000-000000000000", "Sequence": 0, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "BehaviorId": "00000000-0000-0000-0000-000000000000",
  "Sequence": 0,
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldBehaviorSequence" `
  -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_RepositoryAPI/SetContentTypeFieldBehaviorSequence",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "BehaviorId": "00000000-0000-0000-0000-000000000000",
                    "Sequence": 0,
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldBehaviorSequence", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "BehaviorId": "00000000-0000-0000-0000-000000000000",
    "Sequence": 0,
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldEnabled

POST/api/V1_RepositoryAPI/SetContentTypeFieldEnabled

Enables or disables a specified field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the field and whether it is enabled or not.

Schema: SetContentTypeFieldEnabledParameter. An object containing identifying information for the field and whether it is enabled or not

Field Type Description
Enabled boolean Determines whether the field is enabled or not
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly modified field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldEnabledAsync(new SetContentTypeFieldEnabledParameter
{
    Enabled = false,
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldEnabled" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Enabled": false, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Enabled": false,
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldEnabled" `
  -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_RepositoryAPI/SetContentTypeFieldEnabled",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Enabled": false,
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldEnabled", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Enabled": false,
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldLabel

POST/api/V1_RepositoryAPI/SetContentTypeFieldLabel

Sets the label of a specified field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the field and a new value for its label.

Schema: SetContentTypeFieldLabelParameter. An object containing identifying information for the field and a new value for its label

Field Type Description
Label string User-friendly display name of the field
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly modified field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldLabelAsync(new SetContentTypeFieldLabelParameter
{
    Label = "string",
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldLabel" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Label": "string", "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Label": "string",
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldLabel" `
  -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_RepositoryAPI/SetContentTypeFieldLabel",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Label": "string",
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldLabel", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Label": "string",
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldSequence

POST/api/V1_RepositoryAPI/SetContentTypeFieldSequence

Sets the sequence number of a specified field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the field and the sequence to which it should be assigned.

Schema: SetContentTypeFieldSequenceParameter. An object containing identifying information for the field and the sequence to which it should be assigned

Field Type Description
Sequence integer 0-based index of the field's display position relative to other fields on the content type
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly modified field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldSequenceAsync(new SetContentTypeFieldSequenceParameter
{
    Sequence = 0,
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldSequence" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Sequence": 0, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Sequence": 0,
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldSequence" `
  -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_RepositoryAPI/SetContentTypeFieldSequence",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Sequence": 0,
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldSequence", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Sequence": 0,
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldStyle

POST/api/V1_RepositoryAPI/SetContentTypeFieldStyle

Sets the style of a specified field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the field and the style to which it should be set.

Schema: SetContentTypeFieldStyleParameter. An object containing identifying information for the field and the style to which it should be set

Field Type Description
Style object String identifier dictating what kind of UI control should be associated with the field. Possible values: AppendSuggestDropDownList, Boolean, CheckBoxCollection, Currency, DateTime, DropDownList, MultiLineTextbox, NumericUpDown, RadioButtonCollection, Table, TermSet, Textbox, Unsupported
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly modified field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldStyleAsync(new SetContentTypeFieldStyleParameter
{
    Style = FieldStyle.Lookup,
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldStyle" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Style": null, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Style": null,
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldStyle" `
  -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_RepositoryAPI/SetContentTypeFieldStyle",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Style": null,
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldStyle", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Style": null,
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldStyleConfiguration

POST/api/V1_RepositoryAPI/SetContentTypeFieldStyleConfiguration

Sets the configuration of a field on a specified content type relative to the style already assigned to the field

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the content type, field, and field style, as well as configuration to be set for that field style.

Schema: SetContentTypeFieldStyleConfigurationParameter. An object containing identifying information for the content type, field, and field style, as well as configuration to be set for that field style

Field Type Description
StyleConfiguration object Key-value pairs representing configuration for the field's style
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the field after all configuration changes have been applied.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldStyleConfigurationAsync(new SetContentTypeFieldStyleConfigurationParameter
{
    StyleConfiguration = new Dictionary<string, string>(),
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldStyleConfiguration" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"StyleConfiguration": {}, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "StyleConfiguration": {},
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldStyleConfiguration" `
  -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_RepositoryAPI/SetContentTypeFieldStyleConfiguration",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "StyleConfiguration": {},
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldStyleConfiguration", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "StyleConfiguration": {},
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeFieldVisible

POST/api/V1_RepositoryAPI/SetContentTypeFieldVisible

Enables or disables a specified field's visibility

  • Token feature Access Repository
  • Content type application/json

Request

An object containing identifying information for the field and whether it is visible or not.

Schema: SetContentTypeFieldVisibleParameter. An object containing identifying information for the field and whether it is visible or not

Field Type Description
Visible boolean Determines whether the field is visible or not
InternalContentTypeId string (uuid)
FieldMetadataKey string

Response

Returns an object representation of the newly modified field.

Envelope: DataResponseContentTypeFieldDefinitionDTO. Data is ContentTypeFieldDefinitionDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "MetadataKey": "Example Field Name",
    "ConfiguredUI": {
      "Sequence": "0",
      "UIKind": "Textbox",
      "UIConfig": [
        {
          "Key": "Label",
          "Value": "Example Field Name"
        },
        {
          "Key": "Visible",
          "Value": "true"
        },
        {
          "Key": "Enabled",
          "Value": "true"
        },
        {
          "Key": "Errors",
          "Value": ""
        }
      ]
    },
    "ConfiguredBehaviors": [
      {
        "BehaviorId": "Automatic Indexing",
        "BehaviorKey": "Behavior Key",
        "Sequence": "0",
        "LockedBehavior": false,
        "BehaviorConfig": [
          {
            "Key": "Example Behavior Key",
            "Value": "Example Behavior Value"
          }
        ]
      }
    ],
    "MetadataDescription": [
      {
        "MetadataKey": "Example Key",
        "MetadataValue": "Example Value"
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeFieldVisibleAsync(new SetContentTypeFieldVisibleParameter
{
    Visible = false,
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    FieldMetadataKey = "string",
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldVisible" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"Visible": false, "InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "FieldMetadataKey": "string"}'
$body = @'
{
  "Visible": false,
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "FieldMetadataKey": "string"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeFieldVisible" `
  -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_RepositoryAPI/SetContentTypeFieldVisible",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "Visible": false,
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "FieldMetadataKey": "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_RepositoryAPI/SetContentTypeFieldVisible", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "Visible": false,
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "FieldMetadataKey": "string"
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

SetContentTypeVisible

POST/api/V1_RepositoryAPI/SetContentTypeVisible

Sets the visibility of a preexisting content type.

  • Token feature Access Repository
  • Content type application/json

Request

Identifying information for the content type as well as a visiblity value.

Schema: SetContentTypeVisibleParameter. Identifying information for the content type to modify and a visibility value

Field Type Description
InternalContentTypeId string (uuid) ID of the content type used to refer to it internally
Visible boolean Determines whether the content type is visible or not

Response

Returns the modified content type

Envelope: DataResponseContentTypeDTO. Data is ContentTypeDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "InternalId": "00000000-0000-0000-0000-000000000000",
    "ContentTypeId": "Example CT 1",
    "ContentTypeDisplayName": "Example CT 1",
    "FieldDefinitions": [
      {
        "MetadataKey": "Example Field Name",
        "ConfiguredUI": {
          "Sequence": "0",
          "UIKind": "Textbox",
          "UIConfig": [
            {
              "Key": "Label",
              "Value": "Example Field Name"
            },
            {
              "Key": "Visible",
              "Value": "true"
            },
            {
              "Key": "Enabled",
              "Value": "true"
            },
            {
              "Key": "Errors",
              "Value": ""
            }
          ]
        },
        "ConfiguredBehaviors": [
          {
            "BehaviorId": "Automatic Indexing",
            "BehaviorKey": "Behavior Key",
            "Sequence": "0",
            "LockedBehavior": false,
            "BehaviorConfig": [
              {
                "Key": "Example Behavior Key",
                "Value": "Example Behavior Value"
              }
            ]
          }
        ],
        "MetadataDescription": [
          {
            "MetadataKey": "Example Key",
            "MetadataValue": "Example Value"
          }
        ]
      }
    ]
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerSetContentTypeVisibleAsync(new SetContentTypeVisibleParameter
{
    InternalContentTypeId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    Visible = false,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeVisible" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"InternalContentTypeId": "00000000-0000-0000-0000-000000000000", "Visible": false}'
$body = @'
{
  "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
  "Visible": false
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/SetContentTypeVisible" `
  -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_RepositoryAPI/SetContentTypeVisible",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
                    "Visible": false
                  })
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_RepositoryAPI/SetContentTypeVisible", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "InternalContentTypeId": "00000000-0000-0000-0000-000000000000",
    "Visible": false
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);

UploadDocument

POST/api/V1_RepositoryAPI/UploadDocument

Uploads a file with metadata to be sent directly to a specified repository.

  • Token feature Access Repository
  • Content type multipart/form-data

Request

Form fields (multipart/form-data):

Field Type Required Description
File file No The contents of the file to be uploaded
Payload string No An JSON-stringified object used to transport values used during document upload. EXAMPLE: {"ContentTypeId":"0x0101000728167cd9c94899925ba69c4af6743e","InternalId":"1f8d8cd4-ca9b-4b90-801f-da318d13d361","FileName":"minimal.pdf","Metadata":{"Example Field Name":"Example field value"},"ParameterList":{"BooleanParameters":[],"IntegerParameters":[],"StringParameters":[{"Name":"ContentTypeId","Value":"0x0101004C1990C75D50A34F8A22BCE79162EE9300136919EA2BAF494ABE747F2B8A1214D3"}],"StringEncryptedParameters":[],"StringArrayParameters":[],"DateTimeParameters":[],"ByteArrayParameters":[],"DecimalParameters":[]}}

Response

Returns an indicator of successful upload and the name of the document's destination.

Envelope: DataResponseUploadResultDTO. Data is UploadResultDTO.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "Success": true,
    "UploadLocation": "(URL to the uploaded file)"
  }
}

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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerUploadDocumentAsync(File.OpenRead("document.pdf"), "string");
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response.Data);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/UploadDocument" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -F "file=@./document.pdf" -F "...other form fields..."

UpsertDocumentMetadata

POST/api/V1_RepositoryAPI/UpsertDocumentMetadata

Inserts or updates Item Metadata

  • Token feature Edit Documents
  • Content type application/json

Request

Schema: UpsertDocumentMetadataParameter. Identifying information for a document stored in a repository, as well as a new desired state for the document's metadata

Field Type Description
ConnectorId string (uuid) Id of the connector to use
DocumentId string Id of the document to update
Metadata array of MetadataItemField Metadata to set on the Document
CheckInDocument boolean Check in the document after upsert. Defaults to false

Response

The item has successfully been edited.

Envelope: KLApiResponse.

Example response
{
  "Success": true,
  "MessageKey": 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 V1RepositoryAPIApi(config);

var response = await api.V1RepositoryAPIControllerUpsertDocumentMetadataAsync(new UpsertDocumentMetadataParameter
{
    ConnectorId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    DocumentId = "string",
    Metadata = new List<MetadataItemField> { new MetadataItemField
        {
            Type = MetadataDataType.Bool,
            Name = "string",
            Value = "string",
        } },
    CheckInDocument = false,
});
if (response.Success != true) throw new Exception(response.MessageKey);
Console.WriteLine(response);
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/UpsertDocumentMetadata" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ConnectorId": "00000000-0000-0000-0000-000000000000", "DocumentId": "string", "Metadata": [{}], "CheckInDocument": false}'
$body = @'
{
  "ConnectorId": "00000000-0000-0000-0000-000000000000",
  "DocumentId": "string",
  "Metadata": [
    {}
  ],
  "CheckInDocument": false
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_RepositoryAPI/UpsertDocumentMetadata" `
  -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_RepositoryAPI/UpsertDocumentMetadata",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ConnectorId": "00000000-0000-0000-0000-000000000000",
                    "DocumentId": "string",
                    "Metadata": [
                      {}
                    ],
                    "CheckInDocument": false
                  })
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_RepositoryAPI/UpsertDocumentMetadata", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ConnectorId": "00000000-0000-0000-0000-000000000000",
    "DocumentId": "string",
    "Metadata": [
      {}
    ],
    "CheckInDocument": false
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);