curl --request POST \
--url https://auth.cognite.com/api/v1/orgs/{org}/orgs \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "my-org",
"idp": {
"idpVendor": "AZURE_AD",
"issuer": "https://login.microsoftonline.com/some-tenant-id/v2.0"
},
"adminGroupId": "my-external-group",
"adminsCanCreateOrgsInSubtree": false,
"adminsCanCreateProjectsInSubtree": false,
"allowedClusters": [
"westeurope-1",
"asia-northeast1-1"
]
}
]
}
'{
"items": [
{
"id": "my-org",
"parentId": "my-org",
"idp": {
"idpVendor": "AZURE_AD",
"issuer": "https://login.microsoftonline.com/some-tenant-id/v2.0"
},
"adminsCanCreateOrgsInSubtree": false,
"adminsCanCreateProjectsInSubtree": false,
"allowedClusters": [
"westeurope-1",
"asia-northeast1-1"
],
"adminGroupId": "my-external-group"
}
]
}Create a child organization under the specified organization.
Requires the caller to be an admin in the parent organization (i.e. the one on the path), or any of its ancestors.
In addition, the flag adminsCanCreateOrgsInSubtree must be set to true in that organization.
Example: Assume an organization hierarchy like: org-a -> org-b -> org-c.
To create a new organization under org-c, which means calling ‘POST /api/v1/orgs/org-c/orgs’, the caller must be an
admin in at least one of org-a, org-b, or org-c, and adminsCanCreateOrgsInSubtree must be true in that same organization.
curl --request POST \
--url https://auth.cognite.com/api/v1/orgs/{org}/orgs \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "my-org",
"idp": {
"idpVendor": "AZURE_AD",
"issuer": "https://login.microsoftonline.com/some-tenant-id/v2.0"
},
"adminGroupId": "my-external-group",
"adminsCanCreateOrgsInSubtree": false,
"adminsCanCreateProjectsInSubtree": false,
"allowedClusters": [
"westeurope-1",
"asia-northeast1-1"
]
}
]
}
'{
"items": [
{
"id": "my-org",
"parentId": "my-org",
"idp": {
"idpVendor": "AZURE_AD",
"issuer": "https://login.microsoftonline.com/some-tenant-id/v2.0"
},
"adminsCanCreateOrgsInSubtree": false,
"adminsCanCreateProjectsInSubtree": false,
"allowedClusters": [
"westeurope-1",
"asia-northeast1-1"
],
"adminGroupId": "my-external-group"
}
]
}ID of an organization The ID of an organization
3 - 64^([a-z][a-z0-9-]{1,62}[a-z0-9])$"my-org"
A request to create an organization.
1 elementShow child attributes
A successfully created organization
1 elementShow child attributes
Was this page helpful?