Organization

View as Markdown

Organization

Organization is the top-most entity in the hierarchy of entities in Contentstack. Users, stacks—and consequently, the resources within the stacks—are part of an Organization. As a result, an Organization lets you manage users and stacks from one administrative panel.

AddUser

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

NameTypeDescription
orgInvite (required)List<UserInvitation>

List of User invitation.

stackInviteDictionary<string, List<UserInvitation>>

Stack Uid with user invitation details.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

UserInvitation invitation = new UserInvitation()

{

        Email = "<EMAIL>",

        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }

};

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>")

.AddUser(

new System.Collections.Generic.List<UserInvitation>()

    {

        invitation

    },

 new Dictionary<string, List<UserInvitation>> ()

    {

          "<STACK_UID>"= invitation

    }

 );

AddUserAsync

The Add users to organization call allows you to send invitations to add users to your organization. Only the owner or the admin of the organization can add users.

NameTypeDescription
orgInvite (required)List<UserInvitation>

List of User invitation.

stackInviteDictionary<string, List<UserInvitation>>

Stack Uid with user invitation details.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

UserInvitation invitation = new UserInvitation()

{

        Email = "<EMAIL>",

        Roles = new System.Collections.Generic.List<string>() { "<ROLE_UID>" }

};

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>")

.AddUserAsync(

new System.Collections.Generic.List<UserInvitation>()

    {

        invitation

    },

 new Dictionary<string, List<UserInvitation>> ()

    {

          "<STACK_UID>"= invitation

    }

 );

GetInvitations

The Get all organization invitations call gives you a list of all the Organization invitations.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetInvitations();

GetInvitationsAsync

The Get all organization invitations call gives you a list of all the Organization invitations.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetInvitationsAsync();

GetOrganizations

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization().GetOrganizations();

GetOrganizationsAsync

The Get all/single organizations call lists all organizations related to the system user in the order that they were created.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization().GetOrganizationsAsync();

GetStacks

The get Stacks call gets all the Stack within the Organization.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").GetStacks();

GetStacksAsync

The get Stacks call gets all the Stack within the Organization.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").GetStacksAsync();

RemoveUser

The Remove users from organization request allows you to remove existing users from your organization.

NameTypeDescription
emailsList<string>

List of emails to be remove from the Organization.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").RemoveUser(new List() { "<EMAIL>" });

RemoveUserAsync

The Remove users from organization request allows you to remove existing users from your organization.

NameTypeDescription
emailsList<string>

List of emails to be remove from the Organization.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RemoveUserAsync(new List() { "<EMAIL>" });

ResendInvitation

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

NameTypeDescription
shareUidstring

Uid for share invitation send to user.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").ResendInvitation("<SHARE_UID>");

ResendInvitationAsync

The Resend pending organization invitation call allows you to resend Organization invitations to users who have not yet accepted the earlier invitation. Only the owner or the admin of the Organization can resend the invitation to add users to an Organization.

NameTypeDescription
shareUidstring

Uid for share invitation send to user.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").ResendInvitationAsync("<SHARE_UID>");

Roles

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").Roles();

RolesAsync

The Get all roles in an organization call gives the details of all the roles that are set to users in an Organization.

NameTypeDescription
collectionParameterCollection

Query Parameter collection

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").RolesAsync();

TransferOwnership

The Transfer organization ownership call transfers the ownership of an Organization to another user.

NameTypeDescription
emailstring

The email id of user for transfer.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = client.Organization("<ORG_UID>").TransferOwnership("<EMAIL>");

TransferOwnershipAsync

The Transfer organization ownership call transfers the ownership of an Organization to another user.

NameTypeDescription
emailstring

The email id of user for transfer.

using Contentstack.Management.Core;

using Contentstack.Management.Core.Models;


ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");

ContentstackResponse contentstackResponse = await client.Organization("<ORG_UID>").TransferOwnershipAsync("<EMAIL>");