Editing Field Values in a Lookup Table
Function
This API is used to edit field values in a lookup table.
URI
PUT /v2/{project_id}/design/code-tables/{id}/values
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
id |
Yes |
String |
Entity ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
to_add |
No |
Array of CodeTableFieldVO objects |
Adds attributes and an attribute value list to a lookup table. |
to_modify |
No |
Array of CodeTableFieldVO objects |
Edits the attribute value list of a lookup table. |
to_remove |
No |
Array of CodeTableFieldVO objects |
Deletes the IDs of the attributes of a lookup table |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
Long |
ID |
code_table_id |
No |
Long |
Lookup table ID |
ordinal |
Yes |
Integer |
Ordinal |
name_en |
Yes |
String |
Field name in English Maximum: 600 |
name_ch |
Yes |
String |
Field name in Chinese Maximum: 200 |
description |
No |
String |
Description Maximum: 600 |
data_type |
Yes |
String |
Data type |
domain_type |
No |
String |
Data type domains Enumeration values:
|
data_type_extend |
No |
String |
Data type extended field Maximum: 50 |
is_unique_key |
No |
Boolean |
Whether the attribute is unique Default: false |
code_table_field_values |
No |
Array of CodeTableFieldValueVO objects |
Lookup table attribute value |
count_field_values |
No |
Integer |
Number of lookup table attribute values |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of CodeTableFieldVO objects |
Lookup table attribute information |
Parameter |
Type |
Description |
---|---|---|
id |
Long |
ID |
code_table_id |
Long |
Lookup table ID |
ordinal |
Integer |
Ordinal |
name_en |
String |
Field name in English Maximum: 600 |
name_ch |
String |
Field name in Chinese Maximum: 200 |
description |
String |
Description Maximum: 600 |
data_type |
String |
Data type |
domain_type |
String |
Data type domains Enumeration values:
|
data_type_extend |
String |
Data type extended field Maximum: 50 |
is_unique_key |
Boolean |
Whether the attribute is unique Default: false |
code_table_field_values |
Array of CodeTableFieldValueVO objects |
Lookup table attribute value |
count_field_values |
Integer |
Number of lookup table attribute values |
Parameter |
Type |
Description |
---|---|---|
id |
Long |
ID |
fd_id |
Long |
Lookup table attribute ID |
fd_value |
String |
Lookup table attribute value |
ordinal |
Integer |
Ordinal |
description |
String |
Description Maximum: 600 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, for example, DS.000 which indicates that the request was successfully processed. |
error_msg |
String |
Error message |
data |
Object |
Returned data |
Example Requests
{ "to_add" : [ { "id" : "66980", "code_table_id" : "1014919549067366403", "ordinal" : 1, "name_en" : "code", "name_ch" : "Code", "description" : null, "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "fd_id" : "66980", "fd_value" : "aaa", "ordinal" : 1 } ], "count_field_values" : null } ] }
Example Responses
Status code: 200
The operation succeeds, and the CodeTableFieldVO array is returned.
[ { "id" : "86936", "code_table_id" : "1006972427986792448", "ordinal" : 1, "name_en" : "id", "name_ch" : "id", "description" : "", "data_type" : "STRING", "domain_type" : null, "data_type_extend" : null, "is_unique_key" : false, "code_table_field_values" : [ { "id" : "18823421", "fd_id" : "86936", "fd_value" : "aaa", "ordinal" : 1, "description" : null } ], "count_field_values" : 1 } ]
Status Codes
Status Code |
Description |
---|---|
200 |
The operation succeeds, and the CodeTableFieldVO array is returned. |
400 |
BadRequest |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.