curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships \
--header 'Authorization: Bearer <token>'{
"items": [
{
"externalId": "<string>",
"sourceExternalId": "<string>",
"sourceType": "asset",
"targetExternalId": "<string>",
"targetType": "asset",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"startTime": 1730204346000,
"endTime": 1730204346000,
"confidence": 0.5,
"dataSetId": 4503599627370496,
"labels": [
{
"externalId": "my.known.id"
}
]
}
],
"nextCursor": "<string>"
}Required capabilities:
relationshipsAcl:READ
Lists all relationships. The order of retrieved objects may change for two calls with the same parameters. The 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.
curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/relationships \
--header 'Authorization: Bearer <token>'{
"items": [
{
"externalId": "<string>",
"sourceExternalId": "<string>",
"sourceType": "asset",
"targetExternalId": "<string>",
"targetType": "asset",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"startTime": 1730204346000,
"endTime": 1730204346000,
"confidence": 0.5,
"dataSetId": 4503599627370496,
"labels": [
{
"externalId": "my.known.id"
}
]
}
],
"nextCursor": "<string>"
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Limits the number of results to be returned. The maximum results returned by the server is 1000 even if you specify a higher limit.
1 <= x <= 1000Cursor for paging through results. In general, if a response contains a nextCursor
property, it means that there may be more results, and you should pass that value as the
cursor parameter in the next request.
Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.
"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
Splits the data set into N partitions.
The attribute is specified as a "M/N" string, where M is a natural number in the interval of [1, N].
You need to follow the cursors within each partition in order to receive all the data.
To prevent unexpected problems and maximize read throughput, you should at most use 10 (N <= 10) partitions.
When using more than 10 partitions, CDF may reduce the number of partitions silently.
For 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
CDF will change N to N = K = 10 and process the request.
But if you specify the X/N partition value where X = 11 (X > K) and N = 20 - i.e. "partition": "11/20"- then
CDF will reply with an empty result list and no cursor in the response.
In future releases of the resource APIs, Cognite may reject requests if you specify more than 10 partitions. When Cognite enforces this behavior, the requests will result in a 400 Bad Request status.
"1/10"
Was this page helpful?