[]
        
(Showing Draft Content)

Identity-User

Identity-User

[GET] /api/v2/identity/users

Get all users' information.

Parameters

Name Type Located In Description Example
Provider string query The user provider name. "local"
PageSize int32 query The page size. 20
PageNumber int32 query The page number. 1
SearchText string query The search text. "admin"
OrderBy string query The ordered field. "UserName"
OrderType OrderType query The order type, available values are "ASC" and "DESC". "ASC"
Paging Boolean query Whether pagination or not. true
SearchType SearchType query The search type, available values are "None" and "Count". "None"

Response

Status Code: 200

Success

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

[POST] /api/v2/identity/users

Create a new user.

Request Schema

UserCreationModel

Response

Status Code: 201

Created

UserBizModel

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

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

Get user information by id.

Parameters

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

Response

Status Code: 200

Success

UserBizModel

Status Code: 404

Not Found

ApiErrorResult

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

Update user information.

Parameters

Name Type Located In Description
idRequired string path User id.
ignoreRoles Boolean query Whether ignore the user roles.

Request Schema

UserUpdateModel

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

Remove a exist user.

Parameters

Name Type Located In Description
idRequired string path 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

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

Delete the specified users.

Request Schema

BatchDeleteUsersModel

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

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

Get a user's roles.

Parameters

Name Type Located In Description
idRequired string path User id.

Response

Status Code: 200

Success

Array<string>

Status Code: 404

Not Found

ApiErrorResult

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

Enable/Disable user.

Parameters

Name Type Located In Description
idRequired string path User id.

Request Schema

boolean

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Change the specified user's password.

Parameters

Name Type Located In Description
idRequired string path User id.

Request Schema

password

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 403

Forbidden

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Change user password.

Request Schema

ChangePasswordModel

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Import users.

Response

Status Code: 200

Success

ImportUserResult

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

Export all users' information.

Response

Status Code: 200

Success

binary

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

Export user information template.

Response

Status Code: 200

Success

binary

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

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

Parameters

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

Response

Status Code: 200

Success

binary

Status Code: 404

Not Found

ApiErrorResult

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

Remove the useless user template file.

Parameters

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

Response

Status Code: 204

No Content

Status Code: 404

Not Found

ApiErrorResult

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

Get locked users.

Response

Status Code: 200

Success

LockedUserModel

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

Unlock user by id.

Parameters

Name Type Located In Description
idRequired string path User id.

Response

Status Code: 204

No Content

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

Get available user context.

Response

Status Code: 200

Success

UserContextItem

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

Get current user's claims.

Response

Status Code: 200

Success

SimpleClaimModel

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

Get the specified user's avatar.

Parameters

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

Response

Status Code: 200

Success

binary

Status Code: 304

Not Modified

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 401

Unauthorized

ApiErrorResult

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

Add or update current user's avatar.

Request Schema

binary

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

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

Get current user's profile information.

Response

Status Code: 200

Success

UserProfileRequestModel

Status Code: 400

Bad Request

ApiErrorResult

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

Update current user's profile information.

Request Schema

UserProfileRequestModel

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

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

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

Response

Status Code: 200

Success

SharingRoleModel

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

Get the permissions of the specified user.

Parameters

Name Type Located In Description
idRequired string path User id.

Response

Status Code: 200

Success

Array<string>

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Get all the organizations the current user belongs to.

Response

Status Code: 200

Success

UserTenantBizModel

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

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

Request Schema

organizationId

Response

Status Code: 204

No Content

Status Code: 400

Bad Request

ApiErrorResult

Status Code: 404

Not Found

ApiErrorResult

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

Delete the current user's default organization setting.

Response

Status Code: 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=7.1.70.0, Culture=neutral, PublicKeyToken=null]]

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

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

Ƭ UserCreationModel

Name Type Description Example
idNullable string The user id, can be null. "8760F2A1-C217-480F-8EB0-1EE9DB3AE2C5"
username 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"
email string The email address of user, required. "example@gmail.com"
mobileNullable string The mobile number. "88888888888"
passwordNullable string The password of user. "MyPassword"
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"
email 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"
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
userIds Array<string> The user ids list. ["1FB74CF4-FFB0-492F-A2D5-29AA761955CF","DD695D78-015D-43E2-9F3A-8919F4F534FE"]

Ƭ ChangePasswordModel

Name Type Description Example
oldPassword string The old password. "OldPassword"
newPassword string The new password. "NewPassword"
newPasswordConfirm string The confirm password. "NewPassword"

Ƭ ImportUserResult

Name Type Description Example
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 Description Example
idNullable string
usernameNullable string
providerNullable string

Ƭ UserContextItem

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

Ƭ 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 Example
typeNullable string Claim type.
valueNullable string Claim 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 Example
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 Example
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.