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 |
---|---|---|
source | number or string | Required. The ID of the start link. |
target | number or string | Required. The ID of the end link. |
relation | string | Required. The type of the relation created by the link. |
Example:
{
"source": 1,
"target": 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: