Oracle CRM On Demand REST API Developer's Guide > Using the Oracle CRM On Demand REST API > Creating Oracle CRM On Demand Resources >
Creating Oracle CRM On Demand Child Resources
You can create Oracle CRM On Demand child resources by sending an HTTP POST request to the resource's URL. The following details are for a request to create a child Activities resource on the Oracle CRM On Demand Server:
- URL: https://<host>/OnDemand/user/Rest/latest/Accounts/1QA2-22P076/child/Activities
- HTTP Method: POST
- Content-Type: application/vnd.oracle.adf.resource+json
- Request body:
{ "Activities": [ { "Activity": "Task", "Subject": "Task1" } ] }
The following are the details for the response to a successful request:
- HTTP Code: 201
- Content-Type: application/vnd.oracle.adf.resource+json
- Location: https://<host>/OnDemand/user/Rest/latest/Accounts/1QA2-22P076/child/Activities/1QA2-22U11G
- Response body:
{ "Activities": [ { "Activity": "Task", "Subject": "Task1", "links": { "self": { "rel": "self", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-22P076/child/Activities/1QA2-22U11G" }, "canonical": { "rel": "canonical", "href": "/OnDemand/user/Rest/latest/Activities/1QA2-22U11G" }, "parent": { "rel": "parent", "href": "/OnDemand/user/Rest/latest/Accounts/1QA2-22P076" }, "CustomObjects15": { "rel": "child", "href": "/OnDemand/user/Rest/latest/Activities/1QA2-22U11G/child/CustomObjects15" } } } ] }
|