Pikbase Docs
Open console (opens the console)
Esc

Type to search.

Build

getEntityDef() — Schema Manager

Read one data table by id or name.

Contract source@gsb-core/mcp-docs:getDefDocs("getEntityDef")

Retrieves an entity definition by its ID.

Request Format

getEntityDef(
    entityDefId: string,     // ID of the entity definition to retrieve
    token: string,           // Authentication token
    tenantCode?: string      // Optional tenant code
): Promise<{
    success: boolean,
    data?: {
        entityDef: GsbEntityDef     // Entity definition object
    },
    error?: string
}>

Response Format

{
    "success": boolean,
    "data": {
        "entityDef": {
            "id": "string",
            "name": "string",
            "title": "string",
            "description": "string",
            "dbTableName": "string",
            "publicAccess": boolean,
            "activityLogLevel": number,
            "properties": [
                // Array of GsbProperty objects
            ],
            "isActive": boolean,
            "isDeleted": boolean,
            "createDate": "string",
            "lastUpdateDate": "string",
            "createdBy_id": "string",
            "lastUpdatedBy_id": "string",
            "permissions": [
                // Array of permission objects
            ],
            "workflowTriggers": [
                // Array of workflow trigger objects
            ]
        }
    },
    "error": "string"      // Present only if success is false
}

Example

const result = await getEntityDef("entity-id", "your-auth-token");
const entityDef = result.data.entityDef;

Using Entity Definition Data

The retrieved entity definition contains complete schema information that can be used for:

  1. Metadata Exploration: Understanding the structure of the entity
  2. Dynamic UI Generation: Building forms or tables based on properties
  3. Schema Modification: Making changes to the entity definition
  4. Relationship Analysis: Examining references between entities