[]
        
(Showing Draft Content)

Identity-Organization

Identity-Organization

[GET] /api/v2/identity/organizations

Parameters

Name In Type Description Default
includeProps query boolean Whether retrieve the organization properties. For example: false false

Get all organizations' information.

Responses

[200] Success

TenantBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations

Add a new organization.

Request Body

Description: The organization creation model.

Type: application/json

TenantCreateModel

Responses

[201] Created

TenantBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}

Parameters

Name In Type Description
idRequired path string Organization id.

Get specified organization's information.

Responses

[200] Success

TenantBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}

Parameters

Name In Type Description
idRequired path string The organization id.

Modify the specified organization's information.

Request Body

Description: The organization update model.

Type: application/json

TenantUpdateModel

Responses

[200] Success

TenantBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/organizations/{id}

Parameters

Name In Type Description
idRequired path string The organization id.

Delete the specified organization.

Responses

[204] No Content

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/sub-organizations

Parameters

Name In Type Description Default
idRequired path string The organization id.
includeSelf query boolean Whether retrieve the specified organization's information. For example: false false
includeProps query boolean Whether retrieve organization's properties. For example: true true

Get all the sub-organizations of the specified organization.

Responses

[200] Success

TenantBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/ancestor-organizations

Parameters

Name In Type Description
idRequired path string The organization id.

Get all the ancestor organizations of the specified organization.

Responses

[200] Success

TenantBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/users

Parameters

Name In Type Description Default
idRequired path string The organization id.
includeSubOrganizationUsers query boolean Whether retrieve the sub-organization's users. For example: false false

Get the users who belong to the specified organization.

Responses

[200] Success

UserBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations/{id}/users

Parameters

Name In Type Description
idRequired path string The organization id.

Add users to the specified organization.

Request Body

Description: User id list.

Type: application/json

UserListModel

Responses

[200] Success

UserBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}/users

Parameters

Name In Type Description
idRequired path string The organization id.

Update the users who belong to the specified organization.

Request Body

Description: The user list.

Type: application/json

UserListModel

Responses

[200] Success

UserBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/organizations/{id}/users/{userId}

Parameters

Name In Type Description
idRequired path string The organization id.
userIdRequired path string The user id.

Delete the specified user from the specified organization.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/non-org-users

Parameters

Name In Type
idRequired path string

Get the users do not belong to the specified organization.

Responses

[200] Success

UserBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/roles

Parameters

Name In Type Description Default
idRequired path string The organization id.
includeSubOrgRoles query boolean Whether retrieve all the sub-organizations' roles. For example: false false

Get all the roles of the specified organization.

Responses

[200] Success

RoleBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations/{id}/roles

Parameters

Name In Type Description
idRequired path string The organization id.

Add new role to the specified organization.

Request Body

Description: The role name. For example: DataManager

Type: application/json

name

Responses

[201] Created

RoleBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}/roles/{roleId}

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The organization role id.

Update a role of the organziation.

Request Body

Description: The role update model.

Type: application/json

RoleUpdateModel

Responses

[200] Success

RoleBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/roles/{roleId}

Parameters

Name In Type Description
idRequired path string The tenant id.
roleIdRequired path string The role id.

Get the specified tenant's roles.

Responses

[200] Success

RoleBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/organizations/{id}/roles/{roleId}

Parameters

Name In Type Description
idRequired path string The tenant id.
roleIdRequired path string The role id.

Delete the specified role from the specified tenant.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/roles/{roleId}/users

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.

Get the users belong to the specified organization role.

Responses

[200] Success

UserBizModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations/{id}/roles/{roleId}/users

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.

Add users to the specified organization role.

Request Body

Description: User ids.

Type: application/json

UserListModel

Responses

[200] Success

UserBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}/roles/{roleId}/users

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.

Update the users of the specified organization role.

Request Body

Description: User ids.

Type: application/json

UserListModel

Responses

[200] Success

UserBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/organizations/{id}/roles/{roleId}/users/{userId}

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.
userIdRequired path string The user id.

Delete the users from the specified organization role.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/roles/{roleId}/permissions

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.

Get the permissions of the specified organization role.

Responses

[200] Success

PermissionModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}/roles/{roleId}/permissions

