Skip to content

Intuitive AI

V1_IntuitiveAIAPI7 actions

Intuitive AI classes, subclasses, training files and the default Auto Extraction action.

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
AddDocumentFile
CreateNewClass
GetAllKnownClassInformation
GetClass
GetDefaultRuleAutoExtractionAction
GetSubclass
SetDefaultRuleAutoExtractionAction

AddDocumentFile

POST/api/V1_IntuitiveAIAPI/AddDocumentFile
  • Token feature Manage Learn Fingerprints
  • Content type multipart/form-data

Request

Form fields (multipart/form-data):

Field Type Required Description
ClassId string No The Class Id to add the document to.
SubclassId string No Optional subclass Id to add the document to.
CorrectExtractedValues string No
OcrData string No
File file No The input file to add to the class.
FileName string No The name of the file to upload, including extension.
mimeType string No The MIME type of the file to upload.

Response

KnownDocument response.

Envelope: KLApiDataResponseKnownDocument2. Data is KnownDocument2.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "KnownClassId": "00000000-0000-0000-0000-000000000000",
    "KnownSubclassId": null,
    "Id": "00000000-0000-0000-0000-000000000000",
    "KnownPages": null,
    "CreatedDate": "0001-01-01T00:00:00.0000000+00:00",
    "Creator": null,
    "Name": null,
    "OriginalName": null,
    "CorrectExtractedValues": null,
    "IncorrectExtractedValues": 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 V1IntuitiveAIAPIApi(config);

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

CreateNewClass

POST/api/V1_IntuitiveAIAPI/CreateNewClass
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

Request object to create a new Learn Class.

Schema: NewClassRequest. Request object to create a new Learn Class

Field Type Description
Name string The name of the new class
Tags array of string The tags to apply to the class (null or empty is acceptable)
ContentTypeId string (uuid) The optional content type id to set when the new class is created. This will also create an automatic extraction action for the fields of the content type.
SkipConfiguringZeroShot boolean If true, do not configure a zero shot document classificaiton condition.

Response

Create new class response, containing the ID of the created class.

Returns object.

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

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

GetAllKnownClassInformation

POST/api/V1_IntuitiveAIAPI/GetAllKnownClassInformation
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

No body. Send {} or an empty body.

Response

Create new class response, containing the ID of the created class.

Envelope: KLApiDataResponseListIntuitiveAIClassInformation. Data is array of IntuitiveAIClassInformation.

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

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

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

GetClass

POST/api/V1_IntuitiveAIAPI/GetClass
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

Request object to get a Learn Class by Id.

Schema: GetClassRequest. Request object to get a Learn Class by Id

Field Type Description
ClassId string (uuid) The id of the class to get

Response

The returned IntuitiveAIClass.

Envelope: KLApiDataResponseIntuitiveAIClass. Data is IntuitiveAIClass.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "Template": null,
    "KnownDocuments": null,
    "Id": "00000000-0000-0000-0000-000000000000",
    "Name": null,
    "Locked": false,
    "LockedTime": null,
    "LockedBy": null,
    "Tags": null,
    "LastModified": "0001-01-01T00:00:00.0000000+00:00",
    "Modifier": null,
    "Creator": 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 V1IntuitiveAIAPIApi(config);

var response = await api.V1IntuitiveAIAPIControllerGetClassAsync(new GetClassRequest
{
    ClassId = 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_IntuitiveAIAPI/GetClass" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ClassId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "ClassId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_IntuitiveAIAPI/GetClass" `
  -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_IntuitiveAIAPI/GetClass",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ClassId": "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_IntuitiveAIAPI/GetClass", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ClassId": "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);

GetDefaultRuleAutoExtractionAction

POST/api/V1_IntuitiveAIAPI/GetDefaultRuleAutoExtractionAction
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

Request object to get an action off of the default rule of a Learn Class or Subclass by Id.

Schema: GetDefaultRuleActionRequest. Request object to get an action off of the default rule of a Learn Class or Subclass by Id

Field Type Description
ClassId string (uuid) The id of the class
SubclassId string (uuid) The optional id of the subclass

Response

The returned AutoExtractorInteractionAction.

Envelope: KLApiDataResponseAutoExtractorInteractionAction. Data is AutoExtractorInteractionAction.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "AutoExtractorSettings": {
      "FieldDefinitions": null,
      "ExtractorMode": "TextOnly"
    },
    "Id": "951a75ae-f3f8-4750-86d1-2592e9a43927",
    "Type": "AutoExtractorExtractionAction",
    "SerializedData": "{\"FieldDefinitions\":null,\"ExtractorMode\":0}"
  }
}

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

