【Custom Mapping Rules】Add a Mapping Configuration¶
POST /api/v1/login_mapping/field/add
Overview¶
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
sourceField | string | Y | Source field Example: sourceField Allow empty: False Maximum length: 256 |
sourceValue | string | Y | Source field value Example: Allow empty: False Maximum length: 256 |
targetValues | array | Y | Target field values (currently defaults to list of role UUIDs) Example: readOnly |
Additional Parameter Notes¶
Request Example¶
curl 'https://openapi.guance.com/api/v1/login_mapping/field/add' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"sourceField":"name","sourceValue":"lisa","targetValues":["wsAdmin","role_xxxx32"]}' \
--compressed
Response¶
{
"code": 200,
"content": {
"createAt": 1697427020,
"creator": "mact_xxxx22",
"deleteAt": -1,
"id": null,
"isSystem": true,
"sourceField": "name",
"sourceValue": "lisa",
"status": 0,
"targetValues": [
"wsAdmin",
"role_xxxxxxxx"
],
"updateAt": 1697427020,
"updator": "mact_xxxxxx",
"uuid": "lgmp_xxxxxxxxxxxxxx",
"workspaceUUID": "wksp_bb191037aa7exxxxxxx"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "12119540197801491096"
}