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

{
  "id": "AbkEcrSc1qN34fMBnQ17A",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/classifications/{object-id}/relations",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/classifications/{object-id}/relations"
      }
    ],
    "name": "List classification relations",
    "description": "List all the relations for a classification. A classification is related to classification references.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "object-id",
          "type": "integer<int64>",
          "description": "Object id of the classification",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "revision",
          "type": "array",
          "description": "Filter by revision id. Can be repeated to filter by multiple revisions.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        }
      ],
      "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": "object",
            "description": "",
            "customType": "ifc-classification-relations",
            "schema": [
              {
                "name": "objectId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "The object id of the classification",
                "example": 317236045075,
                "format": "int64"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "The name of the classification",
                "example": "Uniformat"
              },
              {
                "name": "ifcType",
                "kind": "optional",
                "type": "string",
                "description": "The entity type of the classification",
                "example": "IfcClassification"
              },
              {
                "name": "classificationReferences",
                "kind": "optional",
                "type": "array",
                "description": "The classification references related to the classification",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "url",
                    "kind": "optional",
                    "type": "string",
                    "description": "The classification reference resource URL",
                    "example": "https://api.catenda.com/v2/projects/67551168422040148d8ae198a321494d/ifc/classification_references/317636045083"
                  },
                  {
                    "name": "objectId",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "The object id of the classification reference",
                    "example": 317636045083,
                    "format": "int64"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "The name of the classification reference",
                    "example": "Showers"
                  },
                  {
                    "name": "ifcType",
                    "kind": "optional",
                    "type": "string",
                    "description": "The entity type of the classification reference",
                    "example": "IfcClassificationReference"
                  },
                  {
                    "name": "attributes",
                    "kind": "optional",
                    "type": "object",
                    "description": "The attributes of the classification reference including the identifier",
                    "example": "",
                    "schema": []
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ifc-classification-relations",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "MN7L66WjhJaLk7eyKoZit",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.catenda.com/v2/projects/{project-id}/ifc/classifications/{object-id}/relations \\\n     --header 'accept: application/json'"
        },
        {
          "id": "8EJck7Ks7JsRCwv0YOojb",
          "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/classifications/{object-id}/relations\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_h2Pk7h1guhhUEpijrOWH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/ifc/classifications/{object-id}/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": "kGPXr4hrwVh2iJ8Xg9ChU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/ifc/classifications/{object-id}/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": "MN7L66WjhJaLk7eyKoZit"
    },
    "results": {
      "languages": [
        {
          "id": "dNeWd1ouNT9gJd5IJZ53F",
          "language": "200",
          "code": "// OK\n{\n  \"objectId\": 317236045075,\n  \"name\": \"Uniformat\",\n  \"ifcType\": \"IfcClassification\",\n  \"classificationReferences\": [\n    {\n      \"url\": \"https://api.catenda.com/v2/projects/67551168422040148d8ae198a321494d/ifc/classification_references/317636045083\",\n      \"objectId\": 317636045083,\n      \"name\": \"Showers\",\n      \"ifcType\": \"IfcClassificationReference\",\n      \"attributes\": {}\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "dNeWd1ouNT9gJd5IJZ53F"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}