Common Entities

Common entities are shared entities which provide additional context to the core entities. The set of entities detailed here are :

  • External ID (EksternId)
  • Keywords (Noekkelord)
  • Notes (Merknad)

External ID

ExternalID (EksternId) is a common entity which allows associating business system specific identifiers to Documaster archived entities. This way the business systems can retrieve different entities from the archive using their own identifiers, rather than keeping Documaster archive specific IDs. Multiple ExternalIDs (EksternId) can be associated to a single archive entitity if needed.

Using ExternalID (EksternId) is considered good practice when integrating with the archvie.

  • ExternalID (EksternId) are managed using the POST /transaction operation and are owned by the entity to which they are linked.
  • ExternalID (EksternId) can be associated to all types of folders, records and documents and document versions. It is done through the entity object refEksternId reference field.

During queries, both the external system name and the external system entity unique identifiers should be used to retrieve the entities.


Diagram showing the relation of ExternalID entity (EksternId) to any other entities through its reference fields. The diagram depicts the most important set of fields, leaving some of the use cases out of it for simplicity. child-parent-relation

Data Fields

Common Data Fields

Following the Noark5 specification requirements and the internal implementation details the following set of data fields are present for all entities :

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
id string unique entity identifier in the specific Documaster installation, used for referencing the entity in the API. The id for created entities is a numeric value.
Default : new value generated on creation
Sortable
version string contains the verions of the entity, used for optimistic locking
Default : sequence version number of the entity
uuid string M001 globally unique identification of the entity, an UUID value (sysemId)
Default : new value generated on creation
Indexed, Sortable
opprettetDato timestamp M600 date and time at which the entity was created (createdDate)
Default : current date time
Indexed, Sortable
opprettetAv string M601 name of the user that created the entity (createdBy)
Default : logged in user name
Sortable
opprettetAvBrukerIdent string M601 identifier of the user that created the entity (createdByIdent)
Default : logged in user identifier
Sortable

EksternId Specific Data Fields

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
eksterntSystem string external system name
Indexed, Sortable
eksternID string unique identifier of the entity in the external system
Indexed, Sortable

Reference Fields

Only one of the reference fields below can be set for a single ExternalID (EksternId).

Field Name Referenced Entity Type Cardinality Link Required on Create Modifiable Description
refMappe AbstraktMappe 0 . . 1 reference to a folder (any type of folder) for which the ExternalID (EksternId) is attached
refRegistrering AbstraktRegistrering 0 . . 1 reference to a record (any type of record) for which the ExternalID (EksternId) is attached
refDokument Dokument 0 . . 1 reference to a Document (Dokument) for which the ExternalID (EksternId) is attached
refDokumentversjon Dokumentversjon 0 . . 1 reference to a DocumentVersion (Dokumentversjon) for which the ExternalID (EksternId) is attached

Keywords

Keywords (Noekkelord) is a common entity which allows associating keywords to different entities in the archive.

  • Keywords (Noekkelord) are managed using the POST /transaction operation and are owned by the entity to which they are linked.
  • Keywords (Noekkelord) can be associated to all types of folders and records. It is done through the entity object refNoekkelord reference field.

Data Fields

Common Data Fields

Following the Noark5 specification requirements and the internal implementation details the following set of data fields are present for all entities :

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
id string unique entity identifier in the specific Documaster installation, used for referencing the entity in the API. The id for created entities is a numeric value.
Default : new value generated on creation
Sortable
version string contains the verions of the entity, used for optimistic locking
Default : sequence version number of the entity
uuid string M001 globally unique identification of the entity, an UUID value (sysemId)
Default : new value generated on creation
Indexed, Sortable
opprettetDato timestamp M600 date and time at which the entity was created (createdDate)
Default : current date time
Indexed, Sortable
opprettetAv string M601 name of the user that created the entity (createdBy)
Default : logged in user name
Sortable
opprettetAvBrukerIdent string M601 identifier of the user that created the entity (createdByIdent)
Default : logged in user identifier
Sortable

