Organization
Organization
Organization is the top-level entity in the hierarchy of Contentstack, consisting of stacks and stack resources, and users. Organization allows easy management of projects as well as users within the Organization.
add_users
The add_users method adds users to the organization.
| Name | Type | Description |
|---|---|---|
| user_data (required) | str | The email address of the user whom you intend to add in the organization. |
data = {
"share": {
"users": {
"[email protected]": ["{****}"],
"[email protected]": ["{****}"]
},
"stacks": {
"[email protected]": {
"{{apiKey}}": ["{****}"]
},
"[email protected]": {
}
},
"message": "Invitation message"
}
}
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').organization_add_users(data).json()fetch
The fetch method retrieves the organization entries.
| Name | Type | Description |
|---|---|---|
| organization_uid (required) | str | UID of the organization |
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').fetch().json()find
The find method searches the organization entries.
import contentstack_management client = contentstack_management.Client(authtoken='auth_token') response = client.organizations().find()
logs
The log method retrieves the organization log entries.
| Name | Type | Description |
|---|---|---|
| organization_uid (required) | str | UID of the organization |
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').organization_logs().json()roles
The roles method retrieves the organization roles entries.
| Name | Type | Description |
|---|---|---|
| organization_uid (required) | str | UID of the organization |
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').get_organization_roles().json()stacks
The stacks method retrieves the organization stacks.
| Name | Type | Description |
|---|---|---|
| organization_uid (required) | str | UID of the organization |
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').organization_stacks()transfer_ownership
The transfer_ownership method transfers the ownership of the organization to another user.
| Name | Type | Description |
|---|---|---|
| data (required) | Dict | The email address of the user to whom you intend to transfer ownership. |
| organization_uid (required) | str | UID of the organization |
data = {
"transfer_to": "[email protected]"
}
import contentstack_management
client = contentstack_management.Client(authtoken='auth_token')
response = client.organizations('organization_uid').transfer_organizations_ownership(data)