[]
        
(Showing Draft Content)

Identity-User

Identity-User

[GET] /api/v2/identity/users

Parameters

Name In Type Description
Provider query string The user provider name.
PageSize query integer The page size.
PageNumber query integer The page number.
SearchText query string The search text.
OrderBy query string The ordered field.
OrderType query The order type, available values are "ASC" and "DESC".
Paging query boolean Whether pagination or not.
SearchType query The search type, available values are "None" and "Count".

Get all users' information.

Responses

[200] Success

GrapeCity.Enterprise.Identity.Models.ModelSearchResponse`1[[GrapeCity.Enterprise.Identity.Database.Models.UserBizModel, GrapeCity.Enterprise.IdentityService, Version=9.0.225.0, Culture=neutral, PublicKeyToken=null]]

Type: [application/json]

[POST] /api/v2/identity/users

Create a new user.

Request Body

Description: The new user model.

Type: application/json

UserCreationModel

Responses

[201] Created

UserBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string The user id.

Get user information by id.

Responses

[200] Success

UserBizModel

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

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

Parameters

Name In Type Description Default
idRequired path string User id.
ignoreRoles query boolean Whether ignore the user roles. false

Update user information.

Request Body

Description: User information.

Type: application/json

UserUpdateModel

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/users/{id}

Parameters

Name In Type Description
idRequired path string User id.

Remove a exist user.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/users/batch-delete

Delete the specified users.

Request Body

Description: Batch delete model.

Type: application/json

BatchDeleteUsersModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string User id.

Get a user's roles.

Responses

[200] Success

Array<string>

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string User id.

Enable/Disable user.

Request Body

Description: Enable or disable user. For example: false

Type: application/json

boolean

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string User id.

Change the specified user's password.

Request Body

Description: The new password. For example: NewPassword

Type: application/json

password

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[403] Forbidden

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/users/me/change-password

Change user password.

Request Body

Description: Change password model.

Type: application/json

ChangePasswordModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/users/import

Import users.

Request Body

Type: multipart/form-data

Key Type Format Encoding
file string binary form

Responses

[200] Success

ImportUserResult

Type: [application/json]

[GET] /api/v2/identity/users/export

Export all users' information.

Responses

[200] Success

binary

Type: [application/vnd.openxmlformats-officedocument.spreadsheetml.sheet]

[GET] /api/v2/identity/users/template

Export user information template.

Responses

[200] Success

binary

Type: [application/vnd.openxmlformats-officedocument.spreadsheetml.sheet]

[GET] /api/v2/identity/users/template/{key}

Parameters

Name In Type Description
keyRequired path string The key of user template file.

Get the users import result file to check the detailed error information.

Responses

[200] Success

binary

Type: [application/vnd.openxmlformats-officedocument.spreadsheetml.sheet]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/users/template/{key}

Parameters

Name In Type Description
keyRequired path string The key of user template file.

Remove the useless user template file.

Responses

[204] No Content

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/users/locked

Get locked users.

Responses

[200] Success

LockedUserModel

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string User id.

Unlock user by id.

Responses

[204] No Content

[GET] /api/v2/identity/users/available-context

Get available user context.

Responses

[200] Success

UserContextItem

Type: [application/json]

[GET] /api/v2/identity/users/me

Get current user's claims.

Responses

[200] Success

SimpleClaimModel

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string The user id.
ignoreDefault query boolean If the user has no custom avatar, true prevents returning the default avatar (returns nothing); otherwise has no effect.

Get the specified user's avatar.

Responses

[200] Success

binary

Type: [application/octet-stream]

[304] Not Modified

[400] Bad Request

ApiErrorResult

Type: [application/json]

[401] Unauthorized

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/users/me/avatar

Add or update current user's avatar.

Request BodyRequired

Type: application/octet-stream, image/jpeg, image/png, image/bmp, image/x-icon, image/gif, image/svg+xml, image/tiff

binary

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/users/me/profile

Get current user's profile information.

Responses

[200] Success

UserProfileRequestModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/users/me/profile

Update current user's profile information.

Request Body

Type: application/json

UserProfileRequestModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/users/me/sharing-roles

Get the roles that the current logged in user can share documents to.

Responses

[200] Success

SharingRoleModel

Type: [application/json]

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

Parameters

Name In Type Description
idRequired path string User id.

Get the permissions of the specified user.

Responses

[200] Success

Array<string>

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/users/me/organizations

Get all the organizations the current user belongs to.

Responses

[200] Success

UserTenantBizModel

Type: [application/json]

[POST] /api/v2/identity/users/me/default-organization

Set the default organization to which the user can directly log in.

Request Body

Description: The organization id. For example: 1E5D7247-450E-4383-B0DD-09D5CF651907

Type: application/json

organizationId

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/users/me/default-organization

Delete the current user's default organization setting.

Responses

[204] No Content

Models

Ƭ OrderType

Enum:

  • ASC

  • DESC

    The order type.

    * ASC - 0 - Ascending order.
    * DESC - 1 - Descending order.

Ƭ SearchType

Enum:

  • None

  • Count

    The search type for searching records.

    * None - 0 - Normal search.
    * Count - 1 - Only retrieve the records count.

Ƭ GrapeCity.Enterprise.Identity.Models.ModelSearchResponse`1[[GrapeCity.Enterprise.Identity.Database.Models.UserBizModel, GrapeCity.Enterprise.IdentityService, Version=9.0.225.0, Culture=neutral, PublicKeyToken=null]]

