Content services

Get the index for a specific document

Function for retrieving table of contents as a JSON structure.

The returned data model is a tree structure with the following data fields:

refID: For document parts where ID can be interpreted and used by a human to identify the part, this will contain this" semantic ID ". An approximate science, but for many cases very useful.

url: Same content as ID per. now, may change to full URL in near future.

title: Title of the document section where applicable. Many old laws do not have a paragraph title, then "title" will typically be the first paragraph etc.

id: Unique non-semantic structural ID that points to the document part. Here, "mismatch" between refID and ID will often be experienced, e.g. in the example above, but it is "by design".

level: Level from the top (root level is 0)

children: List of several nodes that have the current node as parent. Same data model.

Example: https://api.lovdata.no/documentIndex?refID=NL/lov/1997-02-28-19

get/documentIndex

Request

  • Base URL: https://api.lovdata.no (the document declares no server; this is the origin it was published from)
  • URL: https://api.lovdata.no/documentIndex
  • Auth: API key in header X-API-Key

Query parameters

refIDstring

Reference to a document, either unique document ID specified with legal source or if the legal source is missing, the function tries to interpret this into the most probable document.

Response

Document index tree with titles and child parts

NoLovdataObjectsDocumentDocumentPartLink required

Changes

No recorded changes to this operation across all 1 revision of this API.