Records and record types

A Record Type describes the structure (metadata) of a Record and is designed by the DevOps Plan Designer.

You can use the DevOps Plan 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 /repos/<teamspace_id>/databases/<database_name>.

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 /repos/<teamspace_id>/databases/<database_name>/records/<record_type>.

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://<plan-server-url>/swagger-ui.html#/RecordType/getRecordType.