Reference : JSON REST API reference : Element collection : GET method
  
GET method
Use the GET method to retrieve the collection of elements in a module. You can use the View parameter to filter the elements and attributes. For example:
URL: https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/.json?includeAttributes=true&view=14
Accept header: application/json
Response body:
{"elementCollection":[{"elementId":27,"alias":"789944da-2d00-42a7-a4f3-74610087dcd4","title":"External Applications","selfLink":"https://fpserver.com:9443/fp/resources/workspaces/49/modules/1/elements/27?view=427"},{"elementId":26,"alias":"dee607ec-f9a4-4237-a809-8f92ac67d8a3","title":"Business Operation","selfLink":"https://fpserver.com:9443/fp/resources/workspaces/49/modules/1/elements/26?view=427"}],"moduleName":"Portfolios","count":2,"links":[{"rel":"alternate","href":"https://fpserver.com:9443/fp/resources/workspaces/49/modules/1/elements/?view=427&includeAttributes=true&tree=true"},{"href":"https://fpserver.com:9443/fp/resources/workspaces/49/modules/1/elements/?view=427&includeAttributes=true"},{"href":"https://fpserver.com:9443/fp/resources/workspaces/49/modules/1/elements/?view=427&tree=true"}]}
Supported parameters for the GET method
The following parameters can be used with the GET method:
includeAttributes
Set the includeAttributes parameter to true to retrieve the attributes of the elements.
Type: Boolean
view
Use the view parameter to specify the view ID for retrieving the elements or attributes that are in the view.
Type: Integer
filter
The filter parameter must be used with the view parameter. Use the filter parameter to pass the filter ID for retrieving elements and attributes based on the filter criteria.
Type: Integer
For example, view=14&filter=1.
tree
Set the tree parameter to true to view the element collection in the tree structure
Type: Boolean
modifiedSince
Use the modifiedSince parameter to retrieve the element that has changed since a specified date. The following formats are supported.
Note The user can also supply modifiedSince as a parameter.
yyyy-MM-dd'T'HH:mm:ss
yyyy-MM-dd'T'HH:mm
yyyy-MM-dd
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd HH:mm
Type: Date or DateTime
For example, 2020-04-19T15:16:38+05:30 or 2020-01-22T12:00:00+01:00.
Note Make sure to encode the value before adding to URL.
fields
Use the fields parameter to pass XPath expression to retrieve a specific set of attributes or to filter elements that are based on specific values of attributes.
Type: XPath expression
For example, to retrieve a specific set of attributes, use:
fields=elementCollection/Element/attributes/(ID|Title|Owner))
or to filter elements based on attribute values, use:
fields=elementCollection/Element/attributes/(Title contains X OR Status is Approved )
fields=elementCollection/Element/attributes/(Title = X | Status is Approved )
fields=elementCollection/Element/attributes/(Title is X AND Status = Approved )
fields=elementCollection/Element/attributes/(Title contains X AND Cost < 100 )
Notes
Separator '|' should be encoded as '%7C'.
For example, fields=elementCollection/Element/attributes/(ID | Title) should be encoded as fields=elementCollection/Element/attributes/(ID %7C Title).
Attribute names and the attribute values should be enclosed in single quotes if they contain the following special characters: (, ), <, >, |, =.
For example, fields=elementCollection/Element/attributes/('Comments(incl)' contains 'Shift>Technology').
If the names or values already contain single quotes (') then they must be escaped with a backslash as: \'.
The following characters or character sequences can be used as operators: =, <, >, is, contains.
Different filtering conditions can be connected by using the following connectors (case sensitive): AND, OR, | (same as OR).
If you are using the fields parameter to filter the elements, do not use the modifiedSince parameter as well. Instead, use the fields parameter with a filtering condition specified on the Last Changed Date attribute.
You can specify filtering conditions on only the following attributes: Text, Integer, Float, Date, Choice, Check Box, MulitChoice, Parent Folder, Created Date, Created By, Last Changed Date, Last Changed By, Owner, Link, Linklist, Incoming Link, Unique Id.
For attributes like Choice and MultiChoice, you can specify the name of the items as the filtering value. For Link, Linklist and Incoming Link, you must specify the id of the target element as the filtering condition. For Parent Folder, Owner, Created By and Last Modified By attributes, you can either specify the name or the id of the target element.
To filter based on more than one attribute value, provide the filtering condition by comma-separating the individual values.
For example, the following example filters the elements where ‘Geography’ contains both ‘Asia’ and ‘Europe’ (applies 'all' condition):
fields=elementCollection/Element/attributes/(Geography contains Asia, Europe).
For multivalued attributes like MultiChoice and Linklist, you can prefix the filtering condition with or, to specify the 'any' condition while filtering.
For example, the following example filters the elements where ‘Geography’ contains either Asia or Europe (applies 'any' condition):
fields=elementCollection/Element/attributes/(Geography contains or,Asia,Europe).
For parent folder attribute, prefix the filtering condition with r, to set recursive rule.
For example, the following example filters all elements where the parent folder is System or any subfolder of System:
fields=elementCollection/Element/attributes/(Parent Folder is r,System).
paging, pageSize, pageNo
Use the paging, pageSize, and pageNo parameters to retrieve the collection of elements that are paginated. When pagination is enabled, the JSON shows an additional link to the next page.
Types: paging: Boolean, pageSize: Integer, pageNo: Integer
For example:
"paging": {
"next": "https://fpserver.com:9443/fp/resources/workspaces/125/modules/19/elements/?view=500&pageNo=1&paging=true&pageSize=2",
"pageNo": "0"
}
paging=true&pageSize=2&pageNo=1
Note The user can also supply pageSize or pageNo as a parameter.
includeHistoryOfAttributes, start, end
Set the includeHistoryOfAttribute parameter to true and specify the start and end date parameters to retrieve the history of the attributes. The following formats are supported for the date parameters.
yyyy-MM-dd'T'HH:mm:ss
yyyy-MM-dd'T'HH:mm
yyyy-MM-dd
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd HH:mm
Types: includeHistoryOfAttributes: Boolean, start: Date or Date Time, end: Date or Date time
For example:
includeHistoryOfAttributes=true&start=2011-03-22T12:00:00+01:00&end=2011-06- 22T12:00:00+01:00
includeHistoryOfAttributes=true&start=2011-03-22T12:00+GMT+01:00&end=2011-06-22T12:00+GMT+01:00
genericTimeGrid
Set the genericTimeGrid parameter to true to retrieve the time grid attribute sheets in a generic format. This can be used for reporting by using Rational Insight.
Note The user can also supply genericTimeGrid as a parameter.
Type: Boolean
optimize
Set the optimize parameter to true to optimize the content. If this is set to true, the response does not include rich text and formula information of the attributes. Also alternate URLs to the element are not provided in the response.
Type: Boolean
includeLinkTable
Set the includeLinkTable parameter to true to include attributes from the link targets in the response. The view should have a link table defined for the Link or LinkList attributes. All visible attributes shown in the link table set up will be part of the Link or LinkList attribute response.
Type: Boolean
sortID
Use the sortID parameter to sort the elements in the collection based on an attribute in the view. Provide the id of the attribute as the value for the parameter.
Type: Integer
For example, sortID=100.
descending
Set the descending parameter to true to sort the elements in the collection in descending order. If this parameter is not specified, sorting is done in ascending order.
Type: Boolean
Go up to
Element collection