Parameters

Name In Type Description
idRequired path string The organization id.
roleIdRequired path string The role id.

Update the permissions of the specified organization role.

Request Body

Description: Permission list.

Type: application/json

PermissionListModel

Responses

[200] Success

PermissionModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/{id}/permissions

Parameters

Name In Type Description
idRequired path string The organization id.

Get the specified organization's permissions.

Responses

[200] Success

PermissionModel

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/{id}/permissions

Parameters

Name In Type Description
idRequired path string The organization id.

Update the specified organization's permissions.

Request Body

Description: Permission list.

Type: application/json

PermissionListModel

Responses

[200] Success

PermissionModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/props

Parameters

Name In Type Default
includeBuiltInProps query boolean false

Get all organization properties.

Responses

[200] Success

TenantPropModel

Type: [application/json]

[POST] /api/v2/identity/organizations/props

Add a new organization property.

Request Body

Description: The new organization property.

Type: application/json

TenantPropInfoModel

Responses

[201] Created

TenantPropModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/organizations/props/{propId}

Parameters

Name In Type Description
propIdRequired path string The organization property id.

Get the specified organization property's information.

Responses

[200] Success

TenantPropModel

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/organizations/props/{propId}

Parameters

Name In Type Description
propIdRequired path string The organization property id.

Modify the specified organization property.

Request Body

Description: The organization property information.

Type: application/json

TenantPropInfoModel

Responses

[200] Success

TenantPropModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/organizations/props/{propId}

Parameters

Name In Type Description
propIdRequired path string The organization property id.

Delete the specified organization property.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations/{id}/move

Parameters

Name In Type Description
idRequired path string The organization id.

Modify the order of the specified organization.

Request Body

Description: The offset to the current order. For example: -1

Type: application/json

int32

Responses

[204] No Content

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/organizations/{id}/migrate

Parameters

Name In Type Description
idRequired path string The organization id.

Migrate the specified organization.

Request Body

Description: The organization migration model.

Type: application/json

OrganizationMigrationModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

Models

Ƭ TenantBizModel

Name Type
idNullable string
nameNullable string
descriptionNullable string
enabled Boolean
pathNullable string
parentTenantIdNullable string
order int32
createTime ISO DateTime Sting
propsNullable Array<TenantPropValueBizModel>

Ƭ TenantPropValueBizModel

Name Type Description Example
idNullable string The unique identity of the organization property value. "393B6B48-4C8B-4B0F-9175-A01177CBD328"
allowSubTenantEditing Boolean Whether allow the sub-organizations to edit this property value. true
editable Boolean Whether the property value is editable. true
allowSubTenantViewing Boolean Whether allow the sub-organizations to view this property value. true
viewable Boolean Whether the property value is viewable. true
valuesNullable Array<string> The property values. ["value1","value2","value3"]
nameRequired string The organization property name. "OrganizationAddress"
descriptionNullable string The description text of the organization property. "The address of the organization."
required Boolean Whether the property is required. true
valueType PropertyValueType
multivalued Boolean Whether the property can have multiple values. true
sensitive Boolean Whether the property is sensitive.

Ƭ PropertyValueType

Enum:

  • Text

  • Boolean

  • Integer

  • Float

  • Date

  • DateTime

    The value type of the organization property.

    * Text - 0 - A normal string.
    * Boolean - 1 - A boolean value.
    * Integer - 2 - A integer number.
    * Float - 3 - A float number.
    * Date - 4 - A date
    * DateTime - 5 - A datetime

Ƭ ApiErrorResult

The model used to describe all the errors that occurred when processing a web request.

Name Type Description
errorsNullable Array<ApiError> The errors list.

Ƭ ApiError

The model used to describe an error that occurred when processing a web request.

Name Type Description
codeNullable string The unique identity of the error.
messageNullable string The description text of the error.
contextNullable string Some related context information of the error.

Ƭ TenantCreateModel

Name Type Description Example
parentTenantIdNullable string The parent organization id, null means to create a organization under the "Global" organization. "3FEF2BB9-4D25-47AA-8196-928CEC86A7C6"
nameNullable string The organization name. "GrapeCity"
descriptionNullable string The description text of the organization. "This is a sample organization."
propsNullable Array<TenantPropValueBizModel> The tenant properties.

