[]
        
(Showing Draft Content)

Identity

Identity

[POST] /api/v2/identity/authorization-token

Create and save a new token.

Request Body

Description: Built-in keys: User, Password, Lifetime, OrganizationPath. For example: {"User":"admin", "Password":"admin_password", "OrganizationPath":"/", "Lifetime":3600}. You can specify more custom keys you need, for example: {"my_key1":"value1", "my_key2":"value2"}.

Type: application/json

any

Responses

[200] Success

AuthTokenResponseModel

Type: [application/json]

[400] Bad Request

ServerPluginError

Type: [application/json]

[DELETE] /api/v2/identity/authorization-token/{authToken}

Parameters

Name In Type Description
authTokenRequired path string Authentication token which will be deleted.

Delete specified authentication token and return this token info.

Responses

[200] Success

AuthToken

Type: [application/json]

[400] Bad Request

ServerPluginError

Type: [application/json]

[GET] /api/v2/identity/authorization-token/settings

Get authentication token settings.

Responses

[200] Success

TokenSettingsResponseModel

Type: [application/json]

[PUT] /api/v2/identity/authorization-token/settings

Save authentication token settings.

Request Body

Type: application/json

TokenSettingsRequestModel

Responses

[204] No Content

[400] Bad Request

ServerPluginError

Type: [application/json]

[GET] /api/v2/identity/claim-mappings

Parameters

Name In Type Description
onlyNames query boolean Whether only retrieve the claim names. For example: true

Get all claim mappings.

Responses

[200] Success

ClaimMappingModel

Type: [application/json]

[POST] /api/v2/identity/claim-mappings

Add a new claim mapping.

Request Body

Description: The claim mapping model.

Type: application/json

ClaimMappingCreationModel

Responses

[201] Created

ClaimMappingModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/claim-mappings/{id}

Parameters

Name In Type Description
idRequired path string The claim mapping id.

Get the specified claim mapping.

Responses

[200] Success

ClaimMappingModel

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [text/plain; charset=utf-8]

[PUT] /api/v2/identity/claim-mappings/{id}

Parameters

Name In Type Description
idRequired path string The claim mapping id.

Modify the specified claim mapping.

Request Body

Description: The new claim mapping model.

Type: application/json

ClaimMappingCreationModel

Responses

[200] Success

ClaimMappingModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/claim-mappings/{id}

Parameters

Name In Type Description
idRequired path string The claim mapping id.

Delete the specified claim mapping.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/custom-properties

Get all customize properties.

Responses

[200] Success

CustomizePropertyBizModel

Type: [application/json]

[POST] /api/v2/identity/custom-properties

Add a new customize property.

Request Body

Description: The custom property model.

Type: application/json

CustomPropertyCreationModel

Responses

[201] Created

CustomizePropertyBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/custom-properties/{id}

Parameters

Name In Type Description
idRequired path string The custom property's id.

Get the specified customize property's information.

Responses

[200] Success

CustomizePropertyBizModel

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/custom-properties/{id}

Parameters

Name In Type Description
idRequired path string The custom property id.

Delete the specified customize property.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/custom-properties/{id}

Parameters

Name In Type Description
idRequired path string The custom property id.

Update the specified customize property's information.

Request Body

Description: The custom property update model.

Type: application/json

CustomPropertyUpdateModel

Responses

[200] Success

CustomizePropertyBizModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/custom-properties/{id}/available-values-validation

Parameters

Name In Type Description
idRequired path string The custom property id.

Validate the new available values for the specified customize property.

Request Body

Description: The available values list.

Type: application/json

CustomPropertyAvailableValuesModel

Responses

[200] Success

CustomPropertyAvailableValuesValidationModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/permissions

Parameters

Name In Type Description
enabled query boolean Whether only get the enabled/disabled permissions. For example: true

Get all permissions.

Responses

[200] Success

PermissionModel

Type: [application/json]

[GET] /api/v2/identity/security-providers

Parameters

Name In Type Description
available query boolean Whether only get all the available security providers.

Get all the security providers.

Responses

[200] Success

SecurityProviderModel

Type: [application/json]

[PUT] /api/v2/identity/security-providers/{name}

Parameters

Name In Type Description
nameRequired path string The security provider name.

Update the specified security provider's settings.

Request Body

Description: The security provider settings.

Type: application/json

SecurityProviderModel

Responses

[200] Success

SecurityProviderModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[DELETE] /api/v2/identity/security-providers/{name}

Parameters

Name In Type
nameRequired path string

Delete the specified security provider.

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/security-providers/enable

Enable or disable the specified security providers.

