Skip to content

List Custom Mapping Rules



GET /api/v1/login_mapping/field/list

Overview

Retrieve the current workspace's Deployment Plan custom login mapping rules with pagination.

Before You Call and Usage Steps

This endpoint group manages Deployment Plan custom login attribute mappings with isSystem=false in the current workspace. These differ from SAML mappings that bind identity providers by ssoUUID and from External/Inner system mappings. For them to take effect, the workspace must also enable isOpenCustomMappingRule; you can configure the switch in Custom Mapping and verify the login policy. Saving/deleting only changes rules; it does not immediately change roles for existing members or revoke existing sessions. Subsequent LDAP/OIDC shared login flows re-match based on actual userinfo.

Matching uses top-level userinfo attributes: arrays are compared element by element using str(value), other values are compared by their Python string representation, and fields and values use database equality semantics (case sensitivity/collation is determined by the deployment database). No regex, contains, or nested path extraction is performed; use only stable strings from the identity source. Roles from multiple matching rules are unioned and then filtered for available roles. When the workspace custom switch is enabled, it takes precedence over system rules: if there is a match, roles are usually reset; if there is no match, the original association may be cleared. Existing Owner roles have protection logic. First verify actual permissions with a dedicated test identity; do not assume that the next login roles are correct solely because this HTTP request succeeds.

Read-only custom rules in the current workspace that are not deleted, sorted in descending order by most recent update (or creation time if not updated) by default. Search matches the source field, source value, or role display name; role name search uses visible, non-deleted roles. roleInfos only includes roles with status=0, so a search hit does not guarantee that roleInfos contains every old role. There is no filtering by ssoUUID; this endpoint group is not bound to a specific identity provider.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with the required permission from API Key Management in the target workspace.

Query Request Parameters

Parameter Type Required Description
search string Optional. If no keyword remains after trimming, no filtering is applied; OR matching is used, and SQL wildcard characters may affect LIKE semantics.
Null allowed: False
Example: engineering
How to obtain or enter: Use a keyword from the source attribute name, source value, or target role display name.
pageIndex integer Optional. Defaults to 1; >= 1.
Null allowed: False
$minValue: 1
Example: 1
How to obtain or enter: The first page is 1; then page through using pageInfo.
pageSize integer Optional. Defaults to 10, in records.
Null allowed: False
$minValue: 1
$maxValue: 100
Example: 10
How to obtain or enter: Select 1..100 based on the required page size.

Request Example

curl --get 'https://openapi.guance.com/api/v1/login_mapping/field/list' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode pageIndex=1 \
  --data-urlencode pageSize=10

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.data array<object> Array of rules on this page.
content.data[].id integer Record ID.
content.data[].uuid string lgmp_ mapping UUID; use this field for modification/deletion, not fdmp_.
content.data[].workspaceUUID string Workspace it belongs to.
content.data[].isSystem integer or boolean Fixed to 0/false for this group, distinguishing it from system mappings.
content.data[].sourceField string Top-level login attribute field name.
content.data[].sourceValue string Expected attribute string value.
content.data[].targetValues array<string> Saved role set; may contain historical values with status 2 or that later became invalid, and is not equivalent to the currently effective roles.
content.data[].targetValues[] string A single saved role identifier.
content.data[].roleInfos array<object> Summary of roles currently visible in this workspace with status=0; invalid entries are omitted.
content.data[].roleInfos[].uuid string Valid role identifier.
content.data[].roleInfos[].name string Role display name.
content.data[].status integer Mapping record status. The list excludes only 3 and may contain other historical statuses; individual operations accept only 0.
content.data[].creator string Creator identity.
content.data[].updator string Updater identity.
content.data[].createAt integer Creation time in Unix seconds.
content.data[].updateAt integer Update time in Unix seconds; may be -1 if not updated.
content.data[].deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.declaration object or null Workspace common declaration attached to a non-empty business object; if not configured, it may be null or an empty object; empty objects are not added. The exact pagination position is determined by the structure of this page.
pageInfo.pageIndex integer Current page.
pageInfo.pageSize integer Page size.
pageInfo.count integer Number of records on this page.
pageInfo.totalCount integer Total number of matches after search.
{
  "code": 200,
  "content": {
    "data": [
      {
        "id": 1,
        "uuid": "lgmp_example",
        "workspaceUUID": "wksp_example",
        "isSystem": false,
        "sourceField": "department",
        "sourceValue": "engineering",
        "targetValues": [
          "general"
        ],
        "roleInfos": [
          {
            "uuid": "general",
            "name": "标准成员"
          }
        ],
        "status": 0,
        "creator": "wsak_example",
        "updator": "wsak_example",
        "createAt": 1785427200,
        "updateAt": 1785427200,
        "deleteAt": -1
      }
    ],
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE",
  "pageInfo": {
    "pageIndex": 1,
    "pageSize": 10,
    "count": 1,
    "totalCount": 1
  }
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
500 ft.InternalServerError An uncaught exception occurs in mapping/role/database storage or data formatting Internal error Use filters to narrow down to the specific rule, check the shape of historical targetValues, and retain the traceId if the failure persists.

Feedback

Is this page helpful?