api

App metadata

The application metadata document is holds technical information about the app and the data type requirements.

On this page:

Application

The Application model is the main model for metadata for the application.

Name Description
id A gobally unique id for the application. The value has two parts separated by a ‘/’ character. The first part is the short name of the application owner and the second part is the name of the app.
versionId The current version of the application. (Currently not in use.)
org The short name of the application owner.
title A collection of the application title in different languages.
validFrom The date and time from when the application can be used to create instances.
validTo The data and time for when the application will expire and can no longer be used to create new instances.
processId The id of the process model being used by the application. (Currently not in use.)
dataTypes A list of all the data types associated with the application. See DataType.
partyTypesAllowed A collection of flags that controls what type of instance owners new instances can be created for. See PartyTypesAllowed
autoDeleteOnProcessEnd A value indicating whether an instance will be automatically deleted once the process ends. This can be used by highly sensitiv applications to force an instance delete instead of sending the instance to the archive.

DataType

Data type represents the requirements for data elements. Data types representing a form will have model validation in addition to the requirements defined here.

Name Description
id The id of the data type. Unique for the app.
description A collection of data type descriptions in different languages.
allowedContentTypes A list of Content-Types allowed by the data type.
allowedContributers A list of allowed contributors. This can be used to restrict who it is that can work with the data type.
appLogic A complex object with information on how a data type is connected to a model. See ApplicationLogic.
taskId A reference to a task from the application process. The value indicate that the data type requirements must be fulfilled before the process can move on from the given step in the process.
maxSize The maximum allowed size of the data element.
maxCount The maximum number of data elements of this type.
minCount The minimum required number of elements of this type.
grouping The name of a group. This can be used to logically associate a data type to a group. E.g Photos or a text resource key.

ApplicationLogic

ApplicationLogic holds information about how a data type representing a form is connected to a model.

Name Description
autoCreate A value indicating whether a data element will be automatically created once an instance moves into the process step indicated by taskId.
classRef The name of the C# class used to represent the form as a model in application logic.
schemaRef A reference to the original schema used to define the model.

PartyTypesAllowed

PartyTypesAllowed contains a set of values indicating the type of owners an instance can have.

Name Description
bankruptcyEstate A value indicating that the instance owner can be a bancruptcy estate.
organisation A value indicating that the instance owner can be any organisation.
person A value indicating that the instance owner can be a person.
subUnit A value indicating that the instance owner can be a sub unit.

Complete example

This is a complete app metadata document with data types.

{
    "id": "ttd/bli-applikasjonseier",
    "versionId": null,
    "org": "ttd",
    "title": {
        "nb": "Bli applikasjonseier"
    },
    "validFrom": null,
    "validTo": null,
    "processId": null,
    "dataTypes": [
        {
            "id": "Kursdomene_BliTjenesteeier_M_2020-05-25_5703_34553_SERES",
            "description": null,
            "allowedContentTypes": [
                "application/xml"
            ],
            "allowedContributers": null,
            "appLogic": {
                "autoCreate": true,
                "classRef": "Altinn.App.Models.BliTjenesteeier_M",
                "schemaRef": null
            },
            "taskId": "Task_1",
            "maxSize": null,
            "maxCount": 1,
            "minCount": 1,
            "grouping": null
        },
        {
            "id": "ref-data-as-pdf",
            "description": null,
            "allowedContentTypes": [
                "application/pdf"
            ],
            "allowedContributers": null,
            "appLogic": null,
            "taskId": null,
            "maxSize": null,
            "maxCount": 0,
            "minCount": 0,
            "grouping": null
        }
    ],
    "partyTypesAllowed": {
        "bankruptcyEstate": true,
        "organisation": true,
        "person": true,
        "subUnit": true
    },
    "autoDeleteOnProcessEnd": false,
    "created": "2020-07-17T08:26:21.5707559Z",
    "createdBy": "sandgrainone",
    "lastChanged": "2020-07-17T08:26:21.5708691Z",
    "lastChangedBy": "sandgrainone"
}