List Changes to a Custom Object Instance

Returns a paginated list of the changes made to an instance of a custom object.

 

URL

{RMUrl}/api/objects/<ObjectVariableName>/<InstanceID>/snapshots[?[[&]$filter=<filter>][[&]page=<Page>][[&]page_size=<PageSize>][[&]$orderby=<field1[desc],field2[desc]…fieldN[desc]>]]

 

REQUEST METHOD

GET

 

URL PARAMETERS

ObjectVariableName: This parameter is provided in the URL and does not need to be sent through GET.

InstanceID: This parameter is provided in the URL and does not need to be sent through GET.

page: Number of the page to be displayed. Valid values: 1 to the maximum number of pages. If omitted, the value 1 is used. If the value is greater than the maximum number of pages, a blank list will be returned.

page_size: Number of items displayed per page. Valid values: 1 to 1,000. If omitted, the default value of 10 is used.

filter: Query based on the OData protocol syntax for configuring filters. The fields supported are listed below. See the examples to view the operations allowed.

orderby: Orders the groups listed on the page by field. To order by more than one field, use a comma between the field names. For descending order, add the word "desc" for each desired field. The supported fields are listed below.

 

FIELDS SUPPORTED BY FILTER

datetime SnapshotDate;

string Differences/Name;

string Author/Id;

string Author/Name;

string Author/UserName;

 

 

For detailed information on filters as supported operators, which filters apply to which data types, and more examples, see Appendix 3: Filters.

 

REQUEST EXAMPLES

Filter by updates that are earlier than a certain date:

{RMUrl}/api/objects/book/66f295ae-f946-4f74-9ef4-21a0ca93febb/snapshots?$filter=SnapshotDate ge datetime'2013-12-01T12:34:56'

 

Filter by changes made by a certain author:

{RMUrl}/api/objects/book/66f295ae-f946-4f74-9ef4-21a0ca93febb/snapshots?$filter=Author/Name eq 'John Meyers'

 

Filter by updates where the attribute name contains "list":

{RMUrl}/api/objects/book/66f295ae-f946-4f74-9ef4-21a0ca93febb/snapshots?$filter=Differences/any(diff: diff/Name eq 'list')

 

SUCCESS RESPONSE

[

{

"Differences":[

{"Name":"simplelist","OldValue":[],"NewValue":[{"Oid":"148022e2-1a10-414e-81a1-09e8b41ed40a","Caption":"a1"}

{"Name":"number","OldValue":1,"NewValue":5},

],

"SnapshotDate":"\/Date(1387288987560-0200)\/"}

},

{

"Differences":[],

"SnapshotDate":"\/Date(1387288970217-0200)\/"}

]