1Add or Remove AI Space Entities

1Add or Remove AI Space Entities

Overview

This API adds or removes entities from the specified AI Space.

Method: PUT

Request URL: {kyvos-url}/rest/v2/ai-spaces/{name-or-id}/entities


Authorization

API Key: sessionid

This method authenticates requests using a session ID which acts like an API key.


BasicAuth: HTTP Authorization Scheme

This method authenticates requests using a username and password sent in the HTTP Authorization header.


Headers

Header Name

Type

Description

Possible Values

Header Name

Type

Description

Possible Values

Content-Type (Required)

String

Specifies the media type of the request body.

application/x-www-form-urlencoded

sessionid

String

The session ID is the token received from the login API.

Note: Session ID is required for token-based authentication.

–


Path Parameters

Parameter Name

Type

Description

Possible Values

Parameter Name

Type

Description

Possible Values

name-or-id (Required)

String

Represents the name or ID of the AI Space to be updated.

Note: If the AI Space name is provided, then either folderName or folderId must also be provided.

–


Query Parameters

Parameter Name

Type

Description

Possible Values

Parameter Name

Type

Description

Possible Values

by

String

Specifies whether the name-or-id parameter should be interpreted as an AI Space name or an AI Space ID.

If by=name, provide the AI Space name in the name-or-id parameter.

If by=id, provide the AI Space ID in the name-or-id parameter.

The default value is name.

–

folderName

String

Name of the folder containing the AI Space. If the AI Space is present in the root directory, specify [Root].

Note: If neither folderName nor folderId is provided, the AI Space is treated as a root-level entity by default.

–

folderId

String

ID of the folder containing the AI Space.

–


Request Body

Parameter Name

Type

Description

Possible Values

Parameter Name

Type

Description

Possible Values

spaceEntitiesJson (Required)

String

JSON string specifying the entities to be added to or removed from the AI Space. Each entry must include the entityType and operation. You may also provide either the entity ID or the entity name, along with folder details (folderId or folderName).

Note: An example JSON is provided under the Resources section.

–


Responses

200 Success

{ "res": { "code": 0, "entityId": "C8BE16F6-140F-E634-2B1F-4B6D5C56666E", "message": "Successfully updated space: NEW-SPACE 12 copy", "extMessage": "" } }

Status Code

Description

Status Code

Description

401

Authorization information is missing or invalid.

404

No matching record found.

412

Precondition failed. Required parameter missing.

500

Internal Server Error


Resources

Below is an example of JSON structure which can be used as a reference for the spaceEntitiesJson parameter in the request body.

Note

There are only two possible values for the operation field- ADD or REMOVE.

[ { "operation":"ADD", "entityId":"DD29BA22-4677-1144-2F0E-8096079BD51A", "type":"SMODEL" }, { "operation":"REMOVE", "entityName":"sales_data_PG_MOLAP", "type":"SMODEL", "folderName":"Joining_and_Blending" } ]

JSON Fields Defintion

Field

Type

Description

Possible Values

Example

(root)

Array

Array of entity operations to perform on the AI Space. Each object represents an add or remove operation for a Semantic Model

Array of operation objects

[{"operation": "ADD", ...}]

operation

String

Type of operation to perform on the entity within the AI Space

ADD,REMOVE

"ADD"

type

String

Type of entity being added or removed. Currently supports Semantic Models

SMODEL

"SMODEL"

entityId

String

Unique identifier of the entity to add or remove. Required when using ID-based identification (preferred for ADD operations)

Valid entity ID

"17544742302027127014066193861173"

entityName

String

Display name of the entity to add or remove. Used when identifying entity by name instead of ID (typically for REMOVE operations)

Valid entity name

"date_dim"

folderName

String

Name of the folder where the entity is located. Required when using entityName for identification to ensure uniqueness

Valid folder name

"automationtables"

folderId

String

Unique identifier of the folder where the entity is located. Alternative to folderName when using name-based identification

Valid folder ID

"folder_123456789"

Copyright Kyvos, Inc. 2026. All rights reserved.