A Links and Relations
Business object relationships are represented in the response as URLs that define the relationship between the current business object and the business object that the link points to.
This appendix includes the following sections:
Describe links Object Structure
links
is a JSON object where the value is always a URL link and the link name is defined according to the rel
of the link. The links
object is generated for each resource collection, item, and for the resource itself.
Note that URL links in the resource describe will be generated using a template placeholder value ({id}
) when there is not enough information to determine all parts of the URL. For example, the following child link provides a URL with the placeholder for the value of the specific Department
resource:
"item" : { "links" : [ { "rel" : "child", "href" : "<base_url>/Department/{id}/child/Employee", "name" : "Employee", "kind" : "collection", "cardinality" : { "value" : "1 to *", "sourceAttributes" : "DepartmentId", "destinationAttributes" : "DepartmentId" }
rel Attribute Values
The rel
attribute defines the type of link relationship between the current resource and the resource which the link points to. Relationships may be specified by any of the values shown in the table below.
Table A-1 Link Relationship in the REST Resource Describe
Link Relationship | Description |
---|---|
|
Always generated for a resource. The |
|
Always generated for a nested resource. The |
|
Generated when the resource has nested children. The |
|
Generated in the resource version describe when multiple resource version identifiers exist. The |
|
Generated in the resource version describe when multiple resource version identifiers exist. The |
|
Generated in the resource version describe when multiple resource version identifiers exist. The |
|
Generated in the resource version describe. The |
href Attribute Value
The href
attribute defines the URL to the linked resource or resource describe.
cardinality Attribute Values
The cardinality
attribute is an optional attribute that defines the cardinality between the source resource and the destination resource. This attribute will be available only when the rel
attribute value is child
and the resource type is vnd.oracle.adf.description+json
. This cardinality attribute has the following attributes.
-
value
: The value of the cardinality. Example: "1 to *
" -
sourceAttributes
: The attribute in the source resource used to link to the destination resource. -
destinationAttributes
: The attribute in the destination resource used to link to the source resource.