Accelerate the Value of Data

Set Ratings Configuration for User Roles

This operation can set Ratings Configuration for User Roles to already existing configuration.

The " minVoteWeight ", " maxVoteWeight " should be a number in a range [0,5]. " monthsToMinWeight " should be a non-negative number.

Request:

PUT {TenantURL}/ratingConfiguration/userRoles
Table 1. Set Ratings Configuration for User Roles Parameters

Name

Required

Description

Headers

Yes

"Content-Type: application/json".

Body

Yes

JSON object with Ratings Configuration for User Roles

Response

If the configuration created successfully then response will contain JSON with whole ratings configuration

Request

PUT {TenantURL}/ratingConfiguration/userRoles
 
Body:
{
    "ROLE_ADMIN": [
        {
            "uris": ["configuration/relationTypes/HasAddress"],
            "minVoteWeight": 0,
            "maxVoteWeight": 3,
            "monthsToMinWeight": 2.6
        }
    ]
}

Example response

Is the same as for GET {TenantURL}/ratingConfiguration.

GET {TenantURL}/ratingConfiguration
 
Body:
{
   "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
         }
      ]
   }
}