name | type | description | default |
---|---|---|---|
filter | query | ||
pageIndex | query | 0 | |
pageSize | query | 20 | |
sort | query | timeOfCreation:desc |
media type | data type | description |
---|---|---|
application/json | PaginatedResponse (JSON) |
GET /v2/reviews
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"list" : [ {
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}, {
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
} ],
"totalCount" : 12345
}
A POST request to the /review
endpoint creates a user review.
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) | A UserReview object including the review content, the object to which the review applies and the user to whom the review is attributed. |
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) | The new UserReview object including the unique key assigned to it. |
POST /v2/reviews
Content-Type: application/json
Accept: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
A PUT request to the /review
endpoint updates a user review.
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) | A UserReview object including the updated properties of the review. Only properties provided are updated. |
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) | The updated UserReview object. |
PUT /v2/reviews
Content-Type: application/json
Accept: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
A DELETE request to the /review
endpoint deletes a user review identified by key.
name | type | description |
---|---|---|
key | path | The unique identifier for a user review. |
media type | data type | description |
---|---|---|
application/json | object (JSON) |
DELETE /v2/reviews/{key}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
...
name | type | description |
---|---|---|
datasourceKey | path |
media type | data type | description |
---|---|---|
application/json | ReviewsAggregate (JSON) |
GET /v2/reviews/aggregate/{datasourceKey}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"percentageOf2stars" : "...",
"percentageOf1stars" : "...",
"totalReviewers" : 12345,
"percentageOf3stars" : "...",
"totReviewsCount" : 12345,
"noOf4stars" : 12345,
"weightedAvg" : "...",
"noOf1stars" : 12345,
"noOf5stars" : 12345,
"percentageOf4stars" : "...",
"noOf2stars" : 12345,
"noOf3stars" : 12345,
"percentageOf5stars" : "..."
}
A GET request to the /review/entity/{entityKey}
endpoint returns reviews on a particular entity
identified by the entityKey.
name | type | description |
---|---|---|
entityKey | path | The unique identifier for the entity. |
media type | data type | description |
---|---|---|
application/json | array of UserReview (JSON) | An array of UserReview objects in JSON format. |
GET /v2/reviews/entity/{entityKey}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
} ]
A GET request to the /review/{reviewKey}
endpoint retrieves a particular review based on review key.
name | type | description |
---|---|---|
reviewKey | path | The unique reviewKey of the user review which has to be retrieved. |
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) | The UserReview object to which the unique key assigned to it. |
GET /v2/reviews/review/{reviewKey}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
A GET request to the /review/user/{user}
endpoint returns reviews generated by a particular user.
name | type | description |
---|---|---|
user | path | The name of the user profile. |
media type | data type | description |
---|---|---|
application/json | array of UserReview (JSON) | An array of UserReview objects in JSON format. |
GET /v2/reviews/user/{user}
Content-Type: application/json
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
} ]
name | type | description |
---|---|---|
user | path |
media type | data type |
---|---|
application/json | UserReview (JSON) |
media type | data type | description |
---|---|---|
application/json | UserReview (JSON) |
POST /v2/reviews/users/{user}
Content-Type: application/json
Accept: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"rating" : 12345,
"title" : "...",
"referenceKey" : "...",
"source" : "...",
"userTO" : {
"attributes" : {
"property1" : { },
"property2" : { }
},
"name" : "...",
"key" : "..."
},
"commentsCount" : 12345,
"entityKey" : "...",
"timeOfLastChange" : 12345,
"timeOfCreation" : 12345,
"key" : "...",
"description" : "...",
"type" : "...",
"restricted" : [ "...", "..." ],
"viewAble" : [ "...", "..." ],
"updateable" : [ "...", "..." ],
"richDescription" : "...",
"score" : 12345.0,
"customProperties" : [ {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
}, {
"description" : "...",
"value" : { },
"facetAble" : true,
"name" : "...",
"type" : "...",
"displayName" : "..."
} ]
}