Ƭ TenantUpdateModel

Name Type Description Example
nameNullable string The organization name. "GrapeCity"
descriptionNullable string The description text of the organization. "This is a sample organization."
propsNullable Array<TenantPropValueBizModel> The tenant properties.

Ƭ UserBizModel

Name Type
idNullable string
usernameNullable string
emailNullable string
mobileNullable string
providerNullable string
avatarNullable string
firstNameNullable string
lastNameNullable string
creationTime ISO DateTime Sting
status UserStatus
fullNameNullable string
organizationIdPathNullable string
lastLoginTimeNullable ISO DateTime Sting
passwordChangeTimeNullable ISO DateTime Sting
passwordExpirationPolicy UserPasswordExpirationPolicy
rolesNullable Array<string>
customizePropertiesNullable Array<string>
extraClaimsNullable string
tenantRolesNullable Array<string>

Ƭ UserStatus

Enum:

  • Normal

  • Disabled

    The status of user.

    * Normal - 1 - Normal status.
    * Disabled - 2 - Disabled status.

Ƭ UserPasswordExpirationPolicy

Enum:

  • FollowSystem
  • NeverExpire

Ƭ UserListModel

Name Type Description Example
userIdsRequired Array<string> The user ids list. ["5A0E8745-A515-42E3-B225-F7DDE06B5632","9B987F4B-894C-48CC-836F-D67522B0A680"]

Ƭ RoleBizModel

Name Type Description Example
idNullable string The unique identity of the role. "972B2A4C-8C61-4E3B-AD3D-6E889FE8D761"
nameNullable string The display name of the role. "DataManager"
creatorIdNullable string The creator id of the role. "CF61388C-D7CD-4A61-8FB3-A8A0B6915F3E"
createTime ISO DateTime Sting The creation time of the role. "2000-01-01 00:00:00.000"
isBuiltin Boolean Whether it is a built-in role. false
allowEditPermissions Boolean Whether allow to edit the permissions of the role. true
permissionsNullable Array<string> The permissions of the role. ["view-report","view-dashboard"]
membersNullable Array<string> The member id list of the role. ["CD079B35-4A56-4F42-845D-726B09E08EA9","EAAA677A-7B0A-4471-99F0-4C3F1D31738C"]
tenantIdNullable string The id of the organization to which the role belongs. "D6FD678D-45B5-4222-BA81-58BE2E578F91"
modifiedByNullable string The modifiedBy id of the role. "CF61388C-D7CD-4A61-8FB3-A8A0B6915F3E"
modifiedTime ISO DateTime Sting The modified time of the role. "2000-01-01 00:00:00.000"

Ƭ RoleUpdateModel

Name Type
nameNullable string

Ƭ PermissionModel

Name Type
nameNullable string
descriptionNullable string
enabled Boolean
order int32
moduleNullable string
categoryNullable string
isCustomPermission Boolean

Ƭ PermissionListModel

Name Type Description Example
permissionsRequired Array<string> The permissions list. ["view-dashboard","view-report"]

Ƭ TenantPropModel

Name Type
idNullable string
nameRequired string
descriptionNullable string
required Boolean
valueType PropertyValueType
multivalued Boolean
sensitive Boolean
tenantpropRestrictionsNullable Array<TenantPropRestrictionModel>
tenantPropValuesNullable Array<TenantPropValueModel>

Ƭ TenantPropRestrictionModel

Name Type
tenantIdRequired string
tenantPropIdRequired string
allowSubTenantEditing Boolean
allowSubTenantViewing Boolean
tenant TenantModel
tenantProp TenantPropModel

Ƭ TenantPropValueModel

Name Type
idNullable string
tenantIdRequired string
tenantPropIdRequired string
valueNullable string
tenant TenantModel
tenantProp TenantPropModel

Ƭ TenantModel

