Classification System and Class

Creating Class with BSM values

Classes (Klasse) are created with the POST /transaction operation. Important unique data field for the Classes (Klasse) is klasseIdent. The sample below also adds sample BSM (business specific metadata) values to the class.

The BSM values associated with the Class are visible in the user interface when the class linked to folder (Saksmappe, Mappe, etc.)

  • transaction::save - new Class (Klasse) with BSM field qsid (Quality System ID) defined in BSM group qs1 (Quality System 1)
  • transaction::link - link the new Class (Klasse) to the existing Classification System (Klassifikasjonssystem).

As a result of the transaction new Class (Klasse) is created with ID = 3168047

      Request

POST https://v2-34-0.local.documaster.tech:8083/rms/api/public/noark5/v1/transaction HTTP/1.1
... 
Authorization: Bearer {{accessTokenIntegrator}}
Content-Type: application/json
X-Documaster-Error-Response-Type: application/json

{
    "actions": [
        {
            "action": "save",
            "type": "Klasse",
            "id": "klasse-temp-id-1",
            "fields": {
                "klasseIdent": "TST-IDENT-2106",
                "tittel": "Sample Class with BSM",
                "beskrivelse": "Test Class with BSM - QualitySystem ID",
                "virksomhetsspesifikkeMetadata": {
                    "qs1": {
                        "qsid": {
                            "values": [
                                "QS1-ID-820621"
                            ]
                        }
                    }
                }
            }
        },
        {
            "action": "link",
            "type": "Klasse",
            "id": "klasse-temp-id-1",
            "ref": "refKlassifikasjonssystem",
            "linkToId": "1444539"
        }
    ]
}

      Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "saved": {
        "klasse-temp-id-1": {
            "type": "Klasse",
            "id": "3168047",
            "version": "4",
            "fields": {
                "uuid": "ff3a1497-f18f-4111-a05a-a3383c0a1ae8",
                "opprettetDato": "2022-06-07T14:08:31.496+0200",
                "opprettetAv": "Integrator",
                "opprettetAvBrukerIdent": "d730e776-c10f-4986-99d7-5fab7bf4c3ee",
                "klasseIdent": "TST-IDENT-2106",
                "tittel": "Sample Class with BSM",
                "beskrivelse": "Test Class with BSM - QualitySystem ID",
                "virksomhetsspesifikkeMetadata": {
                    "qs1": {
                        "qsid": {
                            "type": "string",
                            "values": [
                                "SPDADM-ID-820621"
                            ]
                        }
                    }
                }
            },
            "links": {
                "refKlassifikasjonssystem": 1444539
            }
        }
    }
}