Request Body

Description: The security provider enable model.

Type: application/json

SecurityProviderEnableModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/security-providers/move

Update the ordinal of the specified security provider.

Request Body

Description: The security provider move model.

Type: application/json

SecurityProviderMoveModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/security-providers/reload

Reload all security providers.

Responses

[200] Success

SecurityProviderModel

Type: [application/json]

[GET] /api/v2/identity/security-providers/export

Export security providers.

Responses

[200] Success

SecurityProviderModel

Type: [application/json]

[POST] /api/v2/identity/security-providers/import

Import security providers.

Request Body

Description: The security provider import model.

Type: application/json

SecurityProvidersImportModel

Responses

[200] Success

SecurityProviderModel

Type: [application/json]

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/sys-config

Get the system configuration record.

Responses

[200] Success

SystemConfigModel

Type: [application/json]

[PUT] /api/v2/identity/sys-config

Update the system configuration.

Request Body

Description: The system configuration.

Type: application/json

SystemConfigBizModel

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/sys-config/name

Update the company name.

Request Body

Description: The system name. For example: GrapeCity

Type: application/json

data

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/sys-config/icon

Update the icon of the system.

Request Body

Description: The base64 string of the icon. For example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...

Type: application/json

data

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/sys-config/icon

Get system icon.

Responses

[200] Success

byte

Type: [image/x-icon]

Update the logo displayed in login page.

Request Body

Description: The base64 string of the logo. For example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...

Type: application/json

data

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/sys-config/bgimage

Update the background image displayed in login page.

Request Body

Description: The base64 string of the background image. For example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...

Type: application/json

data

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/sys-config/password-policy

Get the system password policy.

Responses

[200] Success

PasswordPolicyInfoModel

Type: [application/json]

[PUT] /api/v2/identity/sys-config/password-policy

Update the system password policy.

Request Body

Description: The password policy name. For example: StrongPasswordPolicy

Type: application/json

data

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/sys-config/locked-time

Get locked time.

Responses

[200] Success

int32

Type: [application/json]

[PUT] /api/v2/identity/sys-config/locked-time

Update locked time.

Request Body

Description: The locked time, in minutes. For example: 60

Type: application/json

int32

Responses

[204] No Content

[GET] /api/v2/identity/sys-config/show-global-organization

Retrieve whether the global organization is enabled or not.

Responses

[200] Success

[PUT] /api/v2/identity/sys-config/css

Update the custom CSS content.

Request Body

Description: The custom CSS content. For example: body { font-family: sans-serif; }

Type: application/json

data

Responses

[204] No Content

[PUT] /api/v2/identity/sys-config/html

Update the custom HTML content.

Request Body

Description: The custom HTML content. For example: Custom HTML Content

Type: application/json

data

Responses

[204] No Content

[GET] /api/v2/identity/sys-config/email-settings

Get the email settings.

Responses

[200] Success

EmailSettingSMTPSettings

Type: [application/json]

[404] Not Found

ApiErrorResult

Type: [application/json]

[PUT] /api/v2/identity/sys-config/email-settings

Update email settings.

Request Body

Description: The email settings.

Type: application/json

EmailSettingSMTPSettings

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[GET] /api/v2/identity/sys-config/security-settings

Get security related settings, include 'PasswordPolicy', 'LockedTime', 'AllowUserResetPassword', and 'CookieLifetime'.

Responses

[200] Success

SystemConfigSecuritySettings

Type: [application/json]

[PUT] /api/v2/identity/sys-config/security-settings

Update security related settings, include 'PasswordPolicy', 'LockedTime', 'AllowUserResetPassword', and 'CookieLifetime'.

Request Body

Description: The security settings.

Type: application/json

SystemConfigSecuritySettings

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

[POST] /api/v2/identity/sys-config/global-organization

Show/Hide the global organization.

Request Body

Description: Whether show or hide the global organization in the login page. For example: true

Type: application/json

boolean

Responses

[204] No Content

[GET] /api/v2/identity/sys-config/tfa

Get the two-factor authentication settings.

Responses

[200] Success

SystemConfigTfaSettings

Type: [application/json]

[PUT] /api/v2/identity/sys-config/tfa

Update the two-factor authentication settings.

Request Body

Type: application/json

SystemConfigTfaSettings

Responses

[204] No Content

[400] Bad Request

ApiErrorResult

Type: [application/json]

Models

Ƭ AuthTokenResponseModel

Represent an authentication token response model.

Name Type Description
authTokenNullable string Get or set authentication token.

Ƭ ServerPluginError

Server plugin error

