Layar Developer Documentation

Back to layar.com

Get Meta Information

Here we list all the static information that can be applied to a layer: 

These calls return information that is required to format complex metadata in a human friendly way. 

Get categories

/api/connect/[version]/layers/init/categories/
Description: [GET] Get all possible categories. This call returns human friendly descriptions for all possible categories.
Returns: an array of category objects (mentioned below)
Introduced API version: Introduced in 1.0(/api/layers/init/categories/)
Example:
[
    {
        "name": "Accommodation",
        "id": 1
    },
    {
        "name": "Architecture & Buildings",
        "id": 2
    },
 [Etcetera...]
    {
        "name": "Weather",
        "id": 33
    },
    {
        "name": "Wifi hotspots",
        "id": 34
    }
]

Category object
NameTypeDescriptionIntroduced Version
idintegerid of the category1.0
namestringDescription of the category1.0

Get a list of layar API versions

/api/connect/[version]/layers/init/api_versions/
Description: [GET] Get all possible Layar API versions.
Returns: an array of Layar API versions objects
Introduced API version: Introduced in 1.0(/api/layers/init/api_versions/)

API Version Object
NameTypeDescriptionIntroduced Version
idintegerIdentifier of the minimum version 1.0
versionstringShort version name1.0
descriptionstringLong description of the version 1.0

Get a list of layer types

/api/connect/[version]/layers/init/types/
Description: [GET] Get all possible layer types.
Returns: an array of layer type objects
Introduced API version: Introduced in 1.0(/api/layers/init/types/)

Layer Type Object
NameTypeDescriptionIntroduced Version
idintegerIdentifier of the type1.0
descriptionstringDescription of the type (2D, 3D, hidden)1.0

Get a list of countries

/api/connect/[version]/layers/init/countries/
Description: [GET] Get all possible country codes
Returns: an array of country objects
Introduced API version: Introduced in 1.0(/api/layers/init/countries/)

Country object
NameTypeDescriptionIntroduced Version
isostringISO code of the country1.0
titlestringDisplay name of the country1.0

Get a list of all possible layer status

/api/connect/[version]/layers/init/status/
Description: [GET] Get all possible layer status codes
Returns: an array of layer status objects
Introduced API version: Introduced in 1.0(/api/layers/init/status/)

Layer Status Object
NameTypeDescriptionIntroduced Version
idintegerIdentifier of the status1.0
descriptionstringDescription of the status1.0

Get layer filter defaults

/api/connect/[version]/layers/init/filters/
Description: [GET] Get layer filter defaults.
Returns: layer filter objects with the relevant parameters for each filter. Each layer filter object will have a "limit"; the maximum amount of filters of that type that can be added to a layer.
Introduced API version: Introduced in 1.0(/api/layers/init/filters/)
Example:
    {
    "search_box": {
        "limit": 3, 
        "order": 0, 
        "value": "", 
        "label": ""
    }, 
    "radio_list": {
        "optlist": [
            ["", ""], ["", ""]
        ], 
        "label": "", 
        "limit": 1, 
        "order": 0, 
        "selectedvalue": ""
    }, 
    "range_slider": {
        "maxvalue": 5000, 
        "value": 1500, 
        "label": "Search range", 
        "limit": 1, 
        "minvalue": 100, 
        "order": 0
    }, 
    "custom_slider": {
        "maxvalue": 0, 
        "value": 0, 
        "label": "", 
        "labelUnit": "", 
        "limit": 3, 
        "minvalue": 0, 
        "order": 0
    }, 
    "checkbox_list": {
        "optlist": [
            ["", ""], ["", ""]
        ], 
        "selectedvalues": "", 
        "limit": 1, 
        "order": 0, 
        "label": ""
    }
}

Get Vision price tiers

/api/connect/[version]/layers/init/vision_price_tiers/
Description: [GET] Get all Layar Vision price tiers
Returns: an array of vision price tier objects
Introduced API version: Introduced in 2.0

Vision Price Tier Object
NameTypeDescriptionIntroduced Version
idintegerID of the tier2.0
limitintegerUpper limit of the tier. A "null" value means this is the highest tier (no limit)2.0
descriptionstringDescription of the tier2.0