Apps API

The Apps API provides endpoints for managing Cogniscript applications and their execution processes.

Base URL: /apps and /namespaces/{namespaceName}/apps

Authentication: Bearer Token or API Key


Endpoints

MethodEndpointDescription
GET/appsList all apps in tenant
GET/namespaces/{namespaceName}/appsList apps in namespace
POST/namespaces/{namespaceName}/appsCreate a new app
GET/apps/by-id/{id}Get app by ID
GET/namespaces/{namespaceName}/apps/by-name/{name}Get app by name
PUT/apps/by-id/{id}/versions/{versionNumber}/startStart app version
PUT/namespaces/{namespaceName}/apps/by-name/{name}/versions/latest/startStart latest version
GET/apps/processes/by-id/{id}Get process by ID
PUT/apps/processes/by-id/{id}/inputsUpdate process inputs
GET/namespaces/{namespaceName}/apps/processesList running processes

List All Apps

Returns all apps across the tenant.

GET /apps

Roles: Tenant.Admin, Tenant.User

Response

Returns an array of App objects.

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "userCreatedById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "namespaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "dateCreated": "2026-01-05T10:30:00Z",
    "dateUpdated": "2026-01-05T10:30:00Z",
    "name": "my-app",
    "versions": []
  }
]

List Apps in Namespace

Returns all apps within a specific namespace.

GET /namespaces/{namespaceName}/apps

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
namespaceNamestringYesThe namespace identifier

Response

Returns an array of App objects.


Create App

Creates a new application in a namespace.

POST /namespaces/{namespaceName}/apps

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
namespaceNamestringYesThe namespace identifier

Request Body: AppCreateRequest

{
  "name": "my-new-app"
}

Response

Returns the created App object.

Example

Request:

curl -X POST "https://api.maitento.com/namespaces/production/apps" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "order-processor"}'

Response:

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "tenantId": "t1234567-89ab-cdef-0123-456789abcdef",
  "userCreatedById": "u1234567-89ab-cdef-0123-456789abcdef",
  "namespaceId": "n1234567-89ab-cdef-0123-456789abcdef",
  "dateCreated": "2026-01-05T14:30:00Z",
  "dateUpdated": "2026-01-05T14:30:00Z",
  "name": "order-processor",
  "versions": []
}

Errors

StatusErrorDescription
400Validation errorName exceeds 150 characters or is empty
400Duplicate nameApp with this name already exists in namespace
404Not foundNamespace does not exist

Get App by ID

Retrieves a specific app by its unique identifier.

GET /apps/by-id/{id}

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
idGuidYesThe app’s unique identifier

Response

Returns an App object.

Errors

StatusErrorDescription
404Not foundApp with specified ID does not exist

Get App by Name

Retrieves a specific app by namespace and name.

GET /namespaces/{namespaceName}/apps/by-name/{name}

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
namespaceNamestringYesThe namespace identifier
namestringYesThe app name

Response

Returns an App object.


Start App Version

Starts a specific version of an app, creating a new process.

PUT /apps/by-id/{id}/versions/{versionNumber}/start

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
idGuidYesThe app’s unique identifier
versionNumberintYesThe version number to start (minimum: 1)

Request Body: AppStartRequest

{
  "inputs": [
    {
      "name": "apiKey",
      "value": "sk-abc123"
    },
    {
      "name": "maxItems",
      "value": "100"
    }
  ]
}

Response

Returns an AppProcess object.

Example

Request:

curl -X PUT "https://api.maitento.com/apps/by-id/a1b2c3d4.../versions/1/start" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": [
      {"name": "customerId", "value": "cust-12345"},
      {"name": "debug", "value": "false"}
    ]
  }'

Response:

{
  "id": "p1234567-89ab-cdef-0123-456789abcdef",
  "tenantId": "t1234567-89ab-cdef-0123-456789abcdef",
  "userCreatedById": "u1234567-89ab-cdef-0123-456789abcdef",
  "dateCreated": "2026-01-05T14:35:00Z",
  "dateUpdated": "2026-01-05T14:35:00Z",
  "app": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "version": 1
  },
  "dateStarted": null,
  "dateEnded": null,
  "executionTime": "00:00:00",
  "inputs": [
    {"name": "customerId", "value": "cust-12345"},
    {"name": "debug", "value": "false"}
  ],
  "outputs": [],
  "consoleOutputs": [],
  "failureDetails": null,
  "status": "New",
  "pauseType": "None",
  "pauseAssociatedId": null,
  "returnValue": null
}

