GET/{resource-id1}/{object-id}/relationships/{resource-id2}
Returns the objects that are linked to the specified object.
Request format
GET https://jsonapi.partner2.yandex.com/vX/{resource-id1}/{object-id}/relationships/{resource-id2}
| Parameter | Description | 
| 
 | The ID of the first resource. | 
| 
 | The ID of the object hosted by the first resource. | 
| 
 | The ID of the second resource. The objects linked to the specified object will be found in the list of objects of the second resource. | 
The general structure of the response is given below. The elements may appear in a different order. The structure may contain internal parameters that are not described in the table.
Response format
JSON
{
  "data": [
    {
      "id": "{string}",
      "type": "{string}"
    }
  ],
  "links": {
    "related": "{string}",
    "self": "{string}"
  }
}      
Response parameters
- 
data Linked objects. - 
id The ID of the linked object. 
- 
type The resource type. 
 
- 
- 
links URLs of objects linked to the specified object. - 
related The URL of a list of linked objects with parameters. 
- 
self The URL of a list of linked objects. 
 
- 
Example for JSON
Request:
curl -i -g -H "Accept: application/vnd.api+json" -H "Authorization: token bf..." -X GET "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-3228-1/relationships/context_on_site_campaign"Response:
HTTP/1.1 200 OK Server: nginx/1.8.1 Date: Sun, 18 Dec 2016 12:39:50 GMT Content-Type: application/vnd.api+json Content-Length: 326 Connection: keep-alive { "data": [ { "id": "882", "type": "context_on_site_campaign" } ], "links": { "related": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-3228-1/context_on_site_campaign", "self": "https://jsonapi.partner2.yandex.com/v1/context_on_site_rtb/R-A-3228-1/relationships/context_on_site_campaign" } }