Analysis Policy#

An analysis policy will say which analysis workers are executed and what options are sent to the analysis workers (e.g. allow internet access). The standard policy will be used if there are no custom analysis rules match. For now, there will only be one default analysis policy. This can be fetched or updated, but it is not possible to add or remove policies.

Fetching the default analysis policy#

The role ADMINISTRATOR-ROLE or higher is required to be able to fetch the default analysis policy.

To fetch the default analysis policy, the analysis policy endpoint can be used with a GET operation. The response body is JSON formatted and contains information about the analysis policy. The example request below fetches the default analysis policy.

curl -X GET -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/sampledb/v2/policy/default

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

Updating the default analysis policy#

The role ADMINISTRATOR-ROLE or higher is required to be able to update the default analysis policy.

To update the default analysis policy, the analysis policy endpoint can be used with a PUT operation. The request and response body is JSON formatted and contains information about the analysis policy. The example request below updates the default analysis policy.

curl -X PUT -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/sampledb/v2/rule/default -d '{
  "workers": [
    "workerShortName"
  ],
  "options": [
    {
      "key": "updatedKey",
      "value": "updatedValue"
    }
  ]
}'

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