{ "swagger": "2.0", "info": { "title": "Aggregate Rating API", "description": "The average rating based on multiple ratings or reviews.", "termsOfService": "http:\/\/apievangelist.com\/terms-of-service.html", "version": "v1" }, "host": "aggregate.rating.example.com", "basePath": "\/", "schemes": ["http"], "produces": ["application\/json"], "paths": { "\/aggregate-rating\/": { "get": { "summary": "Get Aggregate Rating", "description": "Returns Aggregate Rating", "operationId": "getAggregateRating", "parameters": [{ "name": "q", "in": "query", "description": "Keyword search for item", "required": false, "type": "string" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/AggregateRating" } } } }, "tags": ["Aggregate Rating"] }, "post": { "summary": "Add Aggregate Rating", "description": "Add Aggregate Rating", "operationId": "addAggregateRating", "parameters": [{ "name": "additionaltype", "in": "formData", "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "required": false, "type": "url" }, { "name": "aggregaterating", "in": "formData", "description": "The overall rating, based on a collection of reviews or ratings, of the item. ", "required": false, "type": "creativework or product or brand or offer or organization or place or event or service" }, { "name": "alternatename", "in": "formData", "description": "An alias for the item.", "required": false, "type": "text" }, { "name": "bestrating", "in": "formData", "description": "The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.", "required": false, "type": "text or number" }, { "name": "description", "in": "formData", "description": "A short description of the item.", "required": false, "type": "text" }, { "name": "image", "in": "formData", "description": "An image of the item. This can be a URL or a fully described ImageObject.", "required": false, "type": "url or imageobject" }, { "name": "itemreviewed", "in": "formData", "description": "The item that is being reviewed\/rated.", "required": false, "type": "thing" }, { "name": "mainentityofpage", "in": "formData", "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "required": false, "type": "creativework or url" }, { "name": "name", "in": "formData", "description": "The name of the item.", "required": false, "type": "text" }, { "name": "potentialaction", "in": "formData", "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "required": false, "type": "action" }, { "name": "ratingcount", "in": "formData", "description": "The count of total number of ratings.", "required": false, "type": "integer" }, { "name": "ratingvalue", "in": "formData", "description": "The rating for the content.", "required": false, "type": "text" }, { "name": "reviewcount", "in": "formData", "description": "The count of total number of reviews.", "required": false, "type": "integer" }, { "name": "sameas", "in": "formData", "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "required": false, "type": "url" }, { "name": "url", "in": "formData", "description": "URL of the item.", "required": false, "type": "url" }, { "name": "worstrating", "in": "formData", "description": "The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.", "required": false, "type": "text or number" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/AggregateRating" } } } }, "tags": ["Aggregate Rating"] } }, "\/aggregate-rating\/{id}\/": { "get": { "summary": "Get Aggregate Rating", "description": "Returns a single Aggregate Rating", "operationId": "getAggregateRating", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/AggregateRating" } } } }, "tags": ["Aggregate Rating"] }, "put": { "summary": "Update Aggregate Rating", "description": "Update a single Aggregate Rating", "operationId": "updateAggregateRatingItem", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }, { "name": "additionaltype", "in": "formData", "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "required": false, "type": "url" }, { "name": "aggregaterating", "in": "formData", "description": "The overall rating, based on a collection of reviews or ratings, of the item. ", "required": false, "type": "creativework or product or brand or offer or organization or place or event or service" }, { "name": "alternatename", "in": "formData", "description": "An alias for the item.", "required": false, "type": "text" }, { "name": "bestrating", "in": "formData", "description": "The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.", "required": false, "type": "text or number" }, { "name": "description", "in": "formData", "description": "A short description of the item.", "required": false, "type": "text" }, { "name": "image", "in": "formData", "description": "An image of the item. This can be a URL or a fully described ImageObject.", "required": false, "type": "url or imageobject" }, { "name": "itemreviewed", "in": "formData", "description": "The item that is being reviewed\/rated.", "required": false, "type": "thing" }, { "name": "mainentityofpage", "in": "formData", "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "required": false, "type": "creativework or url" }, { "name": "name", "in": "formData", "description": "The name of the item.", "required": false, "type": "text" }, { "name": "potentialaction", "in": "formData", "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "required": false, "type": "action" }, { "name": "ratingcount", "in": "formData", "description": "The count of total number of ratings.", "required": false, "type": "integer" }, { "name": "ratingvalue", "in": "formData", "description": "The rating for the content.", "required": false, "type": "text" }, { "name": "reviewcount", "in": "formData", "description": "The count of total number of reviews.", "required": false, "type": "integer" }, { "name": "sameas", "in": "formData", "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "required": false, "type": "url" }, { "name": "url", "in": "formData", "description": "URL of the item.", "required": false, "type": "url" }, { "name": "worstrating", "in": "formData", "description": "The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.", "required": false, "type": "text or number" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/AggregateRating" } } } }, "tags": ["Aggregate Rating"] }, "delete": { "summary": "Aggregate Rating", "description": "Deletes a single Aggregate Rating", "operationId": "deleteAggregateRating", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/AggregateRating" } } } }, "tags": ["Aggregate Rating"] } } }, "definitions": { "AggregateRating": { "properties": { "additionaltype": { "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "type": "url" }, "aggregaterating": { "description": "The overall rating, based on a collection of reviews or ratings, of the item. ", "type": "creativework or product or brand or offer or organization or place or event or service" }, "alternatename": { "description": "An alias for the item.", "type": "text" }, "bestrating": { "description": "The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.", "type": "text or number" }, "description": { "description": "A short description of the item.", "type": "text" }, "image": { "description": "An image of the item. This can be a URL or a fully described ImageObject.", "type": "url or imageobject" }, "itemreviewed": { "description": "The item that is being reviewed\/rated.", "type": "thing" }, "mainentityofpage": { "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "type": "creativework or url" }, "name": { "description": "The name of the item.", "type": "text" }, "potentialaction": { "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "type": "action" }, "ratingcount": { "description": "The count of total number of ratings.", "type": "integer" }, "ratingvalue": { "description": "The rating for the content.", "type": "text" }, "reviewcount": { "description": "The count of total number of reviews.", "type": "integer" }, "sameas": { "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "type": "url" }, "url": { "description": "URL of the item.", "type": "url" }, "worstrating": { "description": "The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.", "type": "text or number" } } } } }