Repository navigation
Open
Open
Copy link
Milestone
Description
Setup M2M-based (non-interactive) flows for Accessing User Data
One of the endpoints that the classroom team needs to return information in the below format:
Click here to explore the schema
{
"[email protected]": {
"blocks": {
"learn-basic-css-by-building-a-cafe-menu": {
"completedChallenges": [
{
"id": "5f33071498eb2472b87ddee4",
"completedDate": 1475094716730,
"files": []
},
{
"id": "5f3313e74582ad9d063e3a38",
"completedDate": 1537207306322,
"files": []
}
]
},
"learn-css-colors-by-building-a-set-of-colored-markers": {
"completedChallenges": [
{
"id": "61695197ac34f0407e339882",
"completedDate": 1475094716730,
"files": []
},
{
"id": "61695ab9f6ffe951c16d03dd",
"completedDate": 1537207306322,
"files": []
}
]
}
}
},
"[email protected]": {
"blocks": {
"learn-basic-css-by-building-a-cafe-menu": {
"completedChallenges": [
{
"id": "5f33071498eb2472b87ddee4",
"completedDate": 1475094716730,
"files": []
},
{
"id": "5f3313e74582ad9d063e3a38",
"completedDate": 1537207306322,
"files": []
}
]
},
"learn-css-colors-by-building-a-set-of-colored-markers": {
"completedChallenges": [
{
"id": "61695197ac34f0407e339882",
"completedDate": 1475094716730,
"files": []
},
{
"id": "61695ab9f6ffe951c16d03dd",
"completedDate": 1537207306322,
"files": []
}
]
}
}
}
}The implementation should ensure CORS and allow authorized access to the records as needed.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsIn Progress
Activity
[-]Create M2M endpoint for user data fetch[/-][+]Setup M2M-based (non-interactive) flows for accessing User Data[/+]jeremyfiel commentedon Dec 5, 2022
the schema provided is invalid JSON Schema.
I wrote the actual schema required to validate what I presume they are trying to interpret here.
the
Fileschema does not have any constraints and will validate against any type of data because the schema is not well described in the example provided. If someone can provide that, I can update the schema accordingly.Click to view the JSON Schema
{ "$schema": "http://json-schema.org/draft-07/schema#", "description": "<I need a description>", "type": "array", "uniqueItems": true, "additionalItems": false, "items": { "description": "username", "type": "object", "patternProperties": { ".*": { "description": "A list of courses by username", "type": "object", "required": ["blocks"], "properties": { "blocks": { "type": "array", "uniqueItems": true, "items": { "description": "Challenge Name", "type": "object", "patternProperties": { ".*": { "type": "object", "properties": { "completedChallenges": { "type": "array", "uniqueItems": true, "additionalItems": false, "items": { "$ref": "#/definitions/CompletedChallenge" } } } } } } } } } } }, "definitions": { "CompletedChallenge": { "description": "A representation of a completed challenge", "type": "object", "items": { "$ref": "#/definitions/Challenge" } }, "Challenge": { "description": "A representation of an individual challenge", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "A unique identifier of a completed course", "type": "string", "minLength": 1 }, "completedDate": { "description": "A Unix timestamp representation", "type": "integer", }, "files": { "description": "A list of files pertaining to the challenge", "type": "array", "uniqueItems": true, "additionalItems": false, "items": { "$ref": "#/definitions/File" } } } }, "File": { "description": "A representation of a file", "type": "object" } } }jeremyfiel commentedon Dec 5, 2022
a valid example of a response based on the schema I provided
[ { "[email protected]": { "blocks": [ { "learn-basic-css-by-building-a-cafe-menu": { "completedChallenges": [ { "id": "5f33071498eb2472b87ddee4", "completedDate": 1475094716730, "files": [] }, { "id": "5f3313e74582ad9d063e3a38", "completedDate": 1537207306322, "files": [] } ] } }, { "learn-css-colors-by-building-a-set-of-colored-markers": { "completedChallenges": [ { "id": "61695197ac34f0407e339882", "completedDate": 1475094716730, "files": [] }, { "id": "61695ab9f6ffe951c16d03dd", "completedDate": 1537207306322, "files": [] } ] } } ] } }, { "[email protected]": { "blocks": [ { "learn-basic-css-by-building-a-cafe-menu": { "completedChallenges": [ { "id": "5f33071498eb2472b87ddee4", "completedDate": 1475094716730, "files": [] }, { "id": "5f3313e74582ad9d063e3a38", "completedDate": 1537207306322, "files": [] } ] } }, { "learn-css-colors-by-building-a-set-of-colored-markers": { "completedChallenges": [ { "id": "61695197ac34f0407e339882", "completedDate": 1475094716730, "files": [] }, { "id": "61695ab9f6ffe951c16d03dd", "completedDate": 1537207306322, "files": [] } ] } } ] } } ][-]Setup M2M-based (non-interactive) flows for accessing User Data[/-][+]Classrrom Mode: Setup M2M-based (non-interactive) flows for accessing User Data[/+]GuillermoFloresV commentedon Jan 8, 2023
Hi there, thanks for the feedback. We've revised our proposed JSON schema and this is what we've come up with. We're open to extra feedback with it and look forward to continuing the conversation! (a sample response has been attached at the bottom of this gist)
https://gist.github.com/GuillermoFloresV/537054fbef353966bc11c0f720db2fc9
As for the file schema not having constraints, it currently sits as an array of strings and I believe that I have provided the appropriate validation for it but if not please let me know and we can update it.
jeremyfiel commentedon Jan 20, 2023
I've updated your schema to validate the payload you provided. I left the comment in the gist.
GuillermoFloresV commentedon Jan 21, 2023
Hi Jeremy, I've also left a comment to address some of your questions. Let me know if you have further questions.
@raisedadead , if you have a moment, could you take a look as well to make sure we are on the same page regarding the questions that Jeremy asked?
ShaunSHamilton commentedon Sep 27, 2023
@raisedadead Is this MVP?
I was under the impression MVP was to match 1-1 the current API.
EDIT: Answered in meeting. Yes, it is MVP, and will be added when developed.
ojeytonwilliams commentedon Jul 8, 2024
There hasn't been any movement on this for a while and I don't recall the argument for making an exception for this. As such, I've moved it to the post-MVP milestone.
[-]Classrrom Mode: Setup M2M-based (non-interactive) flows for accessing User Data[/-][+]Classroom Mode: Setup M2M-based (non-interactive) flows for accessing User Data[/+]