POST /links
Description
Creates a new link and returns a json object with a new link ID
The route handles the HTTP POST request made to the /links
path.
Payload
The server expects to receive a json object with the next properties:
Name | Type | Description |
---|---|---|
masterId | number or string | Required. The ID of a master link. |
slaveId | number or string | Required. The ID of a slave link. |
relation | string | Required. The type of the relation created by the link. |
Example:
{
"masterId": 1,
"slaveId": 2,
"relation": "relatesTo",
}
Response
The route returns a json object with a new link ID.
Example:
{
"id": 1
}
The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
Related articles: