Skip to main content

GetUserCodeSettings

Get user code settings for a given workspace

Description

  • Obtains the user code settings for the specified workspace.
  • Not available to users without workspace access (403:Forbidden).
  • For user code settings, please refer Users and Groups in the Development Guide.
  • User code settings can be specified in "Workspace Settings" > "User Code Settings" on the Administration page.

Method

GET

Request URL Format

/api/v0/workspaces/:workspace-id/usercode-settings

URL Params

workspace-id Specifies the workspace ID to be acquired

Query Params

None

Request URL Sample

GET https://api.xxx.com/api/v0/workspaces/58ca3597cce5fe3ea0a42fa8/usercode-settings

Response Sample

{
"min_length": 6, // Minimum length of user code
"max_length": 10, // Minimum length of user code
"pattern_check_type": 2, // User code complexity check availability
"use_min_length": false, // Availability of minimum length of user code
"use_max_length": false, // Availability of minimum length of user code
"use_pattern_check": false // User code complexity check availability
}

User code check pattern

- 0: "Spaces are not allowed in user code"
- 1: "Must contain both alphanumeric characters"
- 2: "Must contain alphanumeric characters and special characters (one of !#$%-_=+<>)"
- 3: "Contains either alphanumeric characters or symbols"

Errors

  • If the login user cannot use the specified workspace, a 403 error will occur.