Oracle CRM On Demand REST API Developer's Guide > Using the Oracle CRM On Demand REST API > Retrieving Oracle CRM On Demand REST API Collection Lists >
Retrieving a Collection Child Resource List
You can retrieve Oracle CRM On Demand collection child resources by sending an HTTP GET request to the collection resource's URL. The following details are for a request to retrieve a list of child Opportunities resources on the Oracle CRM On Demand Server:
- URL: https://<host>/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY/child/Opportunities?fields=OpportunityName,SalesStage&limit=2&offset=0
- HTTP Method: GET
- Content-Type: None
- Request body: None
The following are the details for the response to a successful request:
- HTTP Code: 200
- Content-Type: application/vnd.oracle.adf.resource+json
- Response body:
{ "Opportunities": [ { "OpportunityName": "2500 Barebones with Graphics Upgrade", "SalesStage": "Qualified Lead", "links": { "self": { "rel": "self", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY/child/Opportunities/1QA2-21ATCX" }, "canonical": { "rel": "canonical", "href": "/OnDemand/user/Rest/latest/Opportunities/1QA2-21ATCX" }, "parent": { "rel": "parent", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY" } "Leads": { "rel": "child", "href": "/OnDemand/user/Rest/latest/Opportunities/1QA2-21ATCX/child/Leads" } } }, { "OpportunityName": "insert account -opp by rest", "SalesStage": "Qualified Lead", "links": { "self": { "rel": "self", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY/child/Opportunities/1QA2-21YFHJ" }, "canonical": { "rel": "canonical", "href": "/OnDemand/user/Rest/latest/Opportunities/1QA2-21YFHJ" }, "parent": { "rel": "parent", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY" }, "Leads": { "rel": "child", "href": "/OnDemand/user/Rest/latest/Opportunities/1QA2-21YFHJ/child/Leads" } } } ], "links": {"self": { "rel": "self", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBY/child/Opportunities" } }, "_contextInfo": { "limit": 2, "offset": 0 } }
|