Salta el contingut

API giscube ID

giscube ID API Documentation

Giscube ID

All layers in Giscube have a unique identifier called giscube_id. This identifier is composed of two numbers separated by a dot xx.xx:

  • First number: indicates the layer type according to the django_content_type table.
  • Second number: identifier of the layer within the corresponding table according to the layer type.

API URL

Endpoint geoportal/giscube_id/giscube_id
Example https://xxxxxxx.xxxxxxx.xxx/apps/giscube-admin/geoportal/giscube_id/40.8

The API endpoint returns information about the layer indicated by the specified giscube_id code value.

{
    {
      "group": true,
      "title": "Ortoimatge 2009",
      "legend": "",
      "catalog": [
        "9- Base Cartogràfica Aj.",
        "Ortoimatges"
      ],
      "options": {

      },
      "private": false,
      "children": [
        {
          "url": "https://xxxxxxx.xxxxxxx.xxx/apps/giscube-admin/imageserver/services/xxxx/",
          "type": "WMS",
          "group": false,
          "title": "Ortoimatge 2009",
          "layers": "2009_NW,2009_NE,2009_SW,2009_SE",
          "giscube": {
            "downloadable": false,
            "single_image": false,
            "getfeatureinfo_support": false
          },
          "projection": 4326
        }
      ],
      "keywords": "orto, ortoimatge, vol, raster, 2009",
      "metadata": {
        "bbox": "1.058464,41.101733,1.19133,41.191056",
        "date": "2009-01-01",
        "summary": "Ortoimatge 2009",
        "category": "Capes Ajuntament",
        "language": "ca",
        "information": "Capa generada per l'Ajuntament",
        "provider_web": "https://www.xxxx.cat/",
        "provider_name": "Ajuntament de xxxx",
        "provider_email": "cartografia@xxxx.cat"
      },
      "giscube_id": "40.8",
      "category_id": 54,
      "description": "Ortoimatge 2009",
      "has_children": true
    }
}

Authentication

To access this API, authentication is required or not, depending on the permissions of the layer we are querying. In other words, a token must be sent to the server.

This can be done in two ways:

  • access_token parameter in a GET request
Parameter access_token
Example https://xxxxxxx.xxxxxxx.xxx/apps/giscube-admin/geoportal/giscube_id/40.8?access_token=JIFbeOLxkW87wvu3a5at9164IGv7w7
  • HTTP Header
Parameter Authorization
Example Authorization=Bearer JIFbeOLxkW87wvu3a5at9164IGv7w7

The giscube id API is public, but there are records in tables linked to categories that are not public. If you are not authenticated, you will get all the categories, and the values of public tables will appear in the content property as seen before. If a table is private, the category will appear, but not its content. If we are authenticated, we will get all the results.

Please refer to the catalog API for all information about authentication.

API Parameters

The API does not have any parameters.