Field Display Policy Generic Action#
Action |
field_display_policy |
---|---|
title |
Obtain the schema and URL needed to create a Field Display Policy instance for the resource. |
method |
GET |
URL |
/api/<resource_type>/<resource_name>/field_display_policy/ |
Parameters |
hierarchy=[hierarchy] |
Response |
Field Display Policy schema and rules that include the POST and a reference to the target model used to create the field display policy for the resource. |
support_async |
false |
class |
display_policy |
Use the action in the response to create the POST payload for the specified resource.
The response snippet below shows the POST method to create the Field Display Policy:
"meta": {
"actions": [
{
"create": {
"class": "add",
"href": "/api/data/FieldDisplayPolicy/
?hierarchy=[hierarchy]
&policy_name=[field_display_policy]",
"method": "POST",
"support_async": true,
"title": "Create"
}
...
The Field Display Policy schema in the response shows properties to add to the POST payload.
Example POST payload for target model data/DATA1
(from an Admin Portal form with [form_FDP]
and [form_CFG]
applicable):
{
"data": {
"field_overrides": [
{
"field": "name",
"help_text": "Help Name"
}
],
"groups": [
{
"fields": [
"name",
"surname"
],
"title": "G1"
}
],
"name": "FDP2",
"target_model_type": "data/DATA1"
},
"meta": {
"references": {
"form_href": "/api/data/DATA1/field_display_policy/
?hierarchy=[hierarchy]
&policy_name=[form_FDP]
&template_name=[form_CFG]"
}
},
"request_meta": {}
}