Reputation v2 Sources#
Concepts#
Default Confidence#
Whenever a source reports of an Observation, that Observation will automatically be given a score equal to the source’s default confidence value. However, it is possible to override this score on a per-observation basis.
Active and Grace Period (Observation state management)#
Observations can be in one of three states: active
, latest
and old
. When a Source ingests an Observation into
Argus,
the Observation is put in the active
state for a duration equal to the Source’s active period. After the active period
has passed,
the Observation will be transitioned into the latest
state and remain there for a duration equal to the Source’s grace
period.
Should the Observation be re-observed while in the latest
state, it will be transitioned back to the active
state
for a new active period.
If the grace period passes without any re-observations, the Observation will be transitioned to the old
state.
An Observation will not be re-activated from the old
state. Instead, a new Observation will be created.
Configurable Read and Write Functions#
The read and write functions on a Source serves as a configurable way to change the access control of the Source’s data. The read function determines which Argus function is required to read data created by the Source (typically Observations). The write function determines which Argus function is required to write data on behalf of the Source, for instance who can ingest Observations into Argus on behalf of the Source.
Creating a Source#
POST /reputation/v2/source
Access Control#
To create a source in Argus, the user needs to be granted the addReputationSource
Argus function.
Additionally, the user needs to be granted the read and write function specified in the request.
Example#
curl -X POST 'https://api.mnemonic.no/reputation/v2/source' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key' \
-d '{
"shortName": "mysource",
"name": "My source",
"description": "This is my source",
"defaultConfidence": 0.5,
"activePeriod": 360000,
"gracePeriod": 720000,
"writeFunction": "addReputationSource",
"readFunction": "viewReputationSources",
"useForReputationCalc": true,
"useForDistributedSync": true
}'
Updating a Source#
PUT /reputation/v2/source/{idOrShortName}
No fields are required, only specify the fields you want to update.
Access Control#
To create a source in Argus, the user needs to be granted the updateReputationSource
Argus function.
Additionally, the user needs to be granted the read and write function specified in the request.
Example#
curl -X PUT 'https://api.mnemonic.no/reputation/v2/source/mysource' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key' \
-d '{
"name": "My source",
"description": "This is my source",
"defaultConfidence": 0.5,
"activePeriod": 360000,
"gracePeriod": 720000,
"writeFunction": "addReputationSource",
"readFunction": "viewReputationSources",
"useForReputationCalc": true,
"useForDistributedSync": true
}'
Deleting a Source#
DELETE /reputation/v2/source/{idOrShortName}
Access control#
To delete a source in Argus, the user needs to be granted the deleteReputationSource
Argus function.
Example#
curl -X DELETE 'https://api.mnemonic.no/reputation/v2/source/mysource' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key'
Fetching a source#
GET /reputation/v2/source/{idOrShortName}
Access control#
To fetch a source in Argus, the user needs to be granted the viewReputationSources
Argus function.
Example#
curl -X GET 'https://api.mnemonic.no/reputation/v2/source/mysource' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key'
Listing Sources#
GET /reputation/v2/source
Access control#
To list sources in Argus, the user needs to be granted the viewReputationSources
Argus function. Additionally,
only Sources where the user has access to its read function will be returned
Example#
curl -X GET 'https://api.mnemonic.no/reputation/v2/source' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key'
Searching for Sources#
POST /reputation/v2/source/search
Available search terms:
shortName
name
description
Access Control#
To search for sources in Argus, the user needs to be granted the viewReputationSources
Argus function. Additionally,
only Sources where the user has access to its read function will be returned.
Example#
curl -X POST 'https://api.mnemonic.no/reputation/v2/source/search' \
-H 'Content-Type: application/json' \
-H 'Argus-API-Key: my/api/key' \
-d '{
"keywords": ["mysource"]
}'