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.
curl -X POST -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://devapi.mnemonic.no/sampledb/v2/sample/<sample sha256 ID>/link -d '{
"customer": "customer",
"userAgent": {
"name": "user agent",
"version": "version"
},
"tlp": "white",
"acl": [],
"type": "downloads",
"reference": "<sample sha256 ID 2>"
}'
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.
curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 ID>/link/
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.
curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 ID>/link/<link ID>
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.
curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 ID>/link/summary
Tip
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.