Name Type Description
codeNullable string error code
messageNullable string error message
contextNullable string error context
innerError ServerPluginError
extensionsNullable any Extended result

Ƭ AuthToken

Name Type
authTokenKeyNullable string
tokenNullable string
cookieLifetime int32

Ƭ TokenSettingsResponseModel

Get or set authentication token settings.

Name Type Description
lifetimeNullable int32 Get or set token lifetime.

Ƭ TokenSettingsRequestModel

Get or set authentication token settings model.

Name Type Description Example
lifetimeNullable int32 Get or set token lifetime. Unit: Second 3600

Ƭ ClaimMappingModel

Name Type
idNullable string
nameRequired string
propNameRequired string
isBuiltIn Boolean

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

Ƭ ClaimMappingCreationModel

Name Type Description Example
nameRequired string The claim name. "gender"
propNameRequired string The custom property name. "Gender"

Ƭ CustomizePropertyBizModel

Name Type
idNullable string
nameNullable string
showInListNullable Boolean
allowUserEditNullable Boolean
multivaluedNullable Boolean
showInProfileNullable Boolean
availableValuesNullable Array<string>
valueType PropertyValueType
sensitiveNullable Boolean

Ƭ 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

Ƭ CustomPropertyCreationModel

Name Type Description Example
nameRequired string The custom property name. "Gender"
showInListNullable Boolean Whether show the custom property in the user list. true
allowUserEditNullable Boolean Whether allow the user to edit this custom property. true
multivaluedNullable Boolean Whether this custom property is a multi-valued property. false
showInProfileNullable Boolean Whether show this custom property in the user profile page. true
availableValuesNullable Array<string> The available values of this custom property. ["male","female"]
valueType PropertyValueType
sensitiveNullable Boolean Whether the custom property is sensitive.

Ƭ CustomPropertyUpdateModel

Name Type Description Example
nameRequired string The custom property name. "Gender"
showInListNullable Boolean Whether show the custom property in the user list. true
allowUserEditNullable Boolean Whether allow the user to edit this custom property. true
multivaluedNullable Boolean Whether this custom property is a multi-valued property. false
showInProfileNullable Boolean Whether show this custom property in the user profile page. true
availableValuesNullable Array<string> The available values of this custom property. ["male","female"]
valueType PropertyValueType
sensitiveNullable Boolean Whether the custom property is sensitive.

Ƭ CustomPropertyAvailableValuesValidationModel

Name Type Description
hasInvalidValues Boolean Whether there are some invalid values.
invalidValuesNullable Array<string> The invalid values list.

Ƭ CustomPropertyAvailableValuesModel

Name Type Description Example
availableValuesRequired Array<string> The available values of the custom property. ["male","female"]

Ƭ PermissionModel

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

Ƭ SecurityProviderModel

Name Type Description Example
providerNameNullable string The name of the security provider. "AD Security Provider"
descriptionNullable string The description text of the security provider. "The built-in AD security provider."
ordinal int32 The ordinal of the security provider. 1
enabled Boolean Whether the security provider is enabled. true
settingsNullable Array<ConfigurationItem> The configuration items.

Ƭ ConfigurationItem

Name Type
nameNullable string
displayNameNullable string
descriptionNullable string
valueType ConfigurationItemValueType
valueNullable any
restriction ConfigurationItemRestriction

Ƭ ConfigurationItemValueType

Enum:

  • Text

  • Boolean

  • Number

  • Password

    The value type of the configuration item.

    * Text - 0 - A normal string.
    * Boolean - 1 - A boolean value.
    * Number - 2 - A number.
    * Password - 3 - A string used as a password.

Ƭ ConfigurationItemRestriction

Enum:

  • Mandatory

  • Optional

    The restriction of the configuration item.

    * Mandatory - 0 - Means that this configuration item is required.
    * Optional - 1 - Means that this configuration item is optional.

Ƭ SecurityProviderEnableModel

Name Type Description Example
providerNamesRequired Array<string> The provider names. ["AD Security Provider","LDAP Security Provider"]
enableRequired Boolean True means enable, false means disable. true

Ƭ SecurityProviderMoveModel

Name Type Description Example
providerNameRequired string The name of the security provider. "AD Security Provider"
offsetRequired int32 The offset to the current order of the security provider,
the negative number means to move up, and the positive number means to move down.
-1

Ƭ SecurityProvidersImportModel

Name Type Description
securityProvidersRequired Array<SecurityProviderModel> The security providers list.

Ƭ SystemConfigModel

Name Type
securitySettings SystemConfigSecuritySettings
customView SystemConfigCustomView
viewDecorations SystemConfigViewDecorations
preferences SystemConfigPreferences

