Reference : REST XML API reference : Element collection : GET method
  
GET method
Use this method to retrieve the collection of elements in a module. You can use the View parameter to filter the elements and attributes.
URL: https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/.xml?includeAttributes=true&view=14
Accept header: application/xml
Response body:
<ns:elementCollection xsi:schemaLocation="https://fpserver.com:9443/fp/namespace/workspaces/2/modules/1/views/14/elements https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements.xsd?view=14"> <ns:Elements count="1"> <ns:Element> <ns:attributes> <ns:Element_Information/> <ns:ID></ns:ID> <ns:Title></ns:Title> <ns:Description></ns:Description> <ns:type_is_a_folder> </ns:type_is_a_folder> </ns:attributes> <ns:selfLink href="https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/15?view=14"/> <ns:alias>38bfbaaa-6af2-49ed-a6f4-d0cf39704a55</ns:alias> </ns:Element></ns:Elements> <fp:link href="https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/?view=14" rel="alternate"/> <fp:link href="https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/?view=14&includeAttributes=true&tree=true" rel="alternate"/> <fp:link href="https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/?view=14&tree=true" rel="alternate"/></ns:elementCollection>
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.
metadata
Set the metadata parameter to schema to retrieve the schema of the element collection XML document.
Type: String
For example, metadata=schema.
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 XML shows an additional link to the next page.
Types: paging: Boolean, pageSize: Integer, pageNo: Integer
For example:
<fp:link href="https://fpserver.com:9443/fp/resources/workspaces/2/modules/1/elements/?pageno=1&pageSize=2&paging=true&includeAttributes=true" rel="next" Page="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