Link¶
A link is an entity used to indicate a relationship between two samples.
If, for example, a sample downloads or loads another sample they have a relationship of that given type.
Adding a link¶
The role SAMPLEDB-ANALYZER is required to be able to add a link.
To add a link to a sample, the link endpoint can be used with a POST
operation along with the sample ID. The request and response body is
JSON formatted and contains information about the link. The example
request below adds a link between the given samples defined in the
context path in the URL, and in the reference -field in the JSON
request, of type downloads.
1 2 3 4 5 6 7 8 9 10 11 | |
Tip
For more detailed information on what the request response model looks like, you can check out the Swagger API documentation.
Fetching links¶
The role SAMPLEDB-VIEWER or higher is required to be able to fetch or list links.
List¶
To list links of a sample, the link endpoint can be used with a GET operation along with the sample ID. The response body will be JSON formatted and contain data about the link.
1 | |
Tip
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.
Fetch¶
To fetch a specific link, the link endpoint can be used with a GET operation along with the sample ID, and the link ID. The response body will be JSON formatted and contain data about the link.
1 | |
Tip
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.
Fetch links summary¶
To fetch a link summary for a given Sample, the endpoint can be used with a GET operation along with the sample ID. The response body will be JSON formatted and contain a summary of the (up to) 1000 first links. If there exists more than 1000 links in total, the incompleteTypeCount will be set.
1 | |
Tip
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.