Ƭ SystemConfigSecuritySettings

Name Type Description Example
passwordPolicy PasswordPolicy
lockedTime int32 The locked time, in minutes. 60
allowUserResetPassword Boolean Whether allow user to reset password. false
defaultCookieLifetimeNullable int32 The cookie expiration time for the users who didn't check the "remember me" option when logging in, in days. 0
cookieLifetimeForRememberLoginNullable int32 The cookie expiration time for the users who checked the "remember me" option when logging in, in days. 14
forceChangePasswordOnFirstLogin Boolean Whether force user to change password on first login. false
forcePasswordExpiration Boolean Whether force user to change password on password expiration. false
passwordExpirationDaysNullable int32 The password expiration days. The default value is 90 days. 90

Ƭ SystemConfigCustomView

Name Type
loginPageTipNullable string
cssNullable string
htmlNullable string

Ƭ SystemConfigViewDecorations

Name Type
logoNullable string
bgImageNullable string

Ƭ SystemConfigPreferences

Name Type
companyNameNullable string
sysIconNullable string
showGlobalTenant Boolean

Ƭ PasswordPolicy

Enum:

  • WeakPasswordPolicy

  • NormalPasswordPolicy

  • StrongPasswordPolicy

    The password policy.

    * WeakPasswordPolicy - 0 - The weak password policy.
    * NormalPasswordPolicy - 10 - The normal password policy.
    * StrongPasswordPolicy - 20 - The strong password policy.

Ƭ SystemConfigBizModel

Name Type Description Example
companyNameNullable string The system title. "Wyn Enterprise"
sysIconNullable string The base64 string of the system icon. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
logoNullable string The base64 string of the logo in login page. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
bgImageNullable string The base64 string of the background image in login page. "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
passwordPolicy PasswordPolicy
lockedTimeNullable int32 The locked time for multiple invalid login, in minutes. 60
loginPageTipNullable string The tip information in the login page. "This is just a tip."
cssNullable string The custom CSS content. "body { font-family: sans-serif; }"
htmlNullable string The custom HTML content. "Custom HTML Content"
allowUserResetPasswordNullable Boolean Whether allow user to reset password. true
showGlobalTenantNullable Boolean Whether show the "Global" organization when logging in. true
defaultCookieLifetimeNullable int32 The cookie expiration time for the users who didn't check the "remember me" option when logging in, in days. 0
cookieLifetimeForRememberLoginNullable int32 The cookie expiration time for the users who checked the "remember me" option when logging in, in days. 14
forceChangePasswordOnFirstLoginNullable Boolean Whether force user to change password on first login. false
forcePasswordExpirationNullable Boolean Whether force user to change password on password expiration. false
passwordExpirationDaysNullable int32 The password expiration days. The default value is 90 days. 90

Ƭ PasswordPolicyInfoModel

Name Type Description
nameNullable string The name of the password policy.
value int32 The represent value of the password policy.

Ƭ EmailSettingSMTPSettings

Name Type Description Example
serverAddressNullable string The SMTP server address. "smtp.gmail.com"
serverPort int32 The listening port of the SMTP service. 465
enableSSL Boolean Whether enable SSL protocol. true
enableCertRevocationCheckNullable Boolean Whether check the certificate revocation status. true
userNameNullable string The user name for logging in the SMTP service. "example@gmail.com"
passwordNullable string The password of the user. "MyPassword"
senderNameNullable string The display name of the email sender. "MyDisplayName"
senderEmailNullable string The display email address of the email sender. "example@gmail.com"
emailSenderType EmailSenderType
googleClientIdNullable string The client id of the Google mail service. "your_client_id"
googleClientSecretNullable string The client secret of the Google mail service. "your_client_secret"
googleTokensNullable string The generated token for sending email using Google mail service. "generated_token"
microsoftClientIdNullable string The client id of the microsoft application.
microsoftClientSecretNullable string The client secret of the microsoft application.
microsoftTenantIdNullable string The tenant id of the microsoft application.

Ƭ EmailSenderType

Enum:

  • SMTP

  • GoogleAPI

  • MicrosoftGraph

    The email sender type.

    * SMTP - 0 - Use SMTP protocol to send email.
    * GoogleAPI - 1 - Use Google API to send email.
    * MicrosoftGraph - 2 - Use microsoft graph to send email.

Ƭ SystemConfigTfaSettings

Name Type
enabled Boolean
type TfaTypes
length int32
lifetime int32
settingsNullable string

Ƭ TfaTypes

Enum:

  • SMS
  • EMAIL