Custom Basic Fields
Getting information about Resuable field via calling GET /v3/trackers/{trackerId}/fields/10003:
Response:
{
"id": 10003,
"name": "Reusable",
"type": "BoolField",
"hidden": false,
"valueModel": "BoolFieldValue",
"mandatoryInStatuses": [ ... ]
}
Here we can find that the valueModel of this field is "BoolFieldValue". It means that if want to set a value for this field as custom field we need to add a BoolFieldValue model into the customFields list.
Looking up the model in the Swagger UI of your instance ( https://{CodebeamerUrl}/v3/swagger/editor.spr ):
It will describe the required structure:
Based on this information we can construct our field value model:
"customFields": [
{
"fieldId": 10003,
"name": "Reusable",
"value": false,
"type": "BoolFieldValue"
}
]
Please note: the type parameter is always telling what type of object you are sending.
In this case a BoolFieldValue is provided so "type": "BoolFieldValue" this is needed because of the flexibility of the tracker configuration.
Was this helpful?