Update Fields
Use this endpoint to update multiple fields related to the specified object.
Method
PUT
URL
/v2/<object_full_identifier>/fields
Parameters
Response Content Type
application/json
Service Input Data for Field Update
Input data format and structure is the same as that for field creation. For more information, see Create Fields. Each field must be specified by its full identifier, and only the attributes to be updated must be specified. Field attributes left unspecified are not updated.
Input Example
Following is an example PUT request to update io_test_field by modifying its short description.
PUT https://localhost:8080/v2/io_showcase/fields

[{
"io_full_identifier":"io_test_field",
"io_short_description": "used by showcase object"
}
]
Specific Input Data for Relationship Field Update
To update data for related Relationship or Dynamic Relationship fields, specify the attributes to change in the relationship element.
Input Example
Following is an example PUT request to update io_test_rel_field by modifying its short description and target objects:
PUT https://localhost:8080/v2/io_showcase/fields

[{
"io_full_identifier":"io_test_rel_field",
"io_short_description": "used by showcase object",
"relationship": {
"targets":["io_user", "io_role"]
}
}
]
* 
If you modify the number of targets objects for the relationship, the related field data type might change from Relationship to Dynamic Relationship or the reverse. Only this data type change is valid and supported by the API. When this field data type change occurs, field options are recreated accordingly.
Specific Input Data for Option List Field Update
You can add, update, and delete options for a specified Option List field. Update behavior is as follows:
Add Option: If no options related to a field match a specified identifier, the option is created in the namespace of the currently logged-in user.
Update Option: If an option related to a field matches the specified identifier, the option is updated.
Deactivate Option: If an option related to a field is not specified, the option is deactivated.
Input Example
Following is an example PUT request to update io_test_option_list_field by adding Option 4 and deleting Option 3.
PUT https://localhost:8080/v2/io_showcase/fields

[{
"io_full_identifier":"io_test_option_list_field",
"options":[
{
"io_name": "Option 1",
"io_identifier": "option1",
"io_ordering_position":1
},
{
"io_name": "Option 2",
"io_identifier": "option2",
"io_ordering_position":2
},
{
"io_name": "Option 4",
"io_identifier": "option4",
"io_ordering_position":4
}
]
}
]
Update Multiple Fields
You can update multiple fields in a single request.
Input Example
Following is an example PUT request to update multiple fields.
PUT https://localhost:8080/v2/io_showcase/fields

[{
"io_full_identifier":"io_test_field",
"io_short_description": "used by showcase object",
"io_required": true,
"io_update_safe": true
},
{
"io_full_identifier":"io_test_rel_field",
"io_short_description": "used by showcase object",
"io_update_safe": true,
"relationship": {
"targets":["io_user", "io_role", "io_group"]
}
},
{
"io_full_identifier":"io_test_option_list_field",
"io_application": "Max Designer",
"options":[
{
"io_name": "Option 1",
"io_identifier": "option1",
"io_ordering_position":1
},
{
"io_name": "Option 2",
"io_identifier": "option2",
"io_ordering_position":2
}]
}
]
Service Response
If input data validation is successfully passed and all fields (including related relationships and options if applicable) are successfully created, the response is Status Code 200 plus a JSON array that includes all updated fields in the same format as for field creation.
Error Response Messages
HTTP Status Code
Error Message
400
The body of the request is empty
400
The body of the request has invalid format
400
The required parameters are not informed
500
Body: Error Creating Fields. Exception={...} or any validation error
Status: Internal Server error
For more information:
Was this helpful?