Skip to main content
PUT
/
links
Link two objects together with a link type
import requests

url = "http://api/apollo/links"

payload = {
    "subject": {
        "type": "APPKIT_APP",
        "id": "<string>",
        "canonicalName": "<string>",
        "uri": "<string>"
    },
    "object": {
        "type": "APPKIT_APP",
        "id": "<string>",
        "canonicalName": "<string>",
        "uri": "<string>"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "subject": {
    "type": "APPKIT_APP",
    "id": "<string>",
    "canonicalName": "<string>",
    "uri": "<string>"
  },
  "object": {
    "type": "APPKIT_APP",
    "id": "<string>",
    "canonicalName": "<string>",
    "uri": "<string>"
  },
  "linkType": "DependsOn",
  "originator": "<string>"
}

Body

application/json

JSON-formatted link definition that specifies the subject, object, and linkType

subject
object
object
object

Response

200 - application/json

successful operation

subject
object
object
object
Available options:
DependsOn,
Supports,
IsPartOf,
HasPart,
RelatesTo,
InContextOf,
HasContext,
Self
originator
string