Errors

StatusErrorDescription
400Missing inputsRequired input parameters not provided
400Invalid inputInput name doesn’t match app definition
400Version disabledThe specified version is disabled
404Not foundApp or version does not exist

Start App Latest Version

Starts the latest active version of an app by name.

PUT /namespaces/{namespaceName}/apps/by-name/{name}/versions/latest/start

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
namespaceNamestringYesThe namespace identifier
namestringYesThe app name

Request Body

Same as AppStartRequest.

Response

Returns an AppProcess object.


Get Process

Retrieves details of a specific app process.

GET /apps/processes/by-id/{id}

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
idGuidYesThe process unique identifier

Response

Returns an AppProcess object.


Update Process Inputs

Updates input values for a running or paused process.

PUT /apps/processes/by-id/{id}/inputs

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
idGuidYesThe process unique identifier

Request Body

Same as AppStartRequest.

Response

Returns the updated AppProcess object.

Errors

StatusErrorDescription
400Process completedCannot update inputs for finished/errored/killed process
400Invalid inputInput name doesn’t match app definition
404Not foundProcess does not exist

List Running Processes

Returns all active processes in a namespace.

GET /namespaces/{namespaceName}/apps/processes

Roles: Tenant.Admin, Tenant.User

Path Parameters

ParameterTypeRequiredDescription
namespaceNamestringYesThe namespace identifier

Response

Returns an array of AppProcessWithDetails objects.

[
  {
    "id": "p1234567-89ab-cdef-0123-456789abcdef",
    "namespaceName": "production",
    "appName": "order-processor",
    "status": "Running",
    "dateStarted": "2026-01-05T14:35:00Z"
  }
]

Data Types

AppCreateRequest

Request body for creating a new app.

FieldTypeRequiredValidation
namestringYesMax 150 chars, non-empty

Example:

{
  "name": "order-processor"
}

AppStartRequest

Request body for starting an app or updating process inputs.

FieldTypeRequiredDescription
inputsNameValuePair[]YesInput parameters

Example:

{
  "inputs": [
    {"name": "customerId", "value": "cust-123"},
    {"name": "maxItems", "value": "50"}
  ]
}

App

Represents a Cogniscript application.

FieldTypeDescription
idGuidUnique identifier
tenantIdGuidOwning tenant ID
userCreatedByIdGuidCreator’s user ID
namespaceIdGuidContaining namespace ID
dateCreatedDateTimeCreation timestamp (UTC)
dateUpdatedDateTimeLast update timestamp (UTC)
namestringApplication name
versionsAppVersion[]Deployed versions

Example:

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "tenantId": "t1234567-89ab-cdef-0123-456789abcdef",
  "userCreatedById": "u1234567-89ab-cdef-0123-456789abcdef",
  "namespaceId": "n1234567-89ab-cdef-0123-456789abcdef",
  "dateCreated": "2026-01-05T14:30:00Z",
  "dateUpdated": "2026-01-05T14:30:00Z",
  "name": "order-processor",
  "versions": [
    {
      "version": 1,
      "date": "2026-01-05T14:30:00Z",
      "isDisabled": false,
      "inputs": [],
      "executionTimeLimit": "00:05:00"
    }
  ]
}

AppVersion

A specific version of an application.

FieldTypeDescription
versionintVersion number (starts at 1)
dateDateTimeVersion creation timestamp
isDisabledboolWhether version is disabled
inputsAppInput[]Defined input parameters
externalOperationsMcpobject[]MCP connector bindings
externalOperationsOpenApiobject[]OpenAPI connector bindings
fileChecksumstringHash of compiled app file
executionTimeLimitTimeSpan?Max execution time

Example:

{
  "version": 1,
  "date": "2026-01-05T14:30:00Z",
  "isDisabled": false,
  "inputs": [
    {"name": "customerId", "dataType": "String"},
    {"name": "maxItems", "dataType": "Integer"}
  ],
  "externalOperationsMcp": [],
  "externalOperationsOpenApi": [],
  "fileChecksum": "d7a8fbb307d7809469ca9...",
  "executionTimeLimit": "00:05:00"
}

AppInput

Defines an input parameter for an app version.

FieldTypeDescription
namestringInput parameter name
dataTypeAppDataTypeData type of the input

Example:

{
  "name": "customerId",
  "dataType": "String"
}

AppProcess

