Last active
May 7, 2019 09:48
-
-
Save drushman/b0a5adb36e4cfd743511dab0fb1d5d0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.0.0", "paths": { | |
| "\/reindex": { | |
| "post": { | |
| "parameters": [], | |
| "summary": "Reindex portal.", | |
| "responses": {"200": []}, | |
| "tags": [{"name": "portal-index", "description": "| "}] | |
| } | |
| }, | |
| "\/lo\/{portalId}\/{loId}\/learners": { | |
| "get": {"parameters": [], "tags": [{"name": "user-explore", "description": "| "}]} | |
| }, | |
| "\/lo\/{portalId}\/{loId}\/learners\/{keyword}": { | |
| "get": {"parameters": [], "tags": [{"name": "user-explore", "description": "| "}]} | |
| }, | |
| "\/lo\/{portalId}\/{loId}\/non-learners\/{keyword}": { | |
| "get": {"parameters": [], "tags": [{"name": "user-explore", "description": "| "}]} | |
| }, | |
| "\/lo\/{portalId}\/{loId}\/non-learners": { | |
| "get": {"parameters": [], "tags": [{"name": "user-explore", "description": "| "}]} | |
| }, | |
| "\/tree\/{courseId}": { | |
| "get": { | |
| "parameters": [{"name": "courseId", "in": "path", "schema": {"type": "integer", "format": "int64"}}], | |
| "summary": "Get structure of learning object.", | |
| "responses": { | |
| "200": { | |
| "content": { | |
| "application\/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "id": {"type": "int"}, | |
| "type": {"type": "string"}, | |
| "published": {"type": "bool"}, | |
| "private": {"type": "bool"}, | |
| "marketplace": {"type": "bool"}, | |
| "portalId": {"type": "bool"}, | |
| "singleLi": {"type": "bool"}, | |
| "complexLi": {"type": "bool"}, | |
| "allowReEnrol": {"type": "bool"}, | |
| "pricing": { | |
| "currency": {"type": "string"}, | |
| "price": {"type": "number"}, | |
| "taxIncluded": {"type": "bool"} | |
| }, | |
| "structure": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "moduleId": {"type": "int"}, | |
| "elementIds": {"type": "array", "items": {"type": "int"}} | |
| } | |
| } | |
| }, | |
| "authorUserIds": {"type": "array", "items": {"type": "int"}}, | |
| "assessorUserIds": {"type": "array", "items": {"type": "int"}} | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "lo-tree", "description": "| "}] | |
| } | |
| }, | |
| "\/cas": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-cas", "description": "| "}]} | |
| }, | |
| "\/cases": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-cas", "description": "| "}]} | |
| }, | |
| "\/commit": { | |
| "post": { | |
| "parameters": [ | |
| { | |
| "name": "X-V3-Importing", | |
| "schema": {"default": 0, "type": "integer", "format": "int64"}, | |
| "in": "header" | |
| } | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application\/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "signedEvent": {"type": "string"}, | |
| "signedEvents": {"type": "array", "items": {"type": "string"}} | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol", "description": "| "}] | |
| } | |
| }, | |
| "\/history\/{enrolmentId}": { | |
| "get": {"parameters": [], "tags": [{"name": "enrol", "description": "| "}]} | |
| }, | |
| "\/load\/{enrolmentId}": { | |
| "get": {"parameters": [], "tags": [{"name": "enrol", "description": "| "}]} | |
| }, | |
| "\/enrolments": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolments\/{id}": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolment-commits": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolment-commits\/{id}": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolment-v3-mappings": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolment-v3-mappings\/{id}": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/enrolment-v3-pushes": { | |
| "get": {"parameters": [], "tags": [{"name": "lr-internal", "description": "| "}]} | |
| }, | |
| "\/portal\/{portalId}": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-v3-migrate", "description": "| "}]} | |
| }, | |
| "\/enrolment\/{enrolmentId}": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-v3-migrate", "description": "| "}]} | |
| }, | |
| "\/revision\/{revisionId}": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-v3-migrate", "description": "| "}]} | |
| }, | |
| "\/{portalId}\/{parentLoId}\/{loId}\/enrolment[\/{legacyStatus:not-started|in-progress|pending|completed}]": { | |
| "post": { | |
| "parameters": [ | |
| { | |
| "name": "portalId", | |
| "in": "path", | |
| "required": true, | |
| "schema": {"type": "integer", "format": "int64"} | |
| }, {"name": "parentLoId", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}, { | |
| "name": "loId", | |
| "in": "path", | |
| "required": true, | |
| "schema": {"type": "integer", "format": "int64"} | |
| }, {"name": "legacyStatus", "in": "path", "required": false, "schema": {"type": "string"}}, { | |
| "name": "body", | |
| "in": "body", | |
| "required": false, | |
| "schema": { | |
| "title": "go1.core.learning-record.legacy-enrolment-create", | |
| "type": "object", | |
| "required": [], | |
| "properties": { | |
| "startDate": {"type": "integer", "minimum": 0}, | |
| "endDate": {"type": "integer", "minimum": 0}, | |
| "dueDate": {"type": "integer", "minimum": 0}, | |
| "result": {"type": "number", "minimum": 0, "maximum": 100}, | |
| "pass": {"type": "number", "minimum": 0, "maximum": 1}, | |
| "checkoutToken": {"type": "string"} | |
| } | |
| } | |
| } | |
| ], | |
| "summary": "Create single enrolment.", | |
| "responses": { | |
| "200": { | |
| "description": "Id of enrolment", | |
| "content": { | |
| "application\/json": { | |
| "schema": {"type": "object", "properties": {"id": {"type": "int"}, "uuid": {"type": "string"}}} | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/{portalId}\/{parentLoId}\/{loId}\/enrolment\/{studentMail}[\/{legacyStatus}]": { | |
| "post": { | |
| "parameters": [ | |
| { | |
| "name": "portalId", | |
| "in": "path", | |
| "required": true, | |
| "schema": {"type": "integer", "format": "int64"} | |
| }, {"name": "parentLoId", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}, { | |
| "name": "loId", | |
| "in": "path", | |
| "required": true, | |
| "schema": {"type": "integer", "format": "int64"} | |
| }, {"name": "studentMail", "in": "path", "required": true, "schema": {"type": "string"}}, { | |
| "name": "legacyStatus", | |
| "in": "path", | |
| "required": false, | |
| "schema": {"type": "string"} | |
| }, { | |
| "name": "body", | |
| "in": "body", | |
| "required": false, | |
| "schema": { | |
| "title": "go1.core.learning-record.legacy-enrolment-create", | |
| "type": "object", | |
| "required": [], | |
| "properties": { | |
| "startDate": {"type": "integer", "minimum": 0}, | |
| "endDate": {"type": "integer", "minimum": 0}, | |
| "dueDate": {"type": "integer", "minimum": 0}, | |
| "result": {"type": "number", "minimum": 0, "maximum": 100}, | |
| "pass": {"type": "number", "minimum": 0, "maximum": 1}, | |
| "checkoutToken": {"type": "string"} | |
| } | |
| } | |
| } | |
| ], | |
| "summary": "Create single enrolment for student.", | |
| "responses": { | |
| "200": { | |
| "description": "Id of enrolment", | |
| "content": { | |
| "application\/json": { | |
| "schema": {"type": "object", "properties": {"id": {"type": "int"}, "uuid": {"type": "string"}}} | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/{portalId}\/enrolment": { | |
| "post": { | |
| "parameters": [], | |
| "summary": "Create multiple enrolments", | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/{portalId}\/enrolment\/{learnerEmail}": { | |
| "post": { | |
| "parameters": [], | |
| "summary": "Create enrolment for other user.", | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/enrolment\/{id}": { | |
| "put": { | |
| "parameters": [ | |
| {"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}, { | |
| "name": "body", | |
| "in": "body", | |
| "required": true, | |
| "schema": { | |
| "title": "go1.core.learning-record.legacy-enrolment-update", | |
| "type": "object", | |
| "required": [], | |
| "properties": { | |
| "startDate": {"type": "integer", "minimum": 0}, | |
| "endDate": {"type": "integer", "minimum": 0}, | |
| "dueDate": {"type": "integer", "minimum": 0}, | |
| "expectedCompletionDate": {"type": "integer", "minimum": 0}, | |
| "result": {"type": "number", "minimum": 0, "maximum": 100}, | |
| "status": {"type": "string"}, | |
| "pass": {"type": "number", "minimum": 0, "maximum": 1} | |
| } | |
| } | |
| } | |
| ], | |
| "summary": "Update enrolment", | |
| "responses": {"204": {"description": "No content", "content": {"application\/json": []}}}, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| }, | |
| "delete": { | |
| "parameters": [], | |
| "summary": "Archive an enrolment", | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| }, | |
| "get": { | |
| "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}], | |
| "summary": "Enrolment load", | |
| "responses": { | |
| "200": { | |
| "description": "Enrolment object", | |
| "content": { | |
| "application\/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "id": {"type": "integer"}, | |
| "profile_id": {"type": "integer"}, | |
| "parent_lo_id": {"type": "integer"}, | |
| "parent_enrolment_id": {"type": "integer"}, | |
| "lo_id": {"type": "integer"}, | |
| "instance_id": {"type": "integer"}, | |
| "taken_instance_id": {"type": "integer"}, | |
| "start_date": {"type": "date-time"}, | |
| "end_date": {"type": "date-time"}, | |
| "status": {"type": "string"}, | |
| "result": {"type": "float"}, | |
| "pass": {"type": "int"}, | |
| "timestamp": {"type": "integer"}, | |
| "changed": {"type": "integer"}, | |
| "data": { | |
| "type": "object", | |
| "properties": {"duration": {"type": "integer"}, "custom_certificate": {"type": "string"}} | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/enrolment\/{id}\/properties": { | |
| "put": { | |
| "parameters": [ | |
| {"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}, { | |
| "name": "body", | |
| "in": "body", | |
| "required": true, | |
| "schema": { | |
| "title": "go1.core.learning-record.legacy-enrolment-update-property", | |
| "type": "object", | |
| "anyOf": [{"required": ["duration"]}, {"required": ["custom_certificate"]}], | |
| "properties": {"duration": {"type": "integer", "minimum": 0}, "custom_certificate": {"type": "string"}} | |
| } | |
| } | |
| ], | |
| "summary": "Update duration, custom_certificate", | |
| "responses": {"204": {"description": "No content", "content": {"application\/json": []}}}, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/enrolment\/re-calculate\/{id}": { | |
| "post": {"parameters": [], "tags": [{"name": "enrol-v3-restful", "description": "| "}]} | |
| }, | |
| "\/lo\/{loId}\/history\/{userId}": { | |
| "get": { | |
| "parameters": [ | |
| { | |
| "name": "loId", | |
| "in": "path", | |
| "required": true, | |
| "schema": {"type": "integer", "format": "int64"} | |
| }, {"name": "userId", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}} | |
| ], | |
| "summary": "Enrolment load history on a learning object", | |
| "responses": { | |
| "200": { | |
| "description": "Enrolments object", | |
| "content": { | |
| "application\/json": { | |
| "schema": { | |
| "$ref": ["file:\/\/\/Users\/duynguyen\/go1\/tmp\/enrolment-v2019\/go1-core\/lr\/event\/v3\/schema\/enrolment-v3.json"] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| }, | |
| "\/enrolment\/{id}\/verify": { | |
| "get": { | |
| "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer", "format": "int64"}}], | |
| "summary": "Enrolment verify", | |
| "responses": { | |
| "200": { | |
| "description": "Sync status", | |
| "content": { | |
| "application\/json": {"schema": {"type": "object", "properties": {"status": {"type": "bool"}}}} | |
| } | |
| } | |
| }, | |
| "tags": [{"name": "enrol-v3-restful", "description": "| "}] | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment