List Instances of a Custom Object

Returns a paginated list of the instances of a custom object.

 

URL

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

 

REQUEST METHOD

GET

 

URL PARAMETERS

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 instances 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 field. The supported fields are listed below.

 

FIELD SUPPORTED BY FILTER

guid Id;

boolean Deleted;

string Name;

datetime DateCreated;

datetime DateUpdated;

 

In addition, the following attributes are also supported by the filter: Text, E-mail, Link, Paragraph, Number, Date Only, Date/Time, List of Options, and Relationship.

Attributes not listed above are not supported by the filter.

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

 

REQUEST EXAMPLES

For the examples below, consider the following variable name of an object: "book".

 

The first 10 instances of the object identified by the variable name "book":

{RMUrl}/api/objects/book?page_size=10

 

Instances 11 through 20 (second page):

{RMUrl}/api/objects/book?page=2

 

Filter by instances with an ID greater than "5":

RMUrl}/api/objects/book?$filter=Id eq guid'f9166f2b-c0eb-426f-8940-246102a0f429'

 

Filter by active instances:

{RMUrl}/api/objects/book?$filter=Deleted eq false

 

Filter by removed instances:

{RMUrl}/api/objects/book?$filter=Deleted eq true

 

SUCCESS RESPONSE

Returns a list of the instances registered for the object, according to the filters and page size specified. For details on viewing the attributes available for the object in question, see Modulo Risk Manager Features -> 9. Custom Objects -> List Custom Object Attributes

 

SUCCESS RESPONSE EXAMPLES

[

{

"Id":"f9166f2b-c0eb-426f-8940-246102a0f429",

"Name":"The Art of War",

"ISBN":"9788525426642",

"Author":"Sun Tzu",

"Deleted":false

},

{

"Id":"66f295ae-f946-4f74-9ef4-21a0ca93febb",

"Name":"The Da Vinci Code",

"ISBN":"8575421131",

"Author":"Dan Brown",

"Deleted":true

}

]