Noekkelord Specific Data Fields

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
verdi string M022 keyword to be associated with the entity
Sortable

Reference Fields

Only one of the reference fields below can be set for a single Keywords (Noekkelord).

Field Name Referenced Entity Type Cardinality Link Required on Create Modifiable Description
refMappe AbstraktMappe 0 . . 1 reference to a folder (any type of folder) for which the Keywords (Noekkelord) is attached
refRegistrering AbstraktRegistrering 0 . . 1 reference to a record (any type of record) for which the Keywords (Noekkelord) is attached

Notes

Notes (Merknad) is a common entity which allows associating free text notes to different archive entities.

  • Notes (Merknad) are managed using the POST /transaction operation and are owned by the entity to which they are linked.
  • Notes (Merknad) can be associated to all types of folders, records and Document (Dokument) entities. It is done through the entity object refMerknad reference field.

Data Fields

Common Data Fields

Following the Noark5 specification requirements and the internal implementation details the following set of data fields are present for all entities :

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
id string unique entity identifier in the specific Documaster installation, used for referencing the entity in the API. The id for created entities is a numeric value.
Default : new value generated on creation
Sortable
version string contains the verions of the entity, used for optimistic locking
Default : sequence version number of the entity
uuid string M001 globally unique identification of the entity, an UUID value (sysemId)
Default : new value generated on creation
Indexed, Sortable
opprettetDato timestamp M600 date and time at which the entity was created (createdDate)
Default : current date time
Indexed, Sortable
opprettetAv string M601 name of the user that created the entity (createdBy)
Default : logged in user name
Sortable
opprettetAvBrukerIdent string M601 identifier of the user that created the entity (createdByIdent)
Default : logged in user identifier
Sortable

Merknad Specific Data Fields

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
tekst string M310 note text (noteText)
Sortable
merknadstype string M084 note type (noteType)
Code List : merknadstype

Reference Fields

Only one of the reference fields below can be set for a single Notes (Merknad).

Field Name Referenced Entity Type Cardinality Link Required on Create Modifiable Description
refMappe AbstraktMappe 0 . . 1 reference to a folder (any type of folder) for which the Notes (Merknad) is attached
refRegistrering AbstraktRegistrering 0 . . 1 reference to a record (any type of record) for which the Notes (Merknad) is attached
refDokument Dokument 0 . . 1 reference to a Document (Dokument) for which the Notes (Merknad) is attached

Working with Common Entities

Creating an ExternalID (EksternId) linked to a CaseFile (Saksmappe)

ExternalID (EksterId) are created with the POST /transaction operation. They have two important fields which should be set - eksterntSystem and eksternID. In the same transaction creating the ExternalID (EksternId) it should be associated to another entitity in the archive structure.

  • transaction::save - new ExternalID (EksterId) for Integrating System and integrating system ID = ISID:0000004573
  • transaction::link - link the new ExternalID (EksterId) to the existing CaseFile (Saksmappe).

As a result of the transaction new ExternalID (EksternId) is created with ID = 3827083

      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": "EksternId",
            "id": "eksternId-temp-id-1",
            "fields": {
                "eksterntSystem": "Integrating System",
                "eksternID": "ISID:0000004573"
            }
        },
        {
            "action": "link",
            "type": "EksternId",
            "id": "eksternId-temp-id-1",
            "ref": "refMappe",
            "linkToId": "633"
        }
    ]
}

      Response

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

{
  "saved": {
    "eksternId-temp-id-1": {
      "type": "EksternId",
      "id": "3827083",
      "version": "2",
      "fields": {
        "uuid": "8a8810a8-4b56-475e-877b-259f53d06768",
        "opprettetDato": "2022-11-08T08:12:13.785+0100",
        "opprettetAv": "Integrator",
        "opprettetAvBrukerIdent": "d730e776-c10f-4986-99d7-5fab7bf4c3ee",
        "eksterntSystem": "Integrating System",
        "eksternID": "ISID:0000004573"
      },
      "links": {
        "refMappe": 633
      }
    }
  }
}