Oracle CRM On Demand REST API Developer's Guide > Overview of Using the Oracle CRM On Demand REST API >

Oracle CRM On Demand REST API Response Links


A link in the Oracle CRM On Demand REST API response contains a location of a resource and metadata about that resource.

The Oracle CRM On Demand REST API response can include the following types of links:

Each link contains attributes. Table 11 lists the link attributes returned in an Oracle CRM On Demand REST API response.

Table 11. Links Attributes
Name
Type
Description
Example

rel

string

Indicates the relationship of the linked resource to the current resource that contains the list of links. Values include:

  • Self: Indicates that the linked resource is the current resource.
  • Parent: Indicates that the linked resource is the parent resource.
  • Child: Indicates that the linked resource is the child resource.
  • Canonical: Indicates the URL for directly accessing the linked resource.

"links": {
 "self": {
  "rel": "self",
  "href": "/OnDemand/user/Rest/028/Accounts/{id}",
...

"links": {
 "canonical": {
  "rel": "canonical",
  "href": "/OnDemand/user/Rest/028/Accounts/{id}",
...

"links": {
 "parent": {
  "rel": "parent",
  "href": "/OnDemand/user/Rest/028/Accounts/{id}",
...

"links": {
  "AccountAddresses": {
  "rel": "child",
  "href": "/OnDemand/user/Rest/028/Accounts/1QA2-22EWBI/child/AccountAddresses",
...

href

string

Indicates the fully qualified location URL of the linked resource.

"links": {
 "self": {
  "rel": "self",
  "href": "/OnDemand/user/Rest/028/Accounts/{id}",
  "kind" : "item"
...

kind

string

A describe link attribute that indicates context within a describe response. Values include: item, collection, and describe. For information about collections, see About Collection Resources. For more information about describe requests, see Retrieving Metadata about Oracle CRM On Demand Resources.

"links": {
 "self": {
  "rel": "self",
  "href": "/OnDemand/user/Rest/028/Accounts/{id}",
  "kind" : "item"
...
 "self" : {
  "rel" : "self",
  "href" : "/OnDemand/user/Rest/028/Accounts/",
  "kind" : "collection"
...
 "describe": {
  "rel": "self",
  "href": "/OnDemand/user/Rest/028/Accountsdescribe",
  "kind" : "describe"

Example of a Response Link for Self, Canonical, Parent, and Child Links

This topic contains an example of a response that includes self, canonical, parent, and child links. For more information about response links, see Oracle CRM On Demand REST API URL Format.

Request:

https://<host>/OnDemand/user/Rest/026/Accounts/1QA2-227Q47/child/Opportunities/1QA2-227Q49?fields=OpportunityName,SalesStage

Response:

{
   "Opportunities": [
     {
        "OpportunityName": "RestDoNotDelete",
        "SalesStage": "Closed/Won",
        "links": {
           "self": {
              "rel": "self",
              "href": "/OnDemand/user/Rest/026/Accounts/1QA2-227Q47/child/Opportunities/1QA2-227Q49"
           },
           "canonical": {
              "rel": "canonical",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49"
           },
           "parent": {
              "rel": "parent",
              "href": "/OnDemand/user/Rest/026/Accounts/1QA2-227Q47"
           },
           "Activities": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/Activities"
           },
           "CustomObjects4": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/CustomObjects4"
           },
           "Leads": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/Leads"
           },
           "Opportunities": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/Opportunities"
           },
           "OpportunityNotes": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/OpportunityNotes"
           },
           "OpportunityPartners": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/OpportunityPartners"
           },
           "OpportunityRevenues": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/OpportunityRevenues"
           },
           "OpportunityTeams": {
              "rel": "child",
              "href": "/OnDemand/user/Rest/026/Opportunities/1QA2-227Q49/child/OpportunityTeams"
          }
      }
    }
  ]
}

Example of an Association Response Link

This topic contains an example of an association link. For more information about response links, see Oracle CRM On Demand REST API URL Format

This example includes the primary contact field for an account in the request URL, and the response includes an association link to the specific primary contact resource.

Request:

User/Rest/latest/Accounts?fields=AccountName,PrimaryContactFullName

Response:

{
  "Accounts":[{
    "AccountName":"ACME Computer Parts",
    "PrimaryContactFullName":"John Smith",
  "links":{
    "self":{
      "rel":"self",
      "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-1ATBR"},
    "canonical":{
      "rel":"canonical",
      "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-21ATBR"},
    "PrimaryContactFullName":{
      "rel":"self",
      "href":"/OnDemand/user/Rest/latest/Contacts/1QA2-21ATC5"}
    }
  }
 ]
}

Oracle CRM On Demand REST API Developer's Guide, Release 32 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.