Static Fact#
A static fact is an unchangeable fact that belongs to a Sample. The static facts can only be listed, not updated or deleted. The static fact consists of a key and a value, whereas the key must be unique.
Registering a new static fact#
The role ADMINISTRATOR-ROLE
or higher is required to be able to add a static fact.
To register a new static fact, the static fact endpoint can be used with a POST operation. The request and response body is JSON formatted and contains information about the static fact. The example request below adds a new static fact.
curl -X POST -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/sampledb/v2/sample/{sha256}/fact -d '{
"key": "newKey",
"value": "newValue",
"userAgent": {
"name": "user agent",
"version": "1.0"
}
}'
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.
Listing static facts#
The role SAMPLEDB-VIEWER
or higher is required to be able to list static facts.
A user can see the static facts for the Sample the user has read access to.
To list static facts, the static facts endpoint can be used with a GET operation. The response body is JSON formatted and contains information about the static facts. The example request below lists static facts.
curl -X GET -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/sampledb/v2/sample/{sha256}/fact
For more detailed information on what the response model looks like, you can check out the Swagger API documentation.