Rating API
The Rating API is used to define rules of how to calculate rating for objects.
Rating Configuration has the following format:
{
"timestamp": 12345,
"sources":{
"configuration/sources/FB":[
{
"uris":[
"configuration/relationTypes/HasAddress",
"configuration/relationTypes/Employment"
],
"minVoteWeight":2.0,
"maxVoteWeight":5.0,
"monthsToMinWeight":4.0
},
{
"minVoteWeight":1.0,
"maxVoteWeight":2.0,
"monthsToMinWeight":1.0
}
],
"configuration/sources/LNKD":[
{
"uris":[
"configuration/relationTypes/HasAddress"
],
"minVoteWeight":2.0,
"maxVoteWeight":5.0,
"monthsToMinWeight":4.0
},
{
"minVoteWeight":1.0,
"maxVoteWeight":2.0,
"monthsToMinWeight":1.0
}
]
},
"userRoles":{
"ROLE_ADMIN":[
{
"uris":[
"configuration/relationTypes/HasAddress"
],
"minVoteWeight":1.0,
"maxVoteWeight":10.0,
"monthsToMinWeight":2.6
}
]
}
}
It contains rating calculation for source systems inside a relation and for roles of users who
made votes. This JSON contains configuration for desired source systems and user roles.
Each source system and user role contains weights configuration connected to relation
types. Weights configuration may not contain the list of relation types - such
configuration is default. The timestamp
property contains timestamp of
last modification for this configuration.