---
title: Query groups
slug: model-api/query-groups
docTags: 
createdAt: 2024-06-10T16:48:45.445Z
---

{
  "id": "OGJaauL88PJWnlLbtdieu",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/groups",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/ifc/groups"
      }
    ],
    "name": "Query groups",
    "description": "Query groups in a project.",
    "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[]"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "fields",
              "kind": "optional",
              "type": "map",
              "description": "<p>Choose which fields are included in the result, by default all are included. Use value of 1 to include the field and 0 to exclude.</p>",
              "example": "{\"attributes.Name\":1,\"attributes.GlobalId\":1}",
              "customType": "map<string, integer>",
              "schema": []
            },
            {
              "name": "query",
              "kind": "optional",
              "type": "object",
              "description": "The query object",
              "example": "{\"ifcType\":{\"$ifcType\":\"IfcEntity\"}}",
              "schema": []
            },
            {
              "name": "models",
              "kind": "optional",
              "type": "array",
              "description": "<p>Filter by latest revision of model ids, will be ignored if revisions is set</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "revisions",
              "kind": "optional",
              "type": "array",
              "description": "Filter by revision ids.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "isExpanded": true
        }
      ],
      "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-group[]",
            "schema": [
              {
                "name": "revisionId",
                "kind": "optional",
                "type": "string",
                "description": "The id of the model revision",
                "example": "924809076a694255c489d236517a55da"
              },
              {
                "name": "objectId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "The object id of the group",
                "example": 417236464138,
                "format": "int64"
              },
              {
                "name": "ifcType",
                "kind": "optional",
                "type": "string",
                "description": "The entity type of the group",
                "example": "IfcGroup"
              },
              {
                "name": "ifcSchema",
                "kind": "optional",
                "type": "string",
                "description": "The IFC schema of the model revision",
                "example": "IFC2X3"
              },
              {
                "name": "attributes",
                "kind": "optional",
                "type": "object",
                "description": "The attributes of the group including the name and global id",
                "example": "",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ifc-group",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "2mMp0DHRS4FSw6wfhB_C6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/v2/projects/{project-id}/ifc/groups \\\n     --header 'accept: application/json'"
        },
        {
          "id": "U9H_grT0c01PHorjsPbOC",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/ifc/groups\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ctpIqjs1aLxyaV8zOVR0e",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/ifc/groups\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0Q1Nwf56kUqG80gBPwQAA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/ifc/groups\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "2mMp0DHRS4FSw6wfhB_C6"
    },
    "results": {
      "languages": [
        {
          "id": "_jtkgBE32UjN59KYheZZe",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"revisionId\": \"924809076a694255c489d236517a55da\",\n    \"objectId\": 417236464138,\n    \"ifcType\": \"IfcGroup\",\n    \"ifcSchema\": \"IFC2X3\",\n    \"attributes\": {}\n  }\n]"
        }
      ],
      "selectedLanguageId": "_jtkgBE32UjN59KYheZZe"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}