Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Every major change on a document is recorded as an event (hendelse). For monitoring a portfolio of document, events should be used in stead of polling for status on each document. Event monitoring is available in beta and production using the webservice HendelseWs (currently in version 6).

How to list events

Both listHendelser and listHendelserMedStatus returns a list of events from a given starting point. listHendelserMedStatus will also return the current status of the document (same as calling the getStatus method, see documentation). Both services offers the following parameters to get the intended events:

Request/input parameters

Parameter

Purpose

Description

fraHendelsesId

Set the starting point

required

Will return events with eventId greater than or equal to this value.

fraTidspunkt

Set the starting point

Only retrieve events having created timestamp newer or equal to this. ISO timestamp format. Example value 2021-11-16T16:22:09.321+01:00.

maxAntall

Limit the number of events

required

Maximum number of events to return.

statuser

Filter events

Only fetch events for this list of document statuses. See below for example statuses.

typer

Filter events

Only fetch events for these event types. See below for example event types

kilde

Filter events

Some customers use both the webservice and GUI in Etinglysing. kilde allows you to fetch events for documents created through the webservice (INTEGRASJON), the GUI (NETTLESER) or both (ALLE). If omitted, events from both sources will be returned.

Response:

Field

Description

id

EventId

type

Event type (see below for examples)

dokumentId

DocumentId in Etinglysing

eksternEierId

Document owner departmentId

nyStatus

New status

gammelStatus

Old status

beskrivelse

Status description in Norwegian

opprettet

Event created timestamp

eksterntOpprettetDokument

True if document is created by using the DocumentWS webservice.

dokumentRef

The document reference at the event time

oppdragsId

AssignmentId in Etinglysing if document is related to an assignment

Event types

  • STATUSOVERGANG

  • DOKUMENT_OPPRETTET

  • DOKUMENT_FJERNET

Initial request

When establishing a background job that polls for events on documents, you can do an initial request specifying a start timestamp, like:

<v6:listHendelser>
    <fraHendelsesId>0</fraHendelsesId>
    <maxAntall>50</maxAntall>
    <fraTidspunkt>2023-01-01T00:00:01</fraTidspunkt>
</v6:listHendelser>

Assuming events exists, a response can look like:

<ns2:listHendelserResponse xmlns:ns2="https://ws.etinglysing.no/hendelse/v6">
    <return>
      <id>966177</id>
      <type>STATUSOVERGANG</type>
      <dokumentId>15767382</dokumentId>
      <eksternEierId/>
      <nyStatus>TINGLYST</nyStatus>
      <gammelStatus>UNDER_TINGLYSING</gammelStatus>
      <beskrivelse>Endret status fra "Under tinglysing" til "Tinglyst"</beskrivelse>
      <opprettet>2023-03-01T14:02:24.715+01:00</opprettet>
      <eksterntOpprettetDokument>false</eksterntOpprettetDokument>
      <dokumentRef>jsk_ne_rolf</dokumentRef>
      <dokumentType>FOELGEBREV</dokumentType>
    </return>
    <return>
      <id>967156</id>
      <type>DOKUMENT_OPPRETTET</type>
      <dokumentId>15775644</dokumentId>
      <eksternEierId/>
      <nyStatus>OPPRETTET</nyStatus>
      <beskrivelse>Dokument opprettet</beskrivelse>
      <opprettet>2023-03-20T11:58:09.186+01:00</opprettet>
      <eksterntOpprettetDokument>false</eksterntOpprettetDokument>
      <dokumentRef>ref</dokumentRef>
      <dokumentType>PANTEDOKUMENT</dokumentType>
    </return>
    <return>
      <id>967157</id>
      <type>DOKUMENT_FJERNET</type>
      <dokumentId>15775644</dokumentId>
      <eksternEierId/>
      <nyStatus>FJERNET_FRA_TINGLYSING</nyStatus>
      <beskrivelse>Dokument fjernet</beskrivelse>
      <opprettet>2023-03-20T11:58:15.563+01:00</opprettet>
      <eksterntOpprettetDokument>false</eksterntOpprettetDokument>
      <dokumentRef>ref</dokumentRef>
      <dokumentType>PANTEDOKUMENT</dokumentType>
    </return>
</ns2:listHendelserResponse>

  • No labels