Represents a running or completed app execution.

FieldTypeDescription
idGuidUnique process identifier
tenantIdGuidOwning tenant ID
userCreatedByIdGuidUser who started the process
dateCreatedDateTimeProcess creation timestamp
dateUpdatedDateTimeLast update timestamp
appVersionReferenceReference to app and version
dateStartedDateTime?When execution began
datePausedDateTime?When process was paused
dateEndedDateTime?When execution completed
executionTimeTimeSpanTotal execution duration
inputsNameValuePair[]Input parameter values
outputsAppOutput[]Output values produced
consoleOutputsAppConsoleOutput[]Console log entries
failureDetailsstring?Error message if failed
statusAppProcessStatusCurrent process status
pauseTypeAppProcessPauseTypeType of pause (if paused)
pauseAssociatedIdGuid?Related entity ID when paused
returnValuestring?Final return value
hostnamestring?Execution node hostname

Example:

{
  "id": "p1234567-89ab-cdef-0123-456789abcdef",
  "tenantId": "t1234567-89ab-cdef-0123-456789abcdef",
  "userCreatedById": "u1234567-89ab-cdef-0123-456789abcdef",
  "dateCreated": "2026-01-05T14:35:00Z",
  "dateUpdated": "2026-01-05T14:36:00Z",
  "app": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "version": 1
  },
  "dateStarted": "2026-01-05T14:35:01Z",
  "datePaused": null,
  "dateEnded": "2026-01-05T14:36:00Z",
  "executionTime": "00:00:59",
  "inputs": [
    {"name": "customerId", "value": "cust-123"}
  ],
  "outputs": [
    {
      "name": "result",
      "type": "JsonObject",
      "value": "{\"processed\": true}",
      "date": "2026-01-05T14:36:00Z"
    }
  ],
  "consoleOutputs": [
    {
      "text": "Processing customer cust-123",
      "type": "Normal",
      "date": "2026-01-05T14:35:02Z"
    }
  ],
  "failureDetails": null,
  "status": "Finished",
  "pauseType": "None",
  "pauseAssociatedId": null,
  "returnValue": "success",
  "hostname": "runner-01"
}

AppProcessWithDetails

Extends AppProcess with namespace and app names.

FieldTypeDescription
(all AppProcess fields)
namespaceNamestringNamespace identifier
appNamestringApplication name

Example:

{
  "id": "p1234567-89ab-cdef-0123-456789abcdef",
  "namespaceName": "production",
  "appName": "order-processor",
  "status": "Running",
  "dateStarted": "2026-01-05T14:35:01Z"
}

AppOutput

An output value produced by an app process.

FieldTypeDescription
namestringOutput parameter name
typeAppDataTypeData type of the output
valuestring?Output value
dateDateTimeWhen output was recorded

Example:

{
  "name": "orderCount",
  "type": "Integer",
  "value": "42",
  "date": "2026-01-05T14:36:00Z"
}

AppConsoleOutput

A console log entry from an app process.

FieldTypeDescription
textstringConsole output text
typeAppConsoleOutputTypeOutput type
dateDateTimeTimestamp

Example:

{
  "text": "Processing order #12345",
  "type": "Normal",
  "date": "2026-01-05T14:35:30Z"
}

VersionReference

Reference to a specific app version.

FieldTypeRequiredDescription
idGuidYesApp ID
versionintYesVersion number (min: 1)

Example:

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "version": 1
}

NameValuePair

A key-value pair for inputs and other parameters.

FieldTypeRequiredDescription
namestringYesParameter name (min 1 char)
valuestringYesParameter value

Example:

{
  "name": "customerId",
  "value": "cust-12345"
}

Enumerations

AppDataType

ValueDescription
StringText value
IntegerWhole number
DecimalDecimal number
GuidUnique identifier
BoolBoolean (true/false)
DateDate/time value
JsonObjectJSON object
JsonArrayJSON array

AppProcessStatus

ValueDescription
NewProcess created, not yet started
RunningCurrently executing
HumanInteractionRequiredWaiting for user input
WaitingToResumeQueued to resume
PausedExecution suspended
FinishedCompleted successfully
ErrorFailed with error
KilledTerminated/cancelled

AppProcessPauseType

ValueDescription
NoneNot paused
AppPaused by app logic
InteractionPaused for human interaction
CodeGenerationPaused for code generation

AppConsoleOutputType

ValueDescription
NormalStandard output
TraceDebug/trace output