api

App metadata

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. »

App APIs

Overview The features documented here are the default features of any app created based on the app template in Altinn Studio. Application owners are free to make changes to this, but it is probably safe to say that removal of features will be extremly rare. Any app with changes to its API should have its own documentation published by the application owner. All app API endpoints have the same URL base path that will vary based on application owner and application name. »

App metadata

Overview The endpoints documented here are all for accessing metadata on the app itself and the data types that are allowed in an instance of the app. Additional endpoints provides access to text resources. Get app metadata Endpoint for downloading a copy of the application metadata document. GET {basePath}/api/v1/applicationmetadata Get Application texts Get text resources for the application for a specific language code. If the requested language isn’t available, norsk bokmål (nb) will be returned as default. »

Instance

Instance The Instance model is the main model of an instance. An instance can be regarded as an envelope or folder where data is collected and exchanged between the application user and owner. The instance document is a way for Altinn and external parties to track the state of one specific data exchange. Properties Name Description id A gobally unique id for the instance. »

Instances

Overview An instance can be regarded as an envelope or folder where data is collected and exchanged between the application user and owner. The instance document is a way for Altinn and external parties to track the state of one specific data exchange. How long an instance lives and how many interactions there are between the application owner and user will vary from one app to another. Advanced apps will have their own documentation. »

DataElement

DataElement The data element model is the main model for metadata related to a specific data element. A data element can be any data associated with an instance. The two most common type of data is the actual form data and attachments. Properties Name Description id A globally unique id for the data element. instanceGuid The globally unique id for the instance the data element is associated with. »

Authentication

Authentication for application owners Application owners should be authenticated with Maskinporten. API provisioning in Maskinporten API-provider To provide an API in maskinporten Altinn has to do two operations. As API-provider Altinn registres a scope in Maskinporten POST /scopes { "prefix": "altinn", "subscope": "instances/metadata.read", "description": "Clients can access metadata for all instances for all apps of the organisation" } As API-provider Altinn has to give access to its scope for a given organisation PUT /scopes/access/889640782? »

Data elements

Overview A data element consist of two parts: its metadata document and the actual data blob. This API work primarily with the blob while keeping the metadata document updated. basePath {org}/{appname}/instances/{instanceOwnerPartyId}/{instanceGuid}/data Get data Endpoint for downloading the data blob. GET basePath/{dataGuid} Accept: application/{xml/json} The response will depend on the type of blob. There are currently 2 primary types: form data based on a model and attachments. An Accept header in a request will be considered only when the requested data element is connected to a data model. »

Events

Overview Events are in this context is information about events created by applications or other sources. The event itself is based on the CloudEvent standard and is a small JSON structure containing the most important information of an event. Details are found here. The events APIs are used to access events created by applications in Altinn Apps and other event sources that use Altinn Platform as av “event hub”. Subscription The highly preferred way to use events is to set up a subscription that enables push of events to a webhook-endpoint. »

Instances

Overview An instance works as a form of envelope or folder where data can be collected and exchanged between the user and owner of the application. The instance document is a way for Altinn and external parties to track the state of one specific data exchange. How long an instance can live and how many interactions there can be between the application owner and user will vary from one app to another. »