var response = await api.V1IntuitiveAIAPIControllerGetDefaultRuleAutoExtractionActionAsync(new GetDefaultRuleActionRequest
{
    ClassId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    SubclassId = 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_IntuitiveAIAPI/GetDefaultRuleAutoExtractionAction" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ClassId": "00000000-0000-0000-0000-000000000000", "SubclassId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "ClassId": "00000000-0000-0000-0000-000000000000",
  "SubclassId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_IntuitiveAIAPI/GetDefaultRuleAutoExtractionAction" `
  -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_IntuitiveAIAPI/GetDefaultRuleAutoExtractionAction",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ClassId": "00000000-0000-0000-0000-000000000000",
                    "SubclassId": "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_IntuitiveAIAPI/GetDefaultRuleAutoExtractionAction", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ClassId": "00000000-0000-0000-0000-000000000000",
    "SubclassId": "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);

GetSubclass

POST/api/V1_IntuitiveAIAPI/GetSubclass
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

Request object to get a Learn Subclass by Id.

Schema: GetSubclassRequest. Request object to get a Learn Subclass by Id

Field Type Description
SubclassId string (uuid) The id of the SubclassId to get

Response

The returned IntuitiveAISubclass.

Envelope: KLApiDataResponseIntuitiveAISubclass. Data is IntuitiveAISubclass.

Example response
{
  "Success": true,
  "MessageKey": null,
  "Data": {
    "Template": null,
    "Id": "00000000-0000-0000-0000-000000000000",
    "KnownClassId": "00000000-0000-0000-0000-000000000000",
    "Name": null,
    "LastModified": "0001-01-01T00:00:00.0000000+00:00",
    "Modifier": null,
    "Creator": null,
    "Locked": false,
    "LockedTime": null,
    "LockedBy": 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 V1IntuitiveAIAPIApi(config);

var response = await api.V1IntuitiveAIAPIControllerGetSubclassAsync(new GetSubclassRequest
{
    SubclassId = 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_IntuitiveAIAPI/GetSubclass" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"SubclassId": "00000000-0000-0000-0000-000000000000"}'
$body = @'
{
  "SubclassId": "00000000-0000-0000-0000-000000000000"
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_IntuitiveAIAPI/GetSubclass" `
  -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_IntuitiveAIAPI/GetSubclass",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "SubclassId": "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_IntuitiveAIAPI/GetSubclass", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "SubclassId": "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);

SetDefaultRuleAutoExtractionAction

POST/api/V1_IntuitiveAIAPI/SetDefaultRuleAutoExtractionAction
  • Token feature Manage Learn Fingerprints
  • Content type application/json

Request

Request object to set an action on the default rule of a Learn Class or Subclass by Id.

Schema: SetDefaultRuleAutoExtractionActionRequest. Request object to set an action on the default rule of a Learn Class or Subclass by Id

Field Type Description
ClassId string (uuid) The id of the class
SubclassId string (uuid) The optional id of the subclass
Config AutoExtractorInteractionData

Response

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

await api.V1IntuitiveAIAPIControllerSetDefaultRuleAutoExtractionActionAsync(new SetDefaultRuleAutoExtractionActionRequest
{
    ClassId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    SubclassId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    Config = new AutoExtractorInteractionData
    {
        ExtractorMode = AutoExtractorMode.TextOnly,
        FieldDefinitions = new List<FieldDefinition> { new FieldDefinition() },
    },
});
Console.WriteLine("Done.");
curl -sS -X POST "https://yourcompany.knowledgelake.io/api/V1_IntuitiveAIAPI/SetDefaultRuleAutoExtractionAction" \
  -H "TempIdentityToken: $KL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ClassId": "00000000-0000-0000-0000-000000000000", "SubclassId": "00000000-0000-0000-0000-000000000000", "Config": {"FieldDefinitions": [], "ExtractorMode": {}}}'
$body = @'
{
  "ClassId": "00000000-0000-0000-0000-000000000000",
  "SubclassId": "00000000-0000-0000-0000-000000000000",
  "Config": {
    "FieldDefinitions": [],
    "ExtractorMode": {}
  }
}
'@
$r = Invoke-RestMethod -Method Post -Uri "https://yourcompany.knowledgelake.io/api/V1_IntuitiveAIAPI/SetDefaultRuleAutoExtractionAction" `
  -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_IntuitiveAIAPI/SetDefaultRuleAutoExtractionAction",
                  headers={"TempIdentityToken": os.environ["KL_TOKEN"]},
                  json={
                    "ClassId": "00000000-0000-0000-0000-000000000000",
                    "SubclassId": "00000000-0000-0000-0000-000000000000",
                    "Config": {
                      "FieldDefinitions": [],
                      "ExtractorMode": {}
                    }
                  })
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_IntuitiveAIAPI/SetDefaultRuleAutoExtractionAction", {
  method: "POST",
  headers: { "TempIdentityToken": process.env.KL_TOKEN, "Content-Type": "application/json" },
  body: JSON.stringify({
    "ClassId": "00000000-0000-0000-0000-000000000000",
    "SubclassId": "00000000-0000-0000-0000-000000000000",
    "Config": {
      "FieldDefinitions": [],
      "ExtractorMode": {}
    }
  })
});
const data = await r.json();
if (!data.Success) throw new Error(data.MessageKey ?? JSON.stringify(data.Messages));
console.log(data.Data);