Sist endret: 2. apr. 2024

Api

Tilstandsløse data

Overview A stateless data element is a data object based on a data model without relations to an instance, instance owner or a state. The data is never persisted anywhere, and the avilable endpoints simply creates, prefills and/or runs calculations on a data object before returning it to the caller. basePath {org}/{app}/v1/data Create new data Endpoint for creating a new stateless dataelement based on a data type. POST basePath?dataType=[dataTypeId] Accept: application/{xml/json} The dataType parameter is required and should reference one of the data types defined on the application that requires app logic. »

Prosess

Overview All apps have a process definition that specifies start events, end events, tasks and the allowed flows (transitions) between these. A process is started by the application, which selects a start event to start and follows the sequence flow to the first task and creates a current task object to hold the process state. Process A process is represented by an process modell in BPMN/XML notation. Each task has an unique id, which is used to refer to the task in the api. »

Instance events

Instance events All instance events, e.g. creation, read, save, change process state, … GET {storagePath}/instances/347829/762011d1-d341-4c0a-8641-d8a104e83d30/events Example of event data. { "id":"6dff32bc-0928-4ae8-937c-b362d6941c89", "instanceId": "60238/5c6b1a71-2e1f-447a-ae2f-d1807dcffbfb", "eventType": "deleted", "created": "2019-05-02T13:08:21.981476Z", "instanceOwnerPartyId": "60238", "user": { "userId": 338829, "authenticationLevel": 1, "enduserSystemId": 2 }, "process": { "started": "2019-05-01T12:45:01.3233Z", "startEvent": "Start_22", "currentTask": { "elementId": "Task_2" } } } Application events (for application owners) WARNING: This section will be redesigned Selected instance events. Created, first read, change process state. »

Validering

Overview There are multiple endpoints that can trigger validation and provide feedback regarding the state of an instance and its data. Some of them validates data already uploaded and stored in Altinn while others can validate input. Validate stored instance This action will validate an entire instance including the all data elements already uploaded and stored in Altinn. Validation will be performed based on current task in the process. Validation will ensure that all required data elements, as defined by the application metadata, have been uploaded and are valid. »

App API

Oversikt De API-funksjonene som er dokumentert her er standardfunksjoner i en app basert på app-malen i Altinn Studio. Applikasjonseiere kan fritt gjøre endringer, men det er relativt trygt å anta at fjerning av funksjoner vil være ekstremt sjeldent. Enhver app med tillegg eller endringer skal ha sin egen dokumentasjon publisert av applikasjonseieren. Alle app-API-adresser starter med samme navn og filsti, men de varierer fra én app til en annen basert på appeier og appnavn. »