Analysis#

An analysis is the result of an analysis of a sample and a submission. An analysis thus belongs to a sample and must be added or fetched from a specific sample.

Adding an analysis#

The role SAMPLEDB-ANALYZER is required to be able to add an analysis. In addition, read access to the sample is required.

Below is an example of how to add an analysis:

curl -X POST -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 hash>/analysis -d '{
  "customer": "mnemonic",
  "userAgent": {
    "name": "user agent",
    "version": "1.0"
  },
  "tlp": "white",
  "acl": [],
  "analysisResult": {
    "meta": "data"
  }
}'

The field analysisResult may contain arbitrary data, as long as it is valid Json. In other words, it can be a string, array, object, ..

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Fetching analyses#

The role SAMPLEDB-VIEWER or higher is required to be able to fetch or list analyses.

List#

To list all analyses of a sample, the analysis endpoint can be used with a GET operation along with the sample ID. The response body will be JSON formatted, and contain all information in the analysis.

curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 hash>/analysis/

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 analysis of a sample, the analysis endpoint can be used with a GET operation along with the sample ID and the analysis ID. The response body will be JSON formatted, and contain all information in the analysis.

curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/sampledb/v2/sample/<sample sha256 hash>/analysis/<analysis id>

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.