[]
        
(Showing Draft Content)

Identity-Organization

Identity-Organization

[GET] /api/v2/identity/organizations

Get all organizations' information.

Parameters

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

Response

Status Code: 200

Success

TenantBizModel

Status Code: 403

Forbidden

ApiErrorResult

[POST] /api/v2/identity/organizations

Add a new organization.

Request Schema

TenantCreateModel

Response

Status Code: 201

Created

TenantBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

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

Get specified organization's information.

Parameters

Name Type Located In Description
idRequired string path Organization id.

Response

Status Code: 200

Success

TenantBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Modify the specified organization's information.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

TenantUpdateModel

Response

Status Code: 200

Success

TenantBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Response

Status Code: 204

No Content

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get all the sub-organizations of the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.
includeSelf Boolean query Whether retrieve the specified organization's information. For example: false

Response

Status Code: 200

Success

TenantBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get all the ancestor organizations of the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Response

Status Code: 200

Success

TenantBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the users who belong to the specified organization.

Parameters

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

Response

Status Code: 200

Success

UserBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Add users to the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

UserListModel

Response

Status Code: 200

Success

UserBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Update the users who belong to the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

UserListModel

Response

Status Code: 200

Success

UserBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the specified user from the specified organization.

Parameters

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

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the users do not belong to the specified organization.

Parameters

Name Type Located In
idRequired string path

Response

Status Code: 200

Success

UserBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get all the roles of the specified organization.

Parameters

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

Response

Status Code: 200

Success

RoleBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Add new role to the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

name

Response

Status Code: 201

Created

RoleBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the specified tenant's roles.

Parameters

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

Response

Status Code: 200

Success

RoleBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the specified role from the specified tenant.

Parameters

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

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the users belong to the specified organization role.

Parameters

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

Response

Status Code: 200

Success

UserBizModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Add users to the specified organization role.

Parameters

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

Request Schema

UserListModel

Response

Status Code: 200

Success

UserBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Update the users of the specified organization role.

Parameters

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

Request Schema

UserListModel

Response

Status Code: 200

Success

UserBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the users from the specified organization role.

Parameters

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

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the permissions of the specified organization role.

Parameters

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

Response

Status Code: 200

Success

PermissionModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Update the permissions of the specified organization role.

Parameters

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

Request Schema

PermissionListModel

Response

Status Code: 200

Success

PermissionModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get the specified organization's permissions.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Response

Status Code: 200

Success

PermissionModel

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Update the specified organization's permissions.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

PermissionListModel

Response

Status Code: 200

Success

PermissionModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get all organization properties.

Parameters

Name Type Located In
includeBuiltInProps Boolean query

Response

Status Code: 200

Success

TenantPropModel

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

Add a new organization property.

Request Schema

TenantPropInfoModel

Response

Status Code: 201

Created

TenantPropModel

Status Code: 400

Bad Request

ApiErrorResult

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

Get the specified organization property's information.

Parameters

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

Response

Status Code: 200

Success

TenantPropModel

Status Code: 404

Not Found

ApiErrorResult

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

Modify the specified organization property.

Parameters

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

Request Schema

TenantPropInfoModel

Response

Status Code: 200

Success

TenantPropModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the specified organization property.

Parameters

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

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Modify the order of the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

int32

Response

Status Code: 204

No Content

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Migrate the specified organization.

Parameters

Name Type Located In Description
idRequired string path The organization id.

Request Schema

OrganizationMigrationModel

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

Models

Ƭ TenantBizModel

Name Type Description Example
idNullable string
nameNullable string
descriptionNullable string
enabled Boolean
pathNullable string
parentTenantIdNullable string
order int32
createTime ISO DateTime Sting
propsNullable 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"]
name 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 Example
errorsNullable ApiError The errors list.

Ƭ ApiError

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

Name Type Description Example
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 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 TenantPropValueBizModel The tenant properties.

Ƭ UserBizModel

Name Type Description Example
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
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.

Ƭ UserListModel

Name Type Description Example
userIds 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 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.
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"

Ƭ PermissionModel

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

Ƭ PermissionListModel

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

Ƭ TenantPropModel

Name Type Description Example
idNullable string
name string
descriptionNullable string
required Boolean
valueType PropertyValueType
multivalued Boolean
sensitive Boolean
tenantpropRestrictionsNullable TenantPropRestrictionModel
tenantPropValuesNullable TenantPropValueModel

Ƭ TenantPropRestrictionModel

Name Type Description Example
tenantId string
tenantPropId string
allowSubTenantEditing Boolean
allowSubTenantViewing Boolean
tenant TenantModel
tenantProp TenantPropModel

Ƭ TenantPropValueModel

Name Type Description Example
idNullable string
tenantId string
tenantPropId string
valueNullable string
tenant TenantModel
tenantProp TenantPropModel

Ƭ TenantModel

Name Type Description Example
idNullable string
name string
descriptionNullable string
enabled Boolean
parentTenantIdNullable string
pathNullable string
order int32
createTime ISO DateTime Sting
parentTenant TenantModel
tenantPropValuesNullable TenantPropValueModel
userTenantsNullable UserTenantModel
tenantRolesNullable RoleModel
tenantSettingsNullable TenantSettingModel
tenantPropRestrictionsNullable TenantPropRestrictionModel

Ƭ UserTenantModel

Name Type Description Example
userId string
tenantId string
user UserModel
tenant TenantModel

Ƭ RoleModel

Name Type Description Example
idNullable string
nameNullable string
creatorIdNullable string
createTime ISO DateTime Sting
isBuiltin Boolean
allowEditPermissions Boolean
tenantIdNullable string
creator UserModel
userRolesNullable UserRoleModel
permissionsNullable RolePermissionModel
tenant TenantModel

Ƭ TenantSettingModel

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

Ƭ UserModel

Name Type Description Example
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
userRolesNullable UserRoleModel
userGroupsNullable UserGroupModel
userPropertiesNullable UserPropertyModel
extraClaimsNullable UserClaimModel
userTenantsNullable UserTenantModel
userAvatar UserAvatarModel

Ƭ UserRoleModel

Name Type Description Example
userIdNullable string
roleIdNullable string
user UserModel
role RoleModel

Ƭ UserGroupModel

Name Type Description Example
groupIdNullable string
userIdNullable string
group GroupModel
user UserModel

Ƭ UserPropertyModel

Name Type Description Example
idNullable string
userId string
propertyId string
propertyValueNullable string
user UserModel
property CustomizePropertyModel

Ƭ UserClaimModel

Name Type Description Example
nameNullable string
valueNullable string
userIdNullable string
user UserModel

Ƭ UserAvatarModel

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

Ƭ RolePermissionModel

Name Type Description Example
roleIdNullable string
permissionNameNullable string
role RoleModel

Ƭ GroupModel

Name Type Description Example
idNullable string
nameNullable string
creatorIdNullable string
creationTime ISO DateTime Sting
parentGroupIdNullable string
pathNullable string
parentGroup GroupModel
creator UserModel
userGroupsNullable UserGroupModel

Ƭ CustomizePropertyModel

Name Type Description Example
idNullable string
nameNullable string
showInList Boolean
allowUserEdit Boolean
multivalued Boolean
showInProfile Boolean
valueType PropertyValueType
sensitive Boolean
availableValuesNullable CustomizePropertyAvailableValueModel
userPropertiesNullable UserPropertyModel

Ƭ CustomizePropertyAvailableValueModel

Name Type Description Example
customizePropertyIdNullable string
valueNullable string
customizeProperty CustomizePropertyModel

Ƭ TenantPropInfoModel

Name Type Description Example
name 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