Name Type Description Example
modelsNullable Array<UserBizModel>
total int32
pageSizeNullable int32 The page size. 20
pageNumberNullable int32 The page number. 1
searchTextNullable string The search text. "admin"
orderByNullable string The ordered field. "UserName"
orderType OrderType
pagingNullable Boolean Whether pagination or not. true
searchType SearchType

Ƭ 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

Ƭ 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.

Ƭ UserCreationModel

Name Type Description Example
idNullable string The user id, can be null. "8760F2A1-C217-480F-8EB0-1EE9DB3AE2C5"
usernameRequired string The user name is required, and can not be modified. "MyUserName"
firstNameNullable string The first name of user. "MyFirstName"
lastNameNullable string The last name of user. "MyLastName"
fullNameNullable string The full name of user. "MyFullName"
emailRequired string The email address of user, required. "example@gmail.com"
mobileNullable string The mobile number. "88888888888"
passwordNullable string The password of user. "MyPassword"
passwordExpirationPolicy UserPasswordExpirationPolicy
providerNullable string The user provider, default value is local. "local"
enabled Boolean Whether the user is enabled or disabled. true
organizationIdNullable string The organization id in which the user exists. "D6F4019D-54FB-4B30-AA84-424010ABA3C5"
managerIdNullable string The organization id of which can manage the user. "14A7B860-32A4-4F2B-BFC2-C511F45022C2"
rolesNullable Array<string> The roles to which the user belongs. ["ReportDesigner","DataManager"]
customPropertiesNullable Array<string> The custom properties. {"Gender":["male"],"ExternalRoles":["DBA","Support"]}

Ƭ UserUpdateModel

Name Type Description Example
firstNameNullable string The first name of user. "MyFirstName"
lastNameNullable string The last name of user. "MyLastName"
fullNameNullable string The full name of user. "MyFullName"
emailRequired string The email address of user, required. "example@gmail.com"
mobileNullable string The mobile number of user. "88888888888"
passwordNullable string The user password, null means do not modify the original password. "MyNewPassword"
passwordExpirationPolicy UserPasswordExpirationPolicy
enabled Boolean Whether enable or disable the user. true
organizationIdNullable string The organization id in which the user exists. "DD6DAFF7-6789-46E3-9294-C4D74542D971"
managerIdNullable string The organization id of which can manage the user. "4DBED725-F4AB-4EC6-AD28-C164613FE294"
rolesNullable Array<string> The roles which the user belongs to. ["ReportDesigner","DataManager"]
customPropertiesNullable Array<string> The custom properties. {"Gender":["male"],"ExternalRoles":["DBA","Support"]}

Ƭ BatchDeleteUsersModel

Name Type Description Example
userIdsRequired Array<string> The user ids list. ["1FB74CF4-FFB0-492F-A2D5-29AA761955CF","DD695D78-015D-43E2-9F3A-8919F4F534FE"]

Ƭ ChangePasswordModel

Name Type Description Example
oldPasswordRequired string The old password. "OldPassword"
newPasswordRequired string The new password. "NewPassword"
newPasswordConfirmRequired string The confirm password. "NewPassword"

Ƭ ImportUserResult

Name Type Description
importedUserCount int32 The count of users that imported successfully.
notImportedUserCount int32 The count of users that imported failed.
detailKeyNullable string The unique key used to retrieve the detailed information about the import errors.
errorMsgNullable string The error message.

Ƭ LockedUserModel

Name Type
idNullable string
usernameNullable string
providerNullable string

Ƭ UserContextItem

Name Type Description
nameNullable string The user context name.
isBuiltIn Boolean Whether it's a built-in user context or not.
multivalued Boolean Whether it's a multi-valued user context or not.
valueType PropertyValueType
sensitive Boolean Whether it's a sensitive user context or not.

Ƭ 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

Ƭ SimpleClaimModel

Name Type Description
typeNullable string Claim type.
valueNullable string Claim value.
displayValueNullable string Claim display value.
valueType PropertyValueType
literalValueTypeNullable string Claim value literal type.

Ƭ UserProfileRequestModel

Name Type Description Example
firstNameNullable string The first name. "MyFirstName"
lastNameNullable string The last name. "MyLastName"
fullNameNullable string The full name. "MyFullName"
mobileNullable string The mobile phone number. "88888888888"
customPropertiesNullable Array<string> The custom properties. {"Gender":["male"],"ExternalRoles":["DBA","Support"]}

Ƭ SharingRoleModel

Name Type Description
idNullable string The role id.
nameNullable string The role name.
tenantIdNullable string The tenant id.
isBuiltIn Boolean Whether it's a built-in role.
permissionsNullable Array<string> The permissions of the role.

Ƭ UserTenantBizModel

Name Type Description
idNullable string The organization id.
nameNullable string The organization name.
pathNullable string The organization path.
isDefault Boolean Whether the organization is the default organization of the user.