REST LEGO® API - How to use API

Cubiculus > API > Usage
We provide simple way how to connect your application to our LEGO® building instruction repository. provide public REST interface. You can connect you application to this REST interface and load any data that you need for you application as it's shown at next picture.

LEGO® API communication diagram
All communication is based at HTTP protocol. Below are examples of REST resources:

Structure of server response

Server response is encoded with JSON, look at JSON homepage to learn more about this format and choose right software library for decoding it.

In field step group can be list of files links. Each building instruction can have many step groups and each step group can have many files. Files are always directly usable links.

Please read REST resources documentation

When invalid (non existing) building instruction is requested then HTTP state code 404 is returned.

Used technologies

simple data exchange format based at simple notation, see specification
Java JSON Tools
Project for parsing POJO object into JSON and back. This library is used in our examples. See project page.
JSONP - JSON with Padding
Simple JSON extension that allows to create cross-domains AJAX application. It allows to avoid Same-Origin security restriction. If you want to use JSONP just add to any URL at REST interface padding name like CallBack=paddingName
powerful way how to hierarchically organize application resources into humans friendly way. With connection with HTTP it easily make public all data resources. See REST at
LEGO® is a trademark of the LEGO® Group, which does not sponsor, authorize or endorse this web site.
©, All rights reserved.