Skip to main content

List Projects API (https://{cluster}.cognitedata.com/api/v1/projects) - no corresponding way to use this from Python SDK.

Is there any specific reason why this method to get the CDF Projects is not available in python sdk.

If it is present I was not able to find it in the documentation. https://cognite-sdk-python.readthedocs-hosted.com/en/latest

I like to use the token inspect endpoint, available at:

token_obj = client.iam.token.inspect()

It comes with a lot of info, but if you just want the CDF projects you have access to, copy this code:

[proj.url_name for proj in token_obj.projects]


It’s not implemented in the python SDK yet, it has not been a need (most customers only have 1-2 projects).

You can however use it in the python SDK with generic get function against the REST-API:

client.get("/api/v1/projects")

 


Reply