Skip to content

Instantly share code, notes, and snippets.

@jonathanbarton
Created August 16, 2017 15:10
Show Gist options
  • Save jonathanbarton/bedbc6ac31118e76e76e788593e968e9 to your computer and use it in GitHub Desktop.
Save jonathanbarton/bedbc6ac31118e76e76e788593e968e9 to your computer and use it in GitHub Desktop.
test.json
{
"swagger":"2.0",
"info":{
"title":"Course Maps API",
"description":"API for interacting with Engrade Course Maps",
"contact":{
"name":"Isaac Riceweber",
"email":"isaac.riceweber@engrade.com"
},
"version":"v1"
},
"host":"connect2-api-qastg.mheducation.com",
"basePath":"\/coursemaps\/v1",
"schemes":[
"https"
],
"consumes":[
"application\/json"
],
"produces":[
"application\/json"
],
"paths":{
"\/folders\/{folderid}\/children\/{itemid}\/assignment":{
"post":{
"tags":[
"folders"
],
"description":"Creates an assignment for an item and creates a mapping between the item and assignment",
"operationId":"assignFolderItem",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"itemid",
"in":"path",
"description":"Identifier for the item that will be assigned",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
},
{
"name":"payload",
"in":"body",
"description":"Structure for JSON request payload",
"required":true,
"schema":{
"$ref":"#\/definitions\/InstructionParameters"
}
}
],
"responses":{
"200":{
"description":"Item was successfully assigned",
"schema":{
"properties":{
"assignment":{
"required":[
"assnid",
"clid"
],
"properties":{
"assnid":{
"description":"The assignment id of the newly created assignment",
"type":"string"
},
"clid":{
"description":"The id of the class that owns this assignment",
"type":"string"
}
},
"type":"object"
},
"item":{
"$ref":"#\/definitions\/Item"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid input parameter",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"403":{
"description":"Not authorized to assign the item in the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Item is not in the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"409":{
"description":"The item is already assigned",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"500":{
"description":"An error occurred with assigning the item",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
},
"delete":{
"tags":[
"folders"
],
"description":"Deletes an item from a folder",
"operationId":"unassignFolderItem",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"itemid",
"in":"path",
"description":"Identifier for the item that will be deleted",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
}
],
"responses":{
"200":{
"description":"Item was successfully assigned",
"schema":{
"properties":{
"assnid":{
"description":"ID of assignment associated with item",
"type":"integer"
},
"clid":{
"description":"ID of class assignment is in",
"type":"integer"
},
"itemid":{
"description":"ID of item in a course map folder",
"type":"integer"
},
"folderid":{
"description":"ID of folder item was contained in",
"type":"integer"
}
},
"type":"object"
}
},
"403":{
"description":"Not authorized to delete the item in the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Folder does not exist",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"500":{
"description":"An error occurred with deleting the item",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/":{
"get":{
"tags":[
"docs"
],
"description":"This document",
"operationId":"getSwaggerJson",
"responses":{
"200":{
"description":"This document"
}
}
}
},
"\/folders\/{folderid}":{
"get":{
"tags":[
"folders"
],
"description":"Contents of a folder as a tree structure, limited by the depth parameter.",
"operationId":"getFolder",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"depth",
"in":"query",
"description":"Depth of the tree to fetch.",
"required":false,
"type":"integer",
"minimum":-1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
}
],
"responses":{
"200":{
"description":"The folder, its contents, and subfolder contents.",
"schema":{
"properties":{
"folder":{
"$ref":"#\/definitions\/Folder"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid input parameter",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"401":{
"description":"Not authorized to view the course containing this folder.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Folder does not exist",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
},
"delete":{
"tags":[
"folders"
],
"description":"Deletes a single folder",
"operationId":"deleteFolder",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder to delete.",
"required":true,
"type":"integer",
"minimum":1
}
],
"responses":{
"200":{
"description":"Folder was successfully deleted",
"schema":{
"properties":[
],
"type":"object"
}
},
"403":{
"description":"Not authorized to delete the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"500":{
"description":"Unable to delete the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
},
"patch":{
"tags":[
"folders"
],
"description":"Update properties of a single folder, including the folder's children",
"operationId":"updateFolder",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"payload",
"in":"body",
"description":"Structure for JSON request payload",
"required":true,
"schema":{
"properties":{
"title":{
"description":"Plain text title for the folder",
"type":"string"
},
"titleHtml":{
"description":"HTML title for the folder",
"type":"string"
},
"children":{
"description":"List of ids that will become the children of the folder",
"type":"array",
"items":{
"type":"integer"
}
},
"presentationOrders":{
"description":"JsonObject keyed with the name(s) of presentationorder(s), with the values being arrays of itemIds. A null value indicates the presentation order should be removed entirely."
}
},
"type":"object"
}
}
],
"responses":{
"200":{
"description":"The updated folder",
"schema":{
"properties":{
"folder":{
"$ref":"#\/definitions\/Folder"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid input parameter",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"401":{
"description":"Not authorized to edit the course containing this folder.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Folder does not exist",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/folders\/{folderid}\/children\/{childid}":{
"delete":{
"tags":[
"folders"
],
"description":"Deletes an item from a folder",
"operationId":"deleteFolderItem",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the parent of the item to be deleted.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"childid",
"in":"path",
"description":"Identifier for the item to be deleted.",
"required":true,
"type":"integer",
"minimum":1
}
],
"responses":{
"200":{
"description":"Folder item successfully deleted",
"schema":{
"properties":[
],
"type":"object"
}
},
"403":{
"description":"Not authorized to delete the contents in this folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Folder does not exist",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"500":{
"description":"Error occurred while deleting the folder item",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
},
"patch":{
"tags":[
"items"
],
"description":"Update properties of a single item",
"operationId":"updateItem",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"childid",
"in":"path",
"description":"Identifier for the child item requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
},
{
"name":"payload",
"in":"body",
"description":"Structure for JSON request payload",
"required":true,
"schema":{
"properties":{
"includeInClassPresentation":{
"description":"Flag indicating item should be included in an in-class presentation, if applicable.",
"type":"boolean"
},
"visibleToStudents":{
"description":"Flag indicating item should be visible to student level users.",
"type":"boolean"
}
},
"type":"object"
}
}
],
"responses":{
"200":{
"description":"The updated item",
"schema":{
"properties":{
"item":{
"$ref":"#\/definitions\/Item"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid input parameter",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"401":{
"description":"User does not exist or is not logged in.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"403":{
"description":"Not authorized to edit the course containing this item.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Item does not exist",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/courses\/{courseid}":{
"get":{
"tags":[
"courses"
],
"description":"Fetch the entire tree of a course. A course is a folder with no parent.",
"operationId":"getCourse",
"parameters":[
{
"name":"courseid",
"in":"path",
"description":"Identifier for the course requested.",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
}
],
"responses":{
"200":{
"description":"The entire course tree.",
"schema":{
"properties":{
"course":{
"$ref":"#\/definitions\/Folder"
}
},
"type":"object"
}
},
"401":{
"description":"You do not have access to the course.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"The course does not exist.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/folders\/{folderid}\/layout":{
"get":{
"tags":[
"folders"
],
"description":"Fetch the layout metadata for a folder if it exists",
"operationId":"getFolderLayout",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder.",
"required":true,
"type":"integer",
"minimum":1
}
],
"responses":{
"200":{
"description":"The folder layout",
"schema":{
"properties":{
"layout":{
"$ref":"#\/definitions\/FolderLayout"
}
},
"type":"object"
}
},
"401":{
"description":"You do not have access to the course containing the folder.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"The folder does not exist, or a layout definition for the folder does not exist.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/folders\/{folderid}\/children":{
"post":{
"tags":[
"folders"
],
"description":"Add a child to a folder. Current version supports adding a file upload.",
"operationId":"addFolderChild",
"consumes":[
"multipart\/form-data"
],
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder that the item will be added to.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"isCustomContent",
"in":"formData",
"description":"File to upload",
"required":true,
"type":"file"
}
],
"responses":{
"200":{
"description":"The file that was added.",
"schema":{
"properties":{
"item":{
"$ref":"#\/definitions\/LaunchableItem"
}
},
"type":"object"
}
},
"400":{
"description":"File upload not provided in request",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"401":{
"description":"User does not exist or is not logged in.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"403":{
"description":"Not authorized to add the item to the folder.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"Item uploaded was not found when attempting to add it to the folder",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"500":{
"description":"Unable to find folder or item authorization, failure to upload file, or database insertion failure.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/items\/content":{
"post":{
"tags":[
"items"
],
"description":"A key value pair where key is the s3 url and the value is the content of the s3 url",
"operationId":"itemContent",
"parameters":[
{
"name":"urls",
"in":"body",
"description":"s3 URLs to resolve",
"required":true,
"schema":{
"type":"array"
}
}
],
"responses":{
"200":{
"description":"Map of s3 urls => resolved content",
"schema":{
"type":"object"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/user\/policy":{
"get":{
"tags":[
"user"
],
"description":"Returns a policy \u2014 a map of features flags \u2014 that apply to the user",
"operationId":"getPolicy",
"produces":[
"application\/json"
],
"parameters":[
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
}
],
"responses":{
"200":{
"description":"User policy",
"schema":{
"properties":{
"policy":{
"description":"User policy",
"$ref":"#\/definitions\/FeatureFlagSet"
}
},
"type":"object"
}
},
"501":{
"description":"Policy not implemented for profile",
"schema":{
"$ref":"#\/definitions\/Error"
}
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/folders\/{folderid}\/schedule":{
"post":{
"tags":[
"folders",
"calendars"
],
"description":"Add an item to the calendar",
"operationId":"scheduleFolder",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder to be added to the calendar.",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
},
{
"name":"payload",
"in":"body",
"schema":{
"$ref":"#\/definitions\/DateRange"
}
}
],
"responses":{
"200":{
"description":"The folder was added to the calendar.",
"schema":{
"properties":{
"schedule":{
"$ref":"#\/definitions\/DateRange"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid context type or date inputs.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"403":{
"description":"You do not have access to the context.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"The folder or item does not exist.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
},
"\/folders\/{folderid}\/children\/{childid}\/schedule":{
"post":{
"tags":[
"folders",
"items",
"calendars"
],
"description":"Add an item to the calendar",
"operationId":"scheduleItem",
"parameters":[
{
"name":"folderid",
"in":"path",
"description":"Identifier for the folder containing the item.",
"required":true,
"type":"integer",
"minimum":1
},
{
"name":"childid",
"in":"path",
"description":"Identifier for the item to be added to the calendar.",
"required":true,
"type":"integer",
"minimum":1
},
{
"$ref":"#\/parameters\/ContextType"
},
{
"$ref":"#\/parameters\/ContextId"
},
{
"name":"payload",
"in":"body",
"schema":{
"$ref":"#\/definitions\/DateRange"
}
}
],
"responses":{
"200":{
"description":"The item was added to the calendar.",
"schema":{
"properties":{
"schedule":{
"$ref":"#\/definitions\/DateRange"
}
},
"type":"object"
}
},
"400":{
"description":"Invalid context type, date inputs, or item type.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"403":{
"description":"You do not have access to the context.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"404":{
"description":"The folder or item does not exist.",
"schema":{
"$ref":"#\/definitions\/Error"
}
},
"default":{
"$ref":"#\/responses\/Error"
}
},
"security":[
{
"jwt":[
]
}
]
}
}
},
"definitions":{
"AssessmentParameters":{
"description":"Parameters to create assessment type assignments",
"allOf":[
{
"$ref":"#\/definitions\/AssignmentParameters"
},
{
"required":[
"title",
"start",
"due"
],
"properties":{
"title":{
"description":"Title of the assignment",
"type":"string"
},
"start":{
"description":"The start date of the assignment",
"type":"integer"
},
"due":{
"description":"The due date of the assignment",
"type":"integer"
},
"category":{
"description":"Assignment category",
"type":"integer"
}
},
"type":"object"
}
]
},
"Assignment":{
"description":"An object that references an assignment and its associated launchable item",
"allOf":[
{
"required":[
"startDate",
"dueDate",
"name",
"description",
"url"
],
"properties":{
"startDate":{
"description":"Start date",
"type":"string",
"format":"date-time"
},
"dueDate":{
"description":"Due date",
"type":"string",
"format":"date-time"
},
"name":{
"description":"Assignment name",
"type":"string"
},
"description":{
"description":"Assignment description",
"type":"string"
},
"url":{
"description":"URL",
"type":"string"
},
"resultUrl":{
"description":"Result URL",
"type":"string"
}
},
"type":"object"
}
]
},
"InstructionParameters":{
"description":"Parameters to create an instruction type assignments",
"allOf":[
{
"$ref":"#\/definitions\/AssignmentParameters"
},
{
"required":[
"title",
"points",
"start",
"due"
],
"properties":{
"title":{
"description":"Title of the assignment",
"type":"string"
},
"points":{
"description":"Amount of points the assignment is out of",
"type":"string"
},
"start":{
"description":"The start date of the assignment",
"type":"integer"
},
"due":{
"description":"The due date of the assignment",
"type":"integer"
},
"description":{
"description":"Assignment description",
"type":"string"
},
"category":{
"description":"Assignment category",
"type":"integer"
}
},
"type":"object"
}
]
},
"AssignmentParameters":{
"required":[
"itemid",
"clid"
],
"properties":{
"itemid":{
"description":"Item ID",
"type":"integer"
},
"clid":{
"description":"ID of the class that the item should be assigned to",
"type":"integer"
}
}
},
"Entity":{
"required":[
"type",
"title",
"id"
],
"properties":{
"type":{
"description":"The type of child. Value must be the Swagger definition name implementing this interface.",
"type":"string"
},
"title":{
"description":"User facing title of the item\/folder",
"type":"string"
},
"id":{
"description":"Primary identifier of the item\/folder",
"type":"integer",
"format":"int64",
"minimum":1
},
"visibleToStudents":{
"description":"Flag indicating if the item is visible to students",
"type":"boolean"
},
"schedule":{
"description":"Range of dates associated with this entity",
"$ref":"#\/definitions\/DateRange"
},
"coursewareId":{
"description":"Item id in published courseware used to create this course.",
"type":"string"
}
},
"discriminator":"type"
},
"Folder":{
"type":"object",
"allOf":[
{
"$ref":"#\/definitions\/Entity"
},
{
"required":[
"children"
],
"properties":{
"type":{
"type":"string",
"enum":[
"Folder"
]
},
"children":{
"type":"array",
"items":{
"$ref":"#\/definitions\/Entity"
}
},
"coursewareId":{
"description":"The ID of the respective MHE courseware for the folder",
"type":"string"
},
"titleHtml":{
"description":"The title of the folder styled with HTML",
"type":"string"
},
"presentationOrders":{
"description":"List of presentation orders where key is the name and value is a list of ints",
"type":"object",
"$ref":"#\/definitions\/PresentationOrders"
},
"instructorNotes":{
"description":"Instructor notes for the folder",
"type":"string"
},
"mheMetadataUrl":{
"description":"Url pointing to MHE metadata for item",
"type":"string"
},
"schedule":{
"description":"Dates associated with the folder on the class calendar",
"type":"object",
"$ref":"#\/definitions\/DateRange"
},
"isAddOn":{
"description":"Boolean that is true if the folder is an addon folder",
"type":"boolean"
}
},
"type":"object"
}
]
},
"FolderLayout":{
"properties":{
"sections":{
"description":"List of content sections",
"type":"array",
"items":{
"$ref":"#\/definitions\/FolderLayoutSection"
}
},
"backgroundImage":{
"description":"Optional url to a background image",
"type":"string"
}
}
},
"FolderLayoutRow":{
"properties":{
"content":{
"description":"List of item ids",
"type":"array",
"items":{
"type":"integer"
}
},
"columnWeights":{
"description":"Count of elements is the number of columns. Each value is the relative width of each column.",
"type":"array",
"items":{
"type":"integer"
}
}
}
},
"FolderLayoutSection":{
"required":[
"rows"
],
"properties":{
"title":{
"type":"string"
},
"backgroundImage":{
"type":"string"
},
"rows":{
"type":"array",
"items":{
"$ref":"#\/definitions\/FolderLayoutRow"
}
}
}
},
"PresentationOrders":{
"type":"object",
"additionalProperties":{
"type":"array",
"items":{
"type":"integer"
}
}
},
"Item":{
"allOf":[
{
"$ref":"#\/definitions\/Entity"
},
{
"properties":{
"iconUrl":{
"description":"Url pointing to the applicable icon.",
"type":"string"
},
"thumbnailUrl":{
"description":"Url pointing a thumbnail of the resource.",
"type":"string"
},
"includeInClassPresentation":{
"description":"Flag indicating item should be included in an in-class presentation, if applicable.",
"type":"boolean"
},
"tags":{
"description":"List of tags associated with item",
"type":"array",
"items":{
"$ref":"#\/definitions\/ItemTag"
},
"uniqueItems":true
},
"instructorNotes":{
"description":"Instructor notes for item",
"type":"string"
},
"mheMetadataUrl":{
"description":"Url pointing to MHE metadata for item",
"type":"string"
},
"audience":{
"description":"List of IMS Role values. If missing or empty, item is meant for all roles.",
"type":"array",
"items":{
"$ref":"#\/definitions\/UserRole"
},
"uniqueItems":true
}
},
"type":"object"
}
]
},
"ItemTag":{
"type":"string",
"enum":[
"Leveled"
]
},
"InlineImage":{
"allOf":[
{
"$ref":"#\/definitions\/Item"
},
{
"properties":{
"url":{
"description":"Url pointing to the image that should be displayed inline.",
"type":"string"
}
},
"type":"object"
}
]
},
"InlineText":{
"allOf":[
{
"$ref":"#\/definitions\/Item"
},
{
"properties":{
"url":{
"description":"URL to an S3 location that contains the inline text (HTML) data",
"type":"string"
}
},
"type":"object"
}
]
},
"LaunchableItem":{
"description":"An item that references an internal or external resource",
"allOf":[
{
"$ref":"#\/definitions\/Item"
},
{
"required":[
"url",
"resourceType",
"quizId"
],
"properties":{
"url":{
"description":"Fully qualified url pointing to the resource.",
"type":"string"
},
"resourceType":{
"description":"Identifier of the type of resource launched with the url.",
"type":"string"
},
"assignment":{
"description":"Assignment associated with the launchable item",
"$ref":"#\/definitions\/Assignment"
},
"quizId":{
"description":"Engrade quiz id associated with item. This will be the empty string if no such id exists.",
"type":"string"
}
},
"type":"object"
}
]
},
"FeatureFlagSet":{
"properties":{
"ADD_OWN_CONTENT":{
"type":"boolean"
},
"ADD_TO_CALENDAR_FROM_HIERARCHY":{
"type":"boolean"
},
"ASSIGN":{
"type":"boolean"
},
"EDIT_MODE_FOR_HIERARCHY":{
"type":"boolean"
},
"EXTEND_LICENSE":{
"type":"boolean"
},
"HIERARCHY_FILTER":{
"type":"boolean"
},
"HIERARCHY_WITH_ASSETS":{
"type":"boolean"
},
"HIERARCHY_WITH_FOLDERS":{
"type":"boolean"
},
"LAUNCH_ASSET_FROM_HIERARCHY":{
"type":"boolean"
},
"LAUNCH_FOLDER_FROM_HIERARCHY":{
"type":"boolean"
},
"PLAYER_AS_INDIVIDUAL_ASSET":{
"type":"boolean"
},
"PLAYER_AS_SEQUENCE":{
"type":"boolean"
},
"REARRANGE_PRESENTATION_ORDER_FROM_TRAY":{
"type":"boolean"
},
"SEARCH":{
"type":"string",
"enum":[
"legacy",
"sidecar",
"disabled"
]
}
},
"type":"object"
},
"Error":{
"required":[
"error"
],
"properties":{
"error":{
"type":"string"
}
},
"type":"object"
},
"DateRange":{
"required":[
"start",
"end"
],
"properties":{
"start":{
"type":"string",
"format":"date-time"
},
"end":{
"type":"string",
"format":"date-time"
}
},
"type":"object"
},
"UserRole":{
"type":"string",
"enum":[
"Learner",
"Instructor",
"Mentor"
]
}
},
"parameters":{
"ContextType":{
"name":"contexttype",
"in":"query",
"description":"Type of the context.",
"required":true,
"type":"string",
"enum":[
"user",
"class",
"school",
"district"
]
},
"ContextId":{
"name":"contextid",
"in":"query",
"description":"The id of the context.",
"required":true,
"type":"integer"
}
},
"responses":{
"Error":{
"description":"An error occurred while processing the request.",
"schema":{
"$ref":"#\/definitions\/Error"
}
}
},
"securityDefinitions":{
"jwt":{
"type":"apiKey",
"description":"Must be in the form 'Bearer <JWT>' where <JWT> is the Json Web Token obtained from Engrade",
"name":"Authorization",
"in":"header"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment