from cognite.client.data_classes.data_modeling import SpaceApply
spaces = [SpaceApply(space="mySpace", description="My first space", name="My Space"),
SpaceApply(space="myOtherSpace", description="My second space", name="My Other Space")]
res = client.data_modeling.spaces.apply(spaces){
"items": [
{
"space": "<string>",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"isGlobal": true,
"description": "<string>",
"name": "<string>"
}
]
}Required capabilities:
DataModelsAcl:WRITE
Add or update (upsert) spaces. For unchanged space specifications, the operation completes without making any changes. We will not update the lastUpdatedTime value for spaces that remain unchanged.
from cognite.client.data_classes.data_modeling import SpaceApply
spaces = [SpaceApply(space="mySpace", description="My first space", name="My Space"),
SpaceApply(space="myOtherSpace", description="My second space", name="My Other Space")]
res = client.data_modeling.spaces.apply(spaces){
"items": [
{
"space": "<string>",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"isGlobal": true,
"description": "<string>",
"name": "<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.
Spaces to add or update.
List of spaces to create/update
1 - 100 elementsShow child attributes
List of spaces
List of spaces
Show child attributes
Was this page helpful?