Ratings
Returns ratings matching the given search criteria.
Only parameters that are specified in this request and have not null values are used for filtering. All other parameters are ignored.
The returned ratings satisfy all constraints that are specified in this search criteria. By default, the result contains up to 1000 ratings.
The first result to retrieve. If not set (offset = 0), results will be retrieved starting from row 0.
0The maximum number of results to retrieve. If not set (limit = 0), the default limit will be used. The maximum allowed limit is 1000.
0Allows to limit the number of elements that will be counted. -1 will count everything and 0 will cause the count to be skipped
-1The order of sorting (on creation date) the found ratings.
DESCPossible values: The ID of the asset the rating belongs to.
The ID of the rating author.
The paged response with found ratings.
The total number of results.
1000The offset for the results.
10The maximum number of results to be returned.
100GET /rest/2.0/ratings HTTP/1.1
Authorization: Basic username:password
Accept: */*
The paged response with found ratings.
{
"total": 1000,
"offset": 10,
"limit": 100,
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"createdOn": 1475503010320,
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"lastModifiedOn": 1476703764163,
"system": true,
"rating": 0.2,
"review": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
}
}
]
}Adds a new rating.
The value of the rating. Allowed values are 0.2, 0.4, 0.6, 0.8, 1.0 (representing 1 to 5 stars).
0.6Possible values: The review attached to the rating.
This is a reviewThe ID of the asset to which the rating will be assigned.
Rating successfully added.
Represents a rating. A rating is a numerical value representing the author's opinion about the rated resource. Ratings can be accompanied by written reviews.
The id of the represented object (entity).
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. To stay backwards compatible while still allowing new types of resources to be introduced, a resource discriminator property (of type String) has been added to the subtypes of Resource where it adds value, e.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute. A discriminator is only added on subtypes whose declared return type can represent more than one kind of resource; it is omitted where the return type can only ever be a single kind, as it would then always hold the same value and carry no additional information. For new types of resource that didn't exist before this change, the resourceType will be BaseDataType.
The value of the rating represented as a floating point number between 0 and 1.
0.2The review attached to the rating.
POST /rest/2.0/ratings HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"rating": 0.6,
"review": "This is a review",
"assetId": "123e4567-e89b-12d3-a456-426614174000"
}Rating successfully added.
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"createdOn": 1475503010320,
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"lastModifiedOn": 1476703764163,
"system": true,
"rating": 0.2,
"review": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
}
}Returns the rating with the specified ID.
The ID of the rating.
Rating found.
Represents a rating. A rating is a numerical value representing the author's opinion about the rated resource. Ratings can be accompanied by written reviews.
The id of the represented object (entity).
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. To stay backwards compatible while still allowing new types of resources to be introduced, a resource discriminator property (of type String) has been added to the subtypes of Resource where it adds value, e.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute. A discriminator is only added on subtypes whose declared return type can represent more than one kind of resource; it is omitted where the return type can only ever be a single kind, as it would then always hold the same value and carry no additional information. For new types of resource that didn't exist before this change, the resourceType will be BaseDataType.
The value of the rating represented as a floating point number between 0 and 1.
0.2The review attached to the rating.
Rating with given ID could not be found.
GET /rest/2.0/ratings/{ratingId} HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"createdOn": 1475503010320,
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"lastModifiedOn": 1476703764163,
"system": true,
"rating": 0.2,
"review": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
}
}Removes the rating with the specified ID.
The ID of the rating to be removed.
Rating successfully removed.
No content
Rating with given ID could not be found.
DELETE /rest/2.0/ratings/{ratingId} HTTP/1.1
Authorization: Basic username:password
Accept: */*
No content
Modifies the rating with the specified ID.
Only properties that are specified in these requests and have not null values are updated. All other properties are ignored.
The ID of the rating to be changed.
The value of the rating. Allowed values are 0.2, 0.4, 0.6, 0.8, 1.0 (representing 1 to 5 stars).
0.6Possible values: The review attached to the rating.
Rating successfully changed.
Represents a rating. A rating is a numerical value representing the author's opinion about the rated resource. Ratings can be accompanied by written reviews.
The id of the represented object (entity).
The id of the user that created this resource.
4d250cc5-e583-4640-9874-b93d82c7a6cbThe timestamp (in UTC time standard) of the creation of this resource.
1475503010320The id of the user who modified this resource the last time.
a073ff90-e7bc-4b35-ba90-c4d475f642feThe timestamp (in UTC time standard) of the last modification of this resource.
1476703764163Whether this is a system resource or not.
The type of the resource, e.g. [Community, Asset, Domain, Attribute, Relation, WorkflowInstance, ...]. This property is deprecated and will be removed in the future. To stay backwards compatible while still allowing new types of resources to be introduced, a resource discriminator property (of type String) has been added to the subtypes of Resource where it adds value, e.g. assignedResourceDiscriminator on AssignedResource, or attributeDiscriminator on Attribute. A discriminator is only added on subtypes whose declared return type can represent more than one kind of resource; it is omitted where the return type can only ever be a single kind, as it would then always hold the same value and carry no additional information. For new types of resource that didn't exist before this change, the resourceType will be BaseDataType.
The value of the rating represented as a floating point number between 0 and 1.
0.2The review attached to the rating.
Rating with given ID could not be found.
PATCH /rest/2.0/ratings/{ratingId} HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"rating": 0.6,
"review": "text"
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdBy": "4d250cc5-e583-4640-9874-b93d82c7a6cb",
"createdOn": 1475503010320,
"lastModifiedBy": "a073ff90-e7bc-4b35-ba90-c4d475f642fe",
"lastModifiedOn": 1476703764163,
"system": true,
"rating": 0.2,
"review": "text",
"asset": {
"id": "2b7f3a1a-4e50-4077-96f0-a58a395c860d",
"resourceDiscriminator": "Community",
"name": "text"
}
}Last updated
Was this helpful?