:
Last modified: Apr 2, 2024

Api

Resource

Overview Your organization needs the scope altinn:resourceregistry/resource.write to be allowed to create and modify your organizations resources and policies. The resource describes the different metadata for a resource { "identifier":"brg_samordnet_registermelding", "description": [ { "language": "nb-NO", "description": "Elektronisk skjema for registrering av selskap" }, { "language": "EN", "description": "Registering a new entity or changing information regarding an existing entity" } ], "title": [{ "title":"Samordnet registermelding", "language":"nb-NO" }, { "title":"Coordinated register notification", "language":"en" }], "hasCompetentAuthority": { "organization": "974760673", "orgcode":"brg" }, "contactpoint": [{ "phone":"1231324", "email": "online@digdir. »

RESTful APIs (Representation State Transfer)

This page is work-in-progress. This is a proposed api which most likely is going to change. REST REST is an architectural style for designing loosely coupled applications over HTTP which was coined by Rob Fielding in 2000. We will define services according to REST. REST APIs should start with /api so that we with ease can differentiate between an rest api call and a ux-application call. REST APIs should start with a short word to indicate the logical domain or group of apis. »

Stateless data elements

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 available 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 data element 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. »

Tags

Overview The tag API for data elements have endpoints for listing of tags, adding a tag and removing a tag. basePath {org}/{appname}/instances/{instanceOwnerPartyId}/{instanceGuid}/data/{dataGuid}/ Get tags Endpoint for retrieving a list of tags already added to a data element. GET basePath/tags Accept: application/json Add tag Endpoint for adding a tag to a data element. POST basePath/tags Content-Type: application/json "letters" The body should contain the new word in quotes. This is the JSON representation of a text and the Content-Type needs to be application/json. »

Process

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

Validation

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

API

Each app will have its unique set of APIs. Compared to current API it makes it possible to create APIs that have documentation that is target for the specific app. For more details, see altinn api. »

App API

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