POST api/Field/AddOrEditDTKFieldChoiceNames
AddDTKFieldChoiceNames ChoiceId=0 for new, else for edit
Request Information
URI Parameters
None.
Body Parameters
FieldChoiceNameDefBinder list
Collection of FieldChoiceNameDefBinder| Name | Description | Type | Additional information |
|---|---|---|---|
| ProjectId | integer |
None. |
|
| FieldId | integer |
None. |
|
| ChoiceId | integer |
None. |
|
| langNames | Dictionary of integer [key] and string [value] |
None. |
Request Formats
application/json, text/json
Sample:
[
{
"langNames": {
"1": "sample string 2",
"3": "sample string 4"
},
"ProjectId": 1,
"FieldId": 2,
"ChoiceId": 3
},
{
"langNames": {
"1": "sample string 2",
"3": "sample string 4"
},
"ProjectId": 1,
"FieldId": 2,
"ChoiceId": 3
}
]
application/xml, text/xml
Sample:
<ArrayOfFieldChoiceNameDefBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Binding">
<FieldChoiceNameDefBinder>
<ChoiceId>3</ChoiceId>
<FieldId>2</FieldId>
<ProjectId>1</ProjectId>
<langNames xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfintstring>
<d3p1:Key>1</d3p1:Key>
<d3p1:Value>sample string 2</d3p1:Value>
</d3p1:KeyValueOfintstring>
<d3p1:KeyValueOfintstring>
<d3p1:Key>3</d3p1:Key>
<d3p1:Value>sample string 4</d3p1:Value>
</d3p1:KeyValueOfintstring>
</langNames>
</FieldChoiceNameDefBinder>
<FieldChoiceNameDefBinder>
<ChoiceId>3</ChoiceId>
<FieldId>2</FieldId>
<ProjectId>1</ProjectId>
<langNames xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfintstring>
<d3p1:Key>1</d3p1:Key>
<d3p1:Value>sample string 2</d3p1:Value>
</d3p1:KeyValueOfintstring>
<d3p1:KeyValueOfintstring>
<d3p1:Key>3</d3p1:Key>
<d3p1:Value>sample string 4</d3p1:Value>
</d3p1:KeyValueOfintstring>
</langNames>
</FieldChoiceNameDefBinder>
</ArrayOfFieldChoiceNameDefBinder>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
AddDTKFieldChoiceNames ChoiceId=0 for new, else for edit
API_Data_ListOfInt32| Name | Description | Type | Additional information |
|---|---|---|---|
| Success | boolean |
None. |
|
| Error | ErrorInfo |
None. |
|
| Data | Collection of integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"Success": true,
"Error": {
"ErrorCode": 1,
"ErrorMessage": "sample string 1"
},
"Data": [
1,
2
]
}
application/xml, text/xml
Sample:
<API_Data_ArrayOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
<Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>1</d2p1:int>
<d2p1:int>2</d2p1:int>
</Data>
<Error>
<ErrorCode>1</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</Error>
<Success>true</Success>
</API_Data_ArrayOfint>