Name Type Default
idNullable string
nameRequired string
descriptionNullable string
enabled Boolean
parentTenantIdNullable string
pathNullable string
order int32
createTime ISO DateTime Sting
isSyncedFromExternal Boolean false
providerIdNullable string "local"
parentTenant TenantModel
tenantPropValuesNullable Array<TenantPropValueModel>
userTenantsNullable Array<UserTenantModel>
tenantRolesNullable Array<RoleModel>
tenantSettingsNullable Array<TenantSettingModel>
tenantPropRestrictionsNullable Array<TenantPropRestrictionModel>

Ƭ UserTenantModel

Name Type
userIdRequired string
tenantIdRequired string
user UserModel
tenant TenantModel

Ƭ RoleModel

Name Type Default
idNullable string
nameNullable string
displayNameNullable string
creatorIdNullable string
createTime ISO DateTime Sting
isBuiltin Boolean
allowEditPermissions Boolean true
tenantIdNullable string
isSyncedFromExternal Boolean false
providerIdNullable string "local"
modifiedByNullable string
modifiedTime ISO DateTime Sting
creator UserModel
userRolesNullable Array<UserRoleModel>
permissionsNullable Array<RolePermissionModel>
tenant TenantModel

Ƭ TenantSettingModel

Name Type
idNullable string
tenantIdNullable string
pluginKeyNullable string
settingsGroupKeyNullable string
settingsNullable string
tenant TenantModel
settingsTextNullable string

Ƭ UserModel

Name Type Default
idNullable string
usernameNullable string
passwordHashNullable string
emailNullable string
mobileNullable string
providerIdNullable string
avatarNullable string
firstNameNullable string
lastNameNullable string
creationTime ISO DateTime Sting
enabled Boolean
fullNameNullable string
organizationIdPathNullable string ""
isSyncedFromExternal Boolean false
lastLoginTimeNullable ISO DateTime Sting
passwordChangeTimeNullable ISO DateTime Sting
passwordExpirationPolicy UserPasswordExpirationPolicy
userRolesNullable Array<UserRoleModel>
userGroupsNullable Array<UserGroupModel>
userPropertiesNullable Array<UserPropertyModel>
extraClaimsNullable Array<UserClaimModel>
userTenantsNullable Array<UserTenantModel>
userAvatar UserAvatarModel

Ƭ UserRoleModel

Name Type
userIdNullable string
roleIdNullable string
user UserModel
role RoleModel

Ƭ UserGroupModel

Name Type
groupIdNullable string
userIdNullable string
group GroupModel
user UserModel

Ƭ UserPropertyModel

Name Type
idNullable string
userIdRequired string
propertyIdRequired string
propertyValueNullable string
user UserModel
property CustomizePropertyModel

Ƭ UserClaimModel

Name Type
nameNullable string
valueNullable string
userIdNullable string
user UserModel

Ƭ UserAvatarModel

Name Type
userIdNullable string
imageNullable string
lastModified ISO DateTime Sting
user UserModel

Ƭ RolePermissionModel

Name Type
roleIdNullable string
permissionNameNullable string
role RoleModel

Ƭ GroupModel

Name Type
idNullable string
nameNullable string
creatorIdNullable string
creationTime ISO DateTime Sting
parentGroupIdNullable string
pathNullable string
parentGroup GroupModel
creator UserModel
userGroupsNullable Array<UserGroupModel>

Ƭ CustomizePropertyModel

Name Type
idNullable string
nameNullable string
showInList Boolean
allowUserEdit Boolean
multivalued Boolean
showInProfile Boolean
valueType PropertyValueType
sensitive Boolean
availableValuesNullable Array<CustomizePropertyAvailableValueModel>
userPropertiesNullable Array<UserPropertyModel>

Ƭ CustomizePropertyAvailableValueModel

Name Type
customizePropertyIdNullable string
valueNullable string
customizeProperty CustomizePropertyModel

Ƭ TenantPropInfoModel

Name Type Description Example
nameRequired string The organization property name. "OrganizationAddress"
descriptionNullable string The description text of the organization property. "The address of the organization."
required Boolean Whether the property is required. true
valueType PropertyValueType
multivalued Boolean Whether the property can have multiple values. true
sensitive Boolean Whether the property is sensitive.

Ƭ OrganizationMigrationModel

Name Type Description Example
parentOrgIdNullable string The target parent organization id. "EC6AC4F7-B689-4673-A6B5-C9FE6C979D47"
order int32 The order of the organization. 1