- Available Since API Version – 2.0\
Note that in API versions prior to 2.4, the EnumField<> object type was called "TxDictionary<>".
The EnumField<> type is used to represent multi-value and table fields in Octopus API, including table user-defined fields. EnumField<> fields may contain any Octopus API field or object type. EnumField<> objects contain the following properties:
- Items - An array of items representing the items in the field. The items in a EnumField<> may be of any type. The type of objects contained within the Items array determines the type of objects that may be stored in a EnumField<> field.\
Basic Read Request
The following example illustrates the syntax for a basic request for the default value of a EnumFieldin a Read method call.
Request
{
"Udf/$TYPEID(1234)":1
}
Response
{
"Udf/$TYPEID(1234)":[
"2",
"3",
"4"
]
}
Detailed Read Request
The following example illustrates the syntax for a request for all properties of a EnumField, including the properties of the UdfTableItems in a Read method call.
Request
{
"Udf/$TYPEID(1234)":[
{
"Key":1,
"Value":1,
"Inactive":1,
"SortValue":1
}
]
}
Response
{
"Udf/$NAME(abtable1)":[
{
"Key":"4",
"Value":"Pinot Noir",
"Inactive":false,
"SortValue":""
}
]
}
Create/Update Request
The following example illustrates the syntax for including a EnumField in a Create or Update method call.
Request
{
"Udf/$TYPEID(1234)":[
"2",
"4"
]
}
Response
{
"Udf/$TYPEID(1234)":[
"2",
"4"
]
}