Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Bygg 21 API


This repo contains Sanity Studio and Schemas (content models) for Bygg21 API.

The API is public and no authentication is needed.


Our API contains simplified and structured information from the two best practise processes for how to develop a regulation plan and for how to carry out a building process:

Our thought is that this data might be useful to include in project managment tools for the building industry, but you may use it however you like.

API and query examples

Our API is created using Sanity, which exposes a traditional HTTP based REST API.

We have a single endpoint for all data, but use a query language called GROQ to give us what we want. The query language is quite simmilar to GraphQL, but with more features.



Get all data about "Neste steg":*[_type=="nextStep"]

Get all data about "Neste steg", but limit to Step info (number, title and description):*[_type=="nextStep"]{steps[]{details{number,title,description}}}

Get all data about "Steg for steg":*[_type=="stepByStep"]

Get all data about "Steg for steg", but limit to Step info (number, title and description):*[_type=="stepByStep"]{steps[]{details{number,title,description}}}

Or you can get an export of all data and use as you want:

Learn more

More about Sanitys HTTP API:

How to write GRQO queries:

A handy "Query cheat sheet":

API documentation

Most of the data and structure should be self-describing, but a few might need an extra explanation.

documentMeta (object)
This contains information about the document. lastChanged (date) and version(number) should be updated if the structure changes or on a larger text update. Minor text changes will not change this, but be reflected in Sanitys built-in _updatedAt.

deliveryFail (boolean)
This means that the project should return to step 1 if the delivery fails. This is only relevant for "Neste steg / Next step".

meetings (array)
If a step should end with a meeting (for example "Oppstartsmøte"), this array should have one item. The structure of a meeting is similar to a step. This is only relevant for "Steg for steg / Step by step".

Get started with local development

If you need to make changes to the Schema (content model), this can be done locally:

  • Install Sanity: npm install -g @sanity/cli
  • Clone this repo
  • Install dependencies: npm i
  • Run Sanity studio: sanity start

Remember to deploy changes to Studio after making changes to schemas: Run sanity deploy. This will probably be automatic in the future (CI).

Also important!
Remember that even though you work locally, changes made to the content in Studio will be globally. If you need to experiment with the data, download and work on a copy of the dataset:


Manage content:

Manage users:

Project ID:

You can’t perform that action at this time.