---
title: List layers relations
slug: model-api/list-layers-relations
docTags: 
createdAt: 2024-06-10T16:48:45.445Z
---

{
  "id": "g_rWhRHGTPMn5_q6sKkFU",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations"
      }
    ],
    "name": "List layers relations",
    "description": "List all the relations for all the layers in a project. A layer is related to products.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "model",
          "type": "array",
          "description": "Filter by latest revision of model id.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "revision",
          "type": "array",
          "description": "Filter by revision id. Can be repeated to filter by multiple revisions.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "page",
          "type": "integer",
          "description": "Default value is 1"
        },
        {
          "kind": "optional",
          "name": "pageSize",
          "type": "integer",
          "description": "<p>Default 100, max 1000</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "ifc-layer-relation[]",
            "schema": [
              {
                "name": "objectId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "The object id of the layer",
                "example": 417236997413,
                "format": "int64"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "The name of the layer",
                "example": "S-STRS-____-OTLN"
              },
              {
                "name": "ifcType",
                "kind": "optional",
                "type": "string",
                "description": "The entity type of the layer",
                "example": "IfcPresentationLayerAssignment"
              },
              {
                "name": "products",
                "kind": "optional",
                "type": "array",
                "description": "The products related to the layer",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "url",
                    "kind": "optional",
                    "type": "string",
                    "description": "The product resource URL",
                    "example": "https://api.catenda.com/v2/projects/67551168422040148d8ae198a321494d/ifc/products/617236039783"
                  },
                  {
                    "name": "objectId",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The object id of the product",
                    "example": 617236039783,
                    "format": "int64"
                  },
                  {
                    "name": "globalId",
                    "kind": "optional",
                    "type": "string",
                    "description": "A 22 character IfcGloballyUniqueId",
                    "example": "5YznyLUif7kPKJZOIB9Nkf"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "The name of the product",
                    "example": "Stair:Monobloc PMR:6036293"
                  },
                  {
                    "name": "ifcType",
                    "kind": "optional",
                    "type": "string",
                    "description": "The entity type of the product",
                    "example": "IfcStair"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ifc-layer-relation",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "7u4dMVjla2jPMCp26cy9Z",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations \\\n     --header 'accept: application/json'"
        },
        {
          "id": "r_rY2hZBEKf2bO_mMZeBK",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Q7aTTH7-LVhcBc94pDvQy",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "iwa2ZoUEBucGP8z_a0sao",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/ifc/layers/relations\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "7u4dMVjla2jPMCp26cy9Z"
    },
    "results": {
      "languages": [
        {
          "id": "U3AyqMEN3ymQXoVisTL-4",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"objectId\": 417236997413,\n    \"name\": \"S-STRS-____-OTLN\",\n    \"ifcType\": \"IfcPresentationLayerAssignment\",\n    \"products\": [\n      {\n        \"url\": \"https://api.catenda.com/v2/projects/67551168422040148d8ae198a321494d/ifc/products/617236039783\",\n        \"objectId\": 617236039783,\n        \"globalId\": \"5YznyLUif7kPKJZOIB9Nkf\",\n        \"name\": \"Stair:Monobloc PMR:6036293\",\n        \"ifcType\": \"IfcStair\"\n      }\n    ]\n  }\n]"
        }
      ],
      "selectedLanguageId": "U3AyqMEN3ymQXoVisTL-4"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}