{
  "opencollection": "1.0.0",
  "info": {
    "name": "Cognite 3D Asset Mapping Relationships API",
    "version": "v1"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Relationships",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List relationships",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Limits the number of results to be returned. The maximum results returned by the server is 1000 even if you specify a higher limit."
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Cursor for paging through results. In general, if a response contains a `nextCursor`\nproperty, it means that there may be more results, and you should pass that value as the\n`cursor` parameter in the next request.\n\nNote that the cursor may or may not be encrypted, but either way, it is not intended to be\ndecoded. Its internal structure is not a part of the public API, and may change without\nnotice. You should treat it as an opaque string and not attempt to craft your own cursors.\n"
              },
              {
                "name": "partition",
                "value": "",
                "type": "query",
                "description": "Splits the data set into `N` partitions.\nThe attribute is specified as a \"M/N\" string, where `M` is a natural number in the interval of `[1, N]`.\nYou need to follow the cursors within each partition in order to receive all the data.\n\nTo prevent unexpected problems and maximize read throughput, you should at most use 10 (N <= 10) partitions.\n\nWhen using more than 10 partitions, CDF may reduce the number of partitions silently.\nFor example, CDF may reduce the number of partitions to `K = 10` so if you specify an `X/N` `partition` value where `X = 8` and `N = 20` - i.e. `\"partition\": \"8/20\"`- then\nCDF will change `N` to `N = K = 10` and process the request.\nBut if you  specify the `X/N` `partition` value where `X = 11` (`X > K`) and `N = 20` - i.e. `\"partition\": \"11/20\"`- then\nCDF will reply with an empty result list and no cursor in the response.\n\nIn future releases of the resource APIs, Cognite may reject requests if you specify more than 10 partitions.\nWhen Cognite enforces this behavior, the requests will result in a 400 Bad Request status.\n"
              }
            ]
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:READ`\n\nLists all relationships. The order of retrieved objects may change for two calls with the same parameters.\nThe endpoint supports pagination. The initial call to this endpoint should not contain a cursor, but the cursor parameter should be used to retrieve further pages of results."
        },
        {
          "info": {
            "name": "Create relationships",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:WRITE`\n\nList of the relationships to create. You can create a maximum of 1000 relationships per request. Relationships should be unique, but CDF does not prevent you from creating duplicates where only the externalId differs.\n\nRelationships are uniquely identified by their externalId. Non-unique relationships will not be created.\n\nThe order of relationships in the response equals the order in the request."
        },
        {
          "info": {
            "name": "Update relationships",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships/update",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:WRITE` `relationshipsAcl:READ`\n\nUpdate relationships between resources according to the partial definitions of the relationships given in the payload of the request. This means that fields not mentioned in the payload will remain unchanged. Up to 1000 relationships can be updated in one operation.\nTo delete a value from an optional value the `setNull` field should be set to `true`.\nThe order of the updated relationships in the response equals the "
        },
        {
          "info": {
            "name": "Delete relationships",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships/delete",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:WRITE`\n\nDelete the relationships between resources identified by the external IDs in the request. You can delete a maximum of 1000 relationships per request."
        },
        {
          "info": {
            "name": "Retrieve relationships",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships/byids",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:READ`\n\nRetrieve relationships by external IDs. You can retrieve a maximum of 1000 relationships per request.\nThe order of the relationships in the response equals the order in the request."
        },
        {
          "info": {
            "name": "Filter relationships",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships/list",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "\n\n> **Required capabilities:** `relationshipsAcl:READ`\n\nLists relationships matching the query filter in the request. You can retrieve a maximum of 1000 relationships per request."
        }
      ]
    }
  ],
  "bundled": true
}