...
Each resource that supports custom fields (incident, scriptrun, requirement, script) has an optional expand called "FieldValues". FieldValues is an object with properties for each custom field and values representing the values for that type of custom field.
...
Code Block | ||
---|---|---|
| ||
{ "Id": "e5e1e31f-40ba-4e87-8776-a1d300d6efd4", "ActualDuration": "", "ScriptId": "866bd9aa-2cd3-4127-b171-a1d300d6efd4", "ScriptVersion": 20, "AssignmentId": "866bd9aa-2cd3-4127-b171-a1d300d6efd4", "CreatedAt": "2013-03-20T21:45:18Z", "LastUpdatedAt": "2013-06-12T03:47:12Z", "CreatedById": "cd38e32a-adb4-42f6-a075-a1c40106d2d0", "CreatedBy": "Administrator", "RunById": "cd38e32a-adb4-42f6-a075-a1c40106d2d0", "RunBy": "Administrator", "LastUpdatedById": "cd38e32a-adb4-42f6-a075-a1c40106d2d0", "LastUpdatedBy": "Administrator", "Status": "In Progress", "Expands": [ "Assignment", "FieldControls", "StepResults" ], "FieldValues": { "Automation_System": { "Id": "f13e6fbb-c1b9-49ad-b4cb-d895a9affab1" } }, "Self": "http://localhost:8092/EnterpriseTester/api/scriptrun/e5e1e31f-40ba-4e87-8776-a1d300d6efd4" } |
Simplified syntax for PickList values
We also support shortcuts for picklist values. For single valued picklists - we support PUTs using the picklist Text or Id. For multi-valued picklists - you can supply an array of Id or Text.
e.g.
No Format |
---|
PUT /api/scriptrun/e5e1e31f-40ba-4e87-8776-a1d300d6efd4?$expand=FieldValues |
With a body like
Code Block | ||
---|---|---|
| ||
{
//...
"FieldValues": {
"ProjectCategories": ["Reporting", "8e3df968-42ad-474a-94ab-b1374174345e"],
"Automation_System": "Selenium"
}
}
|