Records and record types

A Record Type describes the structure (meta4tdata) of a Record and is designed by the HCL Compass Designer.

Note: Use of the REST API server is not supported in an on premises environment, such as on Windows and Linux. To use the HCL Compass REST API server in a supported environment, deploy the HCL Compass REST API server to a Kubernetes environment. For more information, see Getting Started with HCL Compass on HCL SoFy.
You can use the HCL Compass REST API to interact with records with the following endpoints:
POST/repos/{repo}/databases/{database}/{recordType}
Valid parameters include: repo, databse, recordType, record.
Valid response is 201.
GET/repos/{repo}/databases/{database}/{recordType}/{recordId}
DELETE/repos/{repo}/databases/{database}/{recordType}/{recordId}
Valid parameters include: repo, database, recordType, recordId, actionName.
Valid response is 204.
PATCH/repos/{repo}/databases/{database}/{recordType}/{recordId}

After you know the schema repositories and the databases within them, you can work with Record Types and Records within a specific database.

To see a list of Record Types within a database, use: GET https://localhost:8190/ccmweb/rest/repos/CCMRepo/databases/SAMPL.

Sample Response:
{
  "name": "Sample Database",
  "description": "This is a sample database.",
  "isMaster": false,
  "entityDefNames": [
    "Defect",
    "Customer"
  ],
  "entityDefNamesForSubmit": [
    "Defect"
  ],
  "entityDefFamilyNames": [
    "SampleFamily"
  ]
}
Note: The entityDefNames property lists the available Record Types in that database, with Defect and Customer in the response.

To see details of an individual Record Type, use: GET https://localhost:8190/ccmweb/rest/repos/CCMRepo/databases/SAMPL/records/Defect.

Sample Response:
{
  "name": "Defect",
  "dbId": "16777224",
  "type": "_REQ_ENTITY",
  "isFamily": false,
  "fieldDefs": [
{
      "name": "id",
      "type": "ID",
      "helpText": "",
      "requiredness": "READONLY",
      "canBeSecurityContext": false,
      "isSecurityContext": false,
      "isSystemOwnedFieldDefName": true
    },
    {
      "name": "State",
      "type": "STATE",
      "helpText": "",
      "requiredness": "READONLY",
      "canBeSecurityContext": false,
      "isSecurityContext": false,
      "isSystemOwnedFieldDefName": true
    }, 
…
Note: In this example, the fieldDefs property lists the possible fields for Defect Record Type, such as ID, state, etc, and their properties.

For more information on record types, see https://localhost:8190/swagger-ui.html#/RecordType/getRecordType.