CampusAPI Commenting Services API documentation version 0.1.5
Based on OSID version 3.0.0
https://base.url/commenting
Overview
The Commenting service package provides a means of relating user comments and ratings to other Objects.
Commenting may be used as an auxiliary service orchestrated with other service pachages to either provide administrative comments as well as to create a social network style of comment and rating service to various other objects.
This package includes the following entities:
Comments
Comments contain text entries logged by date and Agent. A Comment may also include a rating represented by a Grade defined in a GradeSystem. Rating lookup services may be used to query cumulative scores across an object reference or the entire Book.
Comments are relationships between a commentor and a reference Id. The relationship defines dates for which the comment and/or rating is effective.
Commentors: An Agent comments on something. As a person is represented by a Resource in the Resource service package, the Comments provide access to both the commenting Agent and the related Resource to avoid the need of an additional service orchestration for resolving the Agent
Field | Description | Type |
---|---|---|
id(read‑only) | The unique id of this comment, provided by system. | string(osid‑id) |
uri(read‑only) | The uri of this comment, provided by system. | string(uri) |
displayName | The name of this comment for display. | string |
description | The description of this comment. | string |
genusTypeId (read‑only) | Id of the immutable type of this comment. Default type set by system unless specified in query parameter. | string(osid‑id) |
recordTypeIds (read‑only) | Type Ids of record types available on this comment. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere. | string(osid‑id)[] |
startDate | The starting date of this comment. | string(date‑time) |
endDate | The ending date of this comment. | string(date‑time) |
endReasonId | The reason this comment ended. References a process.State object. | string(osid‑id) |
referenceId (read‑only) | The reference associated with this comment. References an id.Id object. | string(osid‑id) |
commentorId (read‑only) | The commentor associated with this comment. References a resource.Resource object. | string(osid‑id) |
text | The comment text. | string |
ratingId | The Grade. References a grading.Grade object | string(osid‑id) |
Books
Comments are cataloged in Books which may also be grouped hierarchically to federate multiple collections of comments.
Field | Description | Type |
---|---|---|
id(read‑only) | The unique id of this book, provided by system. | string(osid‑id) |
uri(read‑only) | The uri of this book, provided by system. | string(uri) |
displayName | The name of this book for display. | string |
description | The description of this book. | string |
genusTypeId (read‑only) | Id of the immutable type of this book. Default type set by system unless specified in query parameter. | string(osid‑id) |
recordTypeIds (read‑only) | Type Ids of record types available on this book. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere. | string(osid‑id)[] |
providerId | The provider of this book. References a resource.Resource object. | string(osid‑id) |
brandingIds | The branding of this book. References repository.Asset objects. | string(osid‑id)[] |
license | The licensing that applies to this book. | string |
License
CampusAPI REST Documentation Copyright 2023 DXtera Institute. Based on the Open Service Interface Definitions: http://osid.org
/comments
Collection of Comments in a system, federation of systems, or in a default Book.
Get all Comments in the system or default Book.
Create a new Comment in the default Book.
get /comments
Get all Comments in the system or default Book.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", "endReason", "rating", "reference", "commentor", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
- genusTypeId: (string)
The id string to match a genusType
Example:
type.Type%3AexampleCommentType%40dxtera.org
- parentGenusTypeId: (string)
The id string to match a parent genusType
Example:
type.Type%3AparentTypeExampleCommentType%40dxtera.org
- recordTypeId: (string)
The id string to match a recordType
Example:
type.Type%3AexampleCommentType%40campusapi.org
- fromDate: (string)
Get all comments from this date inclusive. Use with toDate to define date range query.
Example:
2020-10-03
- toDate: (string)
Get all comments up to this date inclusive. Use with fromDate to define date range query.
Example:
2020-12-18
- referenceId: (string)
the id string to match a reference.
Example:
resource.Resource%3A504%40base.url
- commentorId: (string)
the id string to match a commentor.
Example:
resource.Resource%3A504%40base.url
- bookId: (string)
The id string to match a book
Example:
commenting.Book%3A8374%40base.url
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Comment:1186@base.url",
"uri": "http://base.url/open/campusapi/commenting/comment/commenting.Comment%3A1186%40base.url",
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"genusTypeId": "type.Type:defaultCommentType@base.url",
"recordTypeIds": [ "type.Type:exampleCommentRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1186@base.url",
"referenceId": "id.Id:9031@base.url",
"commentorId": "resource.Resource:1162@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:4392@base.url"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
post /comments
Create a new Comment in the default Book.
Query Parameters
- referenceId: required(string)
the reference of this comment.
Example:
resource.Resource%3A504%40base.url
- commentorId: required(string)
the commentor of this comment.
Example:
resource.Resource%3A504%40base.url
- genusType: (string)
specify a particular comment type to create
Example:
type.Type%3AexampleCommentType%40dxtera.org
- recordType: (array of )
specify support for one or more comment record types
Example:
[ "type.Type%3AexampleCommentRecordType%40campusapi.org", "..." ]
- bookId: (string)
specify in which book to create this comment
Example:
commenting.Book%3A8374%40base.url
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Comment",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this comment, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this comment, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this comment for display.",
"type": "string"
},
"description": {
"description": "The description of this comment.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this comment. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this comment. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this comment.",
"type": "string",
"format": "date-time"
},
"endDate": {
"description": "The ending date of this comment.",
"type": "string",
"format": "date-time"
},
"endReasonId": {
"description": "The reason this comment ended.",
"type": "string",
"format": "osid-id"
},
"referenceId": {
"description": "The reference associated with this comment.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"commentorId": {
"description": "The commentor associated with this comment.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"text": {
"description": "The comment text.",
"type": "string"
},
"ratingId": {
"description": "The Grade.",
"type": "string",
"format": "osid-id"
}
}
}
Example:
{
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:5885@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:8082@base.url"
}
Query the collection of Comments in a system, federation of systems, or in a default book by posting a Query object.
Submit a query using a CommentQuery object.
post /comments/comment-query
Submit a query using a CommentQuery object.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", "endReason", "rating", "reference", "commentor", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CommentQuery",
"type": "object",
"properties": {
"matchIds": {
"description": "List of Ids to match. Boolean OR performed among multiple Ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchKeywords": {
"description": "List keywords to match. Multiple keywords can be added to perform a boolean OR among them. A keyword may be applied to any of the elements defined in this object such as the display name, description or any attribute defined in or implemented by this object.",
"type": "array",
"items": {
"type": "object",
"properties": {
"keyword": {
"description": "keyword to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchDisplayNames": {
"description": "List of displayName strings to match. Boolean OR performed among multiple displayNames.",
"type": "array",
"items": {
"type": "object",
"properties": {
"displayName": {
"description": "displayName to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchDescriptions": {
"description": "List of discription strings to match. Boolean OR performed among multiple descriptions.",
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"description": "description to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchGenusTypeIds": {
"description": "List of genus type ids to match. Boolean OR performed among multiple ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"genusTypeid": {
"description": "genus type id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchRecordTypeIds": {
"description": "List of record type ids to match. Boolean OR performed among multiple ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"genusTypeid": {
"description": "record type id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchEffective": {
"description": "Match effective objects where the current date falls within the start and end dates inclusive. true to match any effective, false to match ineffective",
"type": "boolean"
},
"matchStartDate": {
"description": "Matches temporals whose start date falls in between the given dates inclusive.",
"type": "object",
"properties": {
"start": {
"description": "start of date range",
"type": "string",
"format": "date-time"
},
"end": {
"description": "end of date range",
"type": "string",
"format": "date-time"
},
"match": {
"description": "true if a positive match, false for negative match",
"type": "boolean"
}
}
},
"matchEndDate": {
"description": "Matches temporals whose end date falls in between the given dates inclusive.",
"type": "object",
"properties": {
"start": {
"description": "start of date range",
"type": "string",
"format": "date-time"
},
"end": {
"description": "end of date range",
"type": "string",
"format": "date-time"
},
"match": {
"description": "true if a positive match, false for negative match",
"type": "boolean"
}
}
},
"matchEndReasonIds": {
"description": "List of end reason Id's to match.",
"type": "array",
"items": {
"type": "object",
"properties": {
"stateId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"endReasonQueries": {
"description": "process.StateQueries to match end reason state. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
},
"matchAnyEndReason": {
"description": "Match end reasons with any value. true to match Comments with any end reason, false to match Comments with no end reason",
"type": "boolean"
},
"matchReferenceIds": {
"description": "List of reference Ids for this query to match comment that have a related reference.",
"type": "array",
"items": {
"type": "object",
"properties": {
"ruleId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"referenceQueries": {
"description": "ReferenceQueries to match the reference. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
},
"matchCommentorIds": {
"description": "List of commentor Ids for this query to match comment that have a related commentor.",
"type": "array",
"items": {
"type": "object",
"properties": {
"ruleId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"commentorQueries": {
"description": "CommentorQueries to match the commentor. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
},
"matchText": {
"description": "List of Text strings to match. Boolean OR performed among multiple texts.",
"type": "array",
"items": {
"type": "object",
"properties": {
"texts": {
"description": "texts to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchAnyText": {
"description": "Match texts with any value. true to match Comments with any text, false to match ProgramOfferings with no text",
"type": "boolean"
},
"matchRatingIds": {
"description": "List of Grade Ids for this query to match rating.",
"type": "array",
"items": {
"type": "object",
"properties": {
"ratingId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"ratingQueries": {
"description": "grading.GradeQueries to match the Rating. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
},
"matchAnyRating": {
"description": "Match rating with any value. true to match Comments with any rating, false to match Comments with no rating",
"type": "boolean"
},
"matchBookIds": {
"description": "List of Book Id's to match.",
"type": "array",
"items": {
"type": "object",
"properties": {
"bookId": {
"description": "Book id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"bookQueries": {
"description": "BookQueries to match Book. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
}
}
}
Example:
{
"matchDisplayNames": [
{
"displayName": "string to exclude",
"match": false
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Comment:1186@base.url",
"uri": "http://base.url/open/campusapi/commenting/comment/commenting.Comment%3A1186%40base.url",
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"genusTypeId": "type.Type:defaultCommentType@base.url",
"recordTypeIds": [ "type.Type:exampleCommentRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1186@base.url",
"referenceId": "id.Id:9031@base.url",
"commentorId": "resource.Resource:1162@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:4392@base.url"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a Comment form metadata.
Get form metadata for creating a new Comment.
get /comments/metadata
Get form metadata for creating a new Comment.
Query Parameters
- referenceId: required(string)
the reference of this metadatum.
Example:
resource.Resource%3A504%40base.url
- commentorId: required(string)
the commentor of this metadatum.
Example:
resource.Resource%3A504%40base.url
- genusType: (string)
specify a particular comment type to create
Example:
type.Type%3AexampleCommentType%40dxtera.org
- recordType: (array of )
specify support for one or more comment record types
Example:
[ "type.Type%3AexampleCommentRecordType%40campusapi.org", "..." ]
- bookId: (string)
specify in which book to create this comment
Example:
commenting.Book%3A8374%40base.url
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Comment",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this comment, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this comment, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this comment for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this comment",
"linked": false
},
"description": {
"description": "The description of this comment.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this comment",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this comment. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this comment. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this comment.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:startDate@base.url",
"existingValue": "2020-10-03T08:00:00.000Z",
"elementLabel": "Start Date",
"instructions": "Enter a starting date for this comment",
"linked": false
},
"endDate": {
"description": "The ending date of this comment.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:endDate@base.url",
"existingValue": "2020-12-18T17:00:00.000Z",
"elementLabel": "End Date",
"instructions": "Enter an ending date for this comment",
"linked": false
},
"endReasonId": {
"description": "The reason this comment ended. A process/State object.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:endReason@base.url",
"existingValue": "process.State:1860@base.url",
"elementLabel": "End Reason",
"instructions": "Select the reason this comment ended",
"linked": false
},
"text": {
"description": "The comment text.",
"type": "string",
"read-only": false,
"minLength": null,
"maxLength": null,
"pattern": "",
"default": "",
"enum": [],
"elementId": "commenting.Comment:text@dxtera.org",
"existingValue": "The existing text",
"elementLabel": "Text",
"instructions": "Enter a text for this comment.",
"linked": false
},
"ratingId": {
"description": "The Grade.",
"type": "string",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "commenting.Comment:rating@dxtera.org",
"existingValue": null,
"elementLabel": "Rating",
"instructions": "Enter the Id of the rating for this comment.",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a Comment
Get a particular Comment given its id.
Update a particular Comment given its id.
Delete a particular Comment given its id.
get /comments/{commentId}
Get a particular Comment given its id.
URI Parameters
- commentId: required(string)
Query Parameters
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", "endReason", "rating", "reference", "commentor", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": "commenting.Comment:1186@base.url",
"uri": "http://base.url/open/campusapi/commenting/comment/commenting.Comment%3A1186%40base.url",
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"genusTypeId": "type.Type:defaultCommentType@base.url",
"recordTypeIds": [ "type.Type:exampleCommentRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1186@base.url",
"referenceId": "id.Id:9031@base.url",
"commentorId": "resource.Resource:1162@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:4392@base.url"
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Comment not found" }
put /comments/{commentId}
Update a particular Comment given its id.
URI Parameters
- commentId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Comment",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this comment, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this comment, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this comment for display.",
"type": "string"
},
"description": {
"description": "The description of this comment.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this comment. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this comment. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this comment.",
"type": "string",
"format": "date-time"
},
"endDate": {
"description": "The ending date of this comment.",
"type": "string",
"format": "date-time"
},
"endReasonId": {
"description": "The reason this comment ended.",
"type": "string",
"format": "osid-id"
},
"referenceId": {
"description": "The reference associated with this comment.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"commentorId": {
"description": "The commentor associated with this comment.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"text": {
"description": "The comment text.",
"type": "string"
},
"ratingId": {
"description": "The Grade.",
"type": "string",
"format": "osid-id"
}
}
}
Example:
{
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:5885@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:8082@base.url"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The Comment has been updated" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Comment not found" }
delete /comments/{commentId}
Delete a particular Comment given its id.
URI Parameters
- commentId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The Comment has been deleted" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Comment not found" }
Entity representing a Comment form metadata for update
Get form metadata for updating an existing Comment.
get /comments/{commentId}/metadata
Get form metadata for updating an existing Comment.
URI Parameters
- commentId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Comment",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this comment, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this comment, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this comment for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this comment",
"linked": false
},
"description": {
"description": "The description of this comment.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this comment",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this comment. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this comment. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"startDate": {
"description": "The starting date of this comment.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:startDate@base.url",
"existingValue": "2020-10-03T08:00:00.000Z",
"elementLabel": "Start Date",
"instructions": "Enter a starting date for this comment",
"linked": false
},
"endDate": {
"description": "The ending date of this comment.",
"type": "string",
"format": "date-time",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:endDate@base.url",
"existingValue": "2020-12-18T17:00:00.000Z",
"elementLabel": "End Date",
"instructions": "Enter an ending date for this comment",
"linked": false
},
"endReasonId": {
"description": "The reason this comment ended. A process/State object.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Comment.Comment:endReason@base.url",
"existingValue": "process.State:1860@base.url",
"elementLabel": "End Reason",
"instructions": "Select the reason this comment ended",
"linked": false
},
"text": {
"description": "The comment text.",
"type": "string",
"read-only": false,
"minLength": null,
"maxLength": null,
"pattern": "",
"default": "",
"enum": [],
"elementId": "commenting.Comment:text@dxtera.org",
"existingValue": "The existing text",
"elementLabel": "Text",
"instructions": "Enter a text for this comment.",
"linked": false
},
"ratingId": {
"description": "The Grade.",
"type": "string",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "commenting.Comment:rating@dxtera.org",
"existingValue": null,
"elementLabel": "Rating",
"instructions": "Enter the Id of the rating for this comment.",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "comment not found" }
/books
Collection of Books in a system or federation of systems.
Get all Books.
Create a new Book.
get /books
Get all Books.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", "provider", "branding", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
- genusTypeId: (string)
The id string to match a genusType
Example:
type.Type%3AexampleBookType%40dxtera.org
- parentGenusTypeId: (string)
The id string to match a parent genusType
Example:
type.Type%3AparentTypeExampleBookType%40dxtera.org
- recordTypeId: (string)
The id string to match a recordType
Example:
type.Type%3AexampleBookType%40campusapi.org
- providerId: (string)
Id string to match provider.
Example:
resource.Resource%3A3007%40demo.dxtera.org
- commentId: (string)
Get books mapped to this comment.
Example:
commenting.Comment%3A280%40demo.dxtera.org
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
post /books
Create a new Book.
Query Parameters
- genusType: (string)
specify a particular book type to create
Example:
type.Type%3AexampleBookType%40dxtera.org
- recordType: (array of )
specify support for one or more book record types
Example:
[ "type.Type%3AexampleBookRecordType%40campusapi.org", "..." ]
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Book",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this book, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this book, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this book for display.",
"type": "string"
},
"description": {
"description": "The description of this book.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this book. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this book. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this book.",
"type": "string",
"format": "osid-id"
},
"brandingIds": {
"description": "The branding of this book. A collection of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id"
}
},
"license": {
"description": "The licensing that applies to this book.",
"type": "string"
}
}
}
Example:
{
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
}
Query the collection of Books in a system, federation of systems, or in a default book by posting a Query object.
Submit a query using a BookQuery object.
post /books/book-query
Submit a query using a BookQuery object.
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "BookQuery",
"type": "object",
"properties": {
"matchIds": {
"description": "List of Ids to match. Boolean OR performed among multiple Ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchKeywords": {
"description": "List keywords to match. Multiple keywords can be added to perform a boolean OR among them. A keyword may be applied to any of the elements defined in this object such as the display name, description or any attribute defined in or implemented by this object.",
"type": "array",
"items": {
"type": "object",
"properties": {
"keyword": {
"description": "keyword to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchDisplayNames": {
"description": "List of displayName strings to match. Boolean OR performed among multiple displayNames.",
"type": "array",
"items": {
"type": "object",
"properties": {
"displayName": {
"description": "displayName to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchDescriptions": {
"description": "List of discription strings to match. Boolean OR performed among multiple descriptions.",
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"description": "description to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchGenusTypeIds": {
"description": "List of genus type ids to match. Boolean OR performed among multiple ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"genusTypeid": {
"description": "genus type id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchRecordTypeIds": {
"description": "List of record type ids to match. Boolean OR performed among multiple ids.",
"type": "array",
"items": {
"type": "object",
"properties": {
"genusTypeid": {
"description": "record type id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchProviderIds": {
"description": "List of provider Ids to match.",
"type": "array",
"items": {
"type": "object",
"properties": {
"stateId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"providerQueries": {
"description": "resource.ResourceQuery for provider. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
},
"matchAnyProvider": {
"description": "Match providers with any value. true to match Book with any provider, false to match Book with no provider",
"type": "boolean"
}
},
"matchBrandingIds": {
"description": "List of branding asset Ids to match.",
"type": "array",
"items": {
"type": "object",
"properties": {
"stateId": {
"description": "id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"brandingQueries": {
"description": "repository.AssetQuery for branding. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
},
"matchAnyBranding": {
"description": "Match brandingss with any value. true to match Book with any branding, false to match Book with no branding",
"type": "boolean"
},
"matchlicenses": {
"description": "List of license strings to match. Boolean OR performed among multiple descriptions.",
"type": "array",
"items": {
"type": "object",
"properties": {
"license": {
"description": "license to match",
"type": "string"
},
"stringMatchType": {
"description": "the string match type",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"matchBookIds": {
"description": "List of Book Id's to match.",
"type": "array",
"items": {
"type": "object",
"properties": {
"bookId": {
"description": "Book id to match",
"type": "string",
"format": "osid-id"
},
"match": {
"description": "true for a positive match, false for a negative match",
"type": "boolean"
}
}
}
},
"bookQueries": {
"description": "BookQueries to match Book. Each query performs a boolean OR.",
"type": "array",
"items": {
"type": "object"
}
}
}
}
Example:
{
"matchDisplayNames": [
{
"displayName": "string to exclude",
"match": false
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a Book form metadata.
Get form metadata for creating a new Book.
get /books/metadata
Get form metadata for creating a new Book.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Book",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this book, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this book, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this book for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this book",
"linked": false
},
"description": {
"description": "The description of this book.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this book",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this book. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this book. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this book.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:provider@base.url",
"existingValue": "",
"elementLabel": "Provider",
"instructions": "Enter the provider of this book",
"linked": false
},
"brandingIds": {
"description": "The branding of this book. A list of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id",
"pattern": "",
"enum": []
},
"read-only": false,
"default": [],
"elementId": "Book.Book:branding@base.url",
"existingValue": "",
"elementLabel": "Branding",
"instructions": "Enter the branding images for this book",
"linked": false
},
"license": {
"description": "The licensing that applies to this book.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:license@base.url",
"existingValue": "The Existing License",
"elementLabel": "License",
"instructions": "Include a license for this book",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
The root Books in the Book hierarchy. A node with no parents is an orphan. While all Book Ids are known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.
Get all root root-book
get /books/root-book
Get all root root-book
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Entity representing a Book
Get a particular Book given its id.
Update a particular Book given its id.
Delete a particular Book given its id.
get /books/{bookId}
Get a particular Book given its id.
URI Parameters
- bookId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Book not found" }
put /books/{bookId}
Update a particular Book given its id.
URI Parameters
- bookId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Book",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this book, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this book, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this book for display.",
"type": "string"
},
"description": {
"description": "The description of this book.",
"type": "string"
},
"genusTypeId": {
"description": "Id of the immutable type of this book. Default type set by system unless specified in query parameter.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this book. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this book.",
"type": "string",
"format": "osid-id"
},
"brandingIds": {
"description": "The branding of this book. A collection of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id"
}
},
"license": {
"description": "The licensing that applies to this book.",
"type": "string"
}
}
}
Example:
{
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The Book has been updated" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Book not found" }
delete /books/{bookId}
Delete a particular Book given its id.
URI Parameters
- bookId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The Book has been deleted" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "Book not found" }
Entity representing a Book form metadata for update
Get form metadata for updating an existing Book.
get /books/{bookId}/metadata
Get form metadata for updating an existing Book.
URI Parameters
- bookId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"$schema": "http://json-schema.org/draft/2019-9/schema#",
"title": "Book",
"type": "object",
"required": ["displayName"],
"properties": {
"id": {
"description": "The unique id of this book, provided by system.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"uri": {
"description": "The uri of this book, provided by system.",
"type": "string",
"format": "uri",
"readOnly": true
},
"displayName": {
"description": "The name of this book for display.",
"type": "string",
"read-only": false,
"minLength": 1,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:displayName@base.url",
"existingValue": "The Existing Name",
"elementLabel": "Name",
"instructions": "Enter a name for this book",
"linked": false
},
"description": {
"description": "The description of this book.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:displayName@demo.base.url",
"existingValue": "The Existing Description",
"elementLabel": "Description",
"instructions": "Enter a description for this book",
"linked": false
},
"genusTypeId": {
"description": "Id of the immutable type of this book. Default type set by system unless specified in query parameter on initial post.",
"type": "string",
"format": "osid-id",
"readOnly": true
},
"recordTypeIds": {
"description": "Type Ids of record types available on this book. Record types define special attributes available on an object to support specific applications or classes of applications and are documented elsewhere.",
"type": "array",
"items": {
"type": "string",
"format": "osid-id"
},
"readOnly": true
},
"providerId": {
"description": "The provider of this book.",
"type": "string",
"format": "osid-id",
"read-only": false,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:provider@base.url",
"existingValue": "",
"elementLabel": "Provider",
"instructions": "Enter the provider of this book",
"linked": false
},
"brandingIds": {
"description": "The branding of this book. A list of Assets.",
"type": "array",
"items" : {
"type": "string",
"format": "osid-id",
"pattern": "",
"enum": []
},
"read-only": false,
"default": [],
"elementId": "Book.Book:branding@base.url",
"existingValue": "",
"elementLabel": "Branding",
"instructions": "Enter the branding images for this book",
"linked": false
},
"license": {
"description": "The licensing that applies to this book.",
"type": "string",
"read-only": false,
"minLength": 0,
"maxLength": 128,
"pattern": "",
"default": "",
"enum": [],
"elementId": "Book.Book:license@base.url",
"existingValue": "The Existing License",
"elementLabel": "License",
"instructions": "Include a license for this book",
"linked": false
}
}
}
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{"message": "book not found" }
Get child Books for the given Book in the hierarchy.
get /books/{bookId}/children
Get child Books for the given Book in the hierarchy.
URI Parameters
- bookId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Add Book as child of the given Book in the hierarchy.
Remove the given Book as a child of the given Book in the hierarchy.
put /books/{bookId}/children/{childId}
Add Book as child of the given Book in the hierarchy.
URI Parameters
- bookId: required(string)
- childId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "The child Book has been added to the hierarchy" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "book not found" }
delete /books/{bookId}/children/{childId}
Remove the given Book as a child of the given Book in the hierarchy.
URI Parameters
- bookId: required(string)
- childId: required(string)
Get parent Books for the given Book in the hierarchy.
get /books/{bookId}/parents
Get parent Books for the given Book in the hierarchy.
URI Parameters
- bookId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Book:8344@base.url",
"uri": "http://base.url/open/campusapi/commenting/book/commenting.Book%3A8344%40base.url",
"displayName": "Display Name of this Book",
"description": "The description of this Book",
"genusTypeId": "type.Type:defaultBookType@base.url",
"recordTypeIds": [ "type.Type:exampleBookRecordType@campusapi.org", "..."],
"providerId": "resource.Resource:123@base.url",
"brandingId": "asset.Asset:Book@base.url",
"license": "The license that applies to this Book"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Get all Comments in this Book
get /books/{bookId}/comments
Get all Comments in this Book
URI Parameters
- bookId: required(string)
Query Parameters
- offset: (integer - default: 0)
Skip over a number of elements by specifying an offset value for the query
Example:
20
- limit: (integer - default: 10)
Limit the number of elements on the response
Example:
80
- expand: (string)
Expand object or type for named attribute: "genusType", "recordType", "endReason", "rating", "reference", "commentor", or "all" to expand all referenced objects or types. This parameter can be repeated to expand multiples.
Example:
all
- genusTypeId: (string)
The id string to match a genusType
Example:
type.Type%3AexampleCommentType%40dxtera.org
- parentGenusTypeId: (string)
The id string to match a parent genusType
Example:
type.Type%3AparentTypeExampleCommentType%40dxtera.org
- recordTypeId: (string)
The id string to match a recordType
Example:
type.Type%3AexampleCommentType%40campusapi.org
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": "commenting.Comment:1186@base.url",
"uri": "http://base.url/open/campusapi/commenting/comment/commenting.Comment%3A1186%40base.url",
"displayName": "Display Name of this Comment",
"description": "The description of this Comment",
"genusTypeId": "type.Type:defaultCommentType@base.url",
"recordTypeIds": [ "type.Type:exampleCommentRecordType@campusapi.org", "..."],
"startDate": "2020-10-03T06:30:00.000Z",
"endDate": "2020-12-18T19:30:00.000Z",
"endReasonId": "process.State:1186@base.url",
"referenceId": "id.Id:9031@base.url",
"commentorId": "resource.Resource:1162@base.url",
"text": "This is the Text",
"ratingId": "grading.Grade:4392@base.url"
},
{
"...": "..."
}
]
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
Add the given Comment to this Book
Remove the given Comment from the Book.
put /books/{bookId}/comments/{commentId}
Add the given Comment to this Book
URI Parameters
- bookId: required(string)
- commentId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "Comment has been added to Book" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "Comment not found" }
delete /books/{bookId}/comments/{commentId}
Remove the given Comment from the Book.
URI Parameters
- bookId: required(string)
- commentId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{ "message": "Comment has been removed" }
HTTP status code 403
Body
Media type: application/json
Type: any
Example:
{"message": "Permission denied" }
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{ "message": "Comment not found" }