Get Mapping Rule List¶
GET /api/v1/sso_mapping/field/list
Overview¶
Reads SSO role mapping rules by provider and keyword with pagination.
Prerequisites and Usage Steps¶
This group maps the login attributes of a specific SSO provider to roles in the current workspace, which differs from custom_login_mapping and system mapping in LDAP/OIDC of the Deployment Plan. Creating a rule does not automatically enable mapping: you must enable isOpenSAMLMapping for the corresponding SSO configuration (set_disable in this group), and the SSO configuration itself must also be enabled.
Attribute names are matched in lowercase; values are not matched as regex or contains. String arrays are matched value by value; non-array objects, numbers, null, and so on are first converted to strings with json.dumps, while array elements are not uniformly converted to strings, so prefer identity-source-stable string attributes and string arrays. Multiple matched roles are combined as a union. After SSO mapping is enabled, having no rules or no matches can prevent accounts from entering this space and remove old associations in subsequent logins or switches; it is not simply appending default roles. After writing, the workspace and member caches are refreshed asynchronously, which may affect subsequent access by existing SSO sessions, and it cannot be promised to take effect only at the next login.
Only non-deleted rules in the current space are returned, sorted by updateAt in descending order by default, and different providers may be listed together. search is an OR across source field, source value, and role name, and is ANDed with the ssoUUID filter. ssoInfo={} indicates that no non-deleted provider was found in this space, but this API does not automatically delete or repair that mapping. The response is configuration, not the roles actually in effect for a specific account.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or fill in: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace. |
Query Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| ssoUUID | string | Optional, ≤48 characters; an empty value after trim is not filtered, a non-empty value is filtered exactly; the existence of the provider is not verified. Allows null: False Maximum length: 48 Example: sso_exampleHow to obtain or fill in: Obtain the provider UUID from the SSO list of this space. |
|
| search | string | Optional, fuzzy matching after trim; SQL wildcard characters may affect LIKE. Allows null: False Example: engineeringHow to obtain or fill in: Use a keyword of the attribute name/value or the role display name. |
|
| pageIndex | integer | Optional, defaults to 1, >=1. Allows null: False $minValue: 1 Example: 1How to obtain or fill in: 1 for the first page; paginate according to pageInfo. |
|
| pageSize | integer | Optional, defaults to 10. Allows null: False $minValue: 1 $maxValue: 100 Example: 10How to obtain or fill in: Select 1..100 records as needed. |
Request Example¶
curl --get 'https://openapi.truewatch.com/api/v1/sso_mapping/field/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode ssoUUID=sso_example \
--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 mappings on this page. |
| content.data[].id | integer | Database record number. |
| content.data[].uuid | string | fdmp_ mapping UUID, used for update/delete. |
| content.data[].workspaceUUID | string | Current workspace. |
| content.data[].ssoUUID | string | Stored provider UUID; it is not guaranteed to still exist or to belong to the current space. |
| content.data[].sourceField | string | Attribute field name. |
| content.data[].sourceValue | string | Value of the matched field. |
| content.data[].targetValues | array<string> | Stored array of role identifiers; may contain invalid historical values. |
| content.data[].targetValues[] | string | A single role identifier. |
| content.data[].roleInfos | array<object> | Summary of roles visible in this space with status=0; invalid roles are omitted. |
| content.data[].roleInfos[].uuid | string | Role UUID. |
| content.data[].roleInfos[].name | string | Role name. |
| content.data[].ssoInfo | object | Summary of the non-deleted provider in this space; {} if there is no valid match. |
| content.data[].ssoInfo.uuid | string | Provider UUID; may be omitted. |
| content.data[].ssoInfo.idpName | string | Provider name; may be omitted. |
| content.data[].status | integer | Status of the non-deleted record, usually 0; may be 2 in historical data. |
| 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 never updated. |
| content.data[].deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.declaration | object or null | Common workspace declaration attached to a non-empty business object; may be null or an empty object when not configured; an empty object is not added. For the exact position in pagination, refer to 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 matching records. |
{
"code": 200,
"content": {
"data": [
{
"id": 1,
"uuid": "fdmp_example",
"workspaceUUID": "wksp_example",
"ssoUUID": "sso_example",
"sourceField": "groups",
"sourceValue": "engineering",
"targetValues": [
"general"
],
"roleInfos": [
{
"uuid": "general",
"name": "Standard Member"
}
],
"ssoInfo": {
"uuid": "sso_example",
"idpName": "ExampleIdP"
},
"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 Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 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 | Exception in formatting the read historical JSON shape, the database, or role/provider profiles | Internal error | Narrow down to the specific provider/rule, check the shape of the historical targetValues, and keep the traceId if failures persist. |