Fonds

Fonds

Fonds (Arkiv) is the root of the archival structure and as such is required to be present for each integration to Documaster to operate.

  • Entity name in the API : Arkiv.
  • Being a core Noark5 model entity, Fonds (Arkiv) is created/modified using the Transaction :: POST /transaction operation.
  • Fonds (Arkiv) cannot be created without a transaction::link action to a Fonds Creator (Arkivskaper) entity in the same transaction.

entities-fields

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

Arkiv Specific Data Fields

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
avsluttetDato timestamp M602 date and time when the archive unit was finalized (finalizedDate)
avsluttetAv string M603 name of the user who finalized the archive unit (finalizedBy)
avsluttetAvBrukerIdent string M603 unique identifier of the user who finalized the archive unit (finalizedByIdent)
tittel string M020 title of the archive (title)
beskrivelse string M021 description of the archive (description)
arkivstatus string M050 status of the fonds (fondsStatus)
Code List : arkivstatus
Default : O - Opprettet
dokumentmedium string M300 indication of whether the archive unit contains physical documents, electronic documents or a mixture of physical and electronic documents
Code List : dokumentmedium
Default : E - Elektronisk arkiv

Reference Fields

Field Name Referenced Entity Type Cardinality Link Required on Create Reference Always Available Modifiable Description
refArkivskaper Arkivskaper 1 . . * reference to Fonds Creator (Arkivskaper), at least one Fonds Creator (Arkivskaper) should be linked to the Fonds (Arkiv) during creation.
refArkivdel Arkivdel 0 . . * reference to one or more Series (Arkivdel), series can be linked or unlinked through this reference

Fonds Creator

Fonds Creator (Arkivskaper) is an entity representing the identity of the creator of the fonds.

  • Entity name in the API : Arkivskaper.
  • Being a core Noark5 model entity, Fonds Creator (Arkivskaper) is created/modified using the Transaction :: POST /transaction operation.
  • Fonds (Arkiv) can have multiple Fonds Creators (Arkivskaper), but they are owned by the Fonds (Arkiv) entity and cannot be linked to other Fonds.

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

Arkivskaper Specific Data Fields

Field Name Type Noark Metadata No. Required on Create Value Always Available Modifiable Description
arkivskaperIdent string M006 unique ID for the fonds creator (fondsCreatorID)
arkivskaperNavn string M023 name of the fonds creator (fondsCreatorName)
beskrivelse string M021 description of the fonds creator (description)

Reference Fields

Field Name Referenced Entity Type Cardinality Link Required on Create Reference Always Available Modifiable Description
refArkiv Arkiv 1 reference to Fonds (Arkiv), a Fonds Creator is owned by a single Fonds

Working with Fonds and Fonds Creator

Creating Fonds

Fonds (Arkiv) is created with the POST /transaction operation. In the same transaction at least one Fonds Creator (Arkivskaper) entity should be created and associated to the Fonds (Arkiv).

  • transaction::save - new Fonds (Arkiv)
  • transaction::save - new Fonds Creator (Arkivskaper)
  • transaction::link - link new Fonds Creator (Arkivskaper) to new Fonds (Arkiv) with id 688

As a result of the transaction new Fonds (Arkiv) and Fonds Creator (Arkivskaper) are created with ids respectively 11888 and 11889.

      Request

POST https://<documaster-instance>.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": "Arkiv",
            "id": "arkiv-temp-id-1",
            "fields": {
                "tittel": "Integration Fonds",
                "beskrivelse": "API Create Fonds"
            }
        },
        {
            "action": "save",
            "type": "Arkivskaper",
            "id": "arkivskaper-temp-id-1",
            "fields": {
                "arkivskaperIdent": "EXI",
                "arkivskaperNavn": "External Integrator"
            }
        },
        {
            "action": "link",
            "type": "Arkiv",
            "id": "arkiv-temp-id-1",
            "ref": "refArkivskaper",
            "linkToId": "arkivskaper-temp-id-1"
        }
    ]
}

      Response

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

{
    "saved": {
        "arkiv-temp-id-1": {
            "type": "Arkiv",
            "id": "11888",
            "version": "4",
            "fields": {
                "uuid": "6fd14491-31ef-4e6a-b774-6bdc74187ded",
                "opprettetDato": "2022-05-30T15:04:40.083+0200",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "tittel": "Integration Fonds",
                "beskrivelse": "API Create Fonds",
                "arkivstatus": "O",
                "dokumentmedium": "E"
            },
            "links": {}
        },
        "arkivskaper-temp-id-1": {
            "type": "Arkivskaper",
            "id": "11889",
            "version": "2",
            "fields": {
                "uuid": "9a5f4140-c008-4c00-90e0-1656813d76bc",
                "opprettetDato": "2022-05-30T15:04:40.086+0200",
                "opprettetAv": "External Integrator ACME",
                "opprettetAvBrukerIdent": "e6e6318e-fdcb-41cb-ae3a-1940f98ea153",
                "arkivskaperIdent": "EXI",
                "arkivskaperNavn": "External Integrator"
            },
            "links": {
                "refArkiv": 11888
            }
        }
    }
}