The importance of using a proper REST API URL

We have noticed that several consumers of the Sitevision Model REST API are using suspicious/bad URL:s. Most likely unintentionally. This article a friendly reminder of how a REST API URL should be properly expressed.

A vital part of a Sitevision Model REST API URL is the model version part. Using a proper version value is vital in order to get correct data. A consumer of the REST API should most likely specify the model version "1" (the online version, i.e. the version that visitors of the site are viewing).

The parts of a REST API URL is explained in detail on the Model REST API page.

Ensure all your consumers of the REST API use a proper URL!

TLDR;

REST API consumers using a URL starting like this (model version ZERO - i.e. offline/edit data version):

https://mydomain.se/rest-api/1/0/...

should most likely be properly expressed as (model version ONE - i.e. online/published data version):

https://mydomain.se/rest-api/1/1/...

Do you want to subscribe to News from Sitevision Developer team? Subscribe here!