JSON API Guide → JSON API Options → ItemOptions
Limits the data that is returned with an item.
Name | Type | Description |
---|---|---|
fields |
|
An array of objects used to specify the fields to display. Empty by default. |
fixedFields |
boolean |
Combines with the fields array to determine the outputted fields. True by default. See usage notes below. |
includeNotes |
boolean |
When true, the item's notes are included in the response. False by default. The user's note preferences are honored, including the sort order and the number of notes to display. If the user has selected None as the display option for notes, no notes are returned. |
The fixedFields parameter combines with the fields array to determine the outputted fields as follows:
System fields listed below are included in output.
System fields listed below and specified fields are included.
Specified fields are included.
All fields are included in output.
Specified fields are included.
System fields are included.
When fixedFields = true, the following system fields are included:
Return all notes on the item, but only returns the "Title" and "Functional Area" fields:
{fixedFields: false, includeNotes: true, fields: [{id:"54"}, {id: "75"}]}
Response:
"fieldMetadata": [2] 0: { "id": 54 "name": "Title" "dbname": "TITLE" "syscode": 4 "type": "text" "renderHtml": false "password": false "maxLength": 80 } 1: { "id": 75 "name": "Functional Area" "dbname": "FUNCTIONAL_AREA" "syscode": 0 "type": "selection" "renderHtml": false "isMultiSelect": false } "fields": { "TITLE": { "value": "Image Builder crashes my system." } "FUNCTIONAL_AREA": { "id": 30 "name": "User Interface" } } "notes": [1] 0: { "title": "Please update this ticket" "contents": "This ticket needs more details." "author": { "id": 8 "name": "Administrator" } "modificationDateTime": { "svalue": "06/28/2016 02:48:23 PM" "value": 1467146903 } }
Copyright © 2007–2016 Serena Software, Inc. All rights reserved.