Skip to content

Instantly share code, notes, and snippets.

@jess
Last active May 23, 2019 18:52
Show Gist options
  • Save jess/9bf2a824298cb9ca9e5c76224c5eba48 to your computer and use it in GitHub Desktop.
Save jess/9bf2a824298cb9ca9e5c76224c5eba48 to your computer and use it in GitHub Desktop.

POST Request To Create User API Endpoint On You Got This System

/users?api_key?sldfjslkdfjljslkdfj

{
  "email": 'jess@csepub.com',
  first_name: 'first',
  last_name: 'last_name',
  trainee_id: 'studentid',
  program_id: 123
  assignment_id: 456
}

Notes:

  • trainee_id: student id from LMS (optional)
  • program_id: You Got This Provided integer
  • assignment_id: Unique assignment id for csepub assignments (needed to update grade/progress)

JSON Response:

{
  isSuccessful: true,
  message: '',
  url: ''
}

Post Module Quiz Progress:

API Endpoint on CSePub System:

POST Request To Update Grade

/assignments/456?api_key=xxx

{
  email: 'jess@csepub.com',
  program_id: 123,
  grade: 0.66
}

JSON Response:

{
  success: true
}

HTTP Response:

200 or 401

Notes:

  • assignment id is passed in url
  • grade will be passed a progress decimal: 0.33, 0.66, 1.0
POST Request To Create User
API Endpoint On You Got This System
`/users?api_key?sldfjslkdfjljslkdfj`
```json
{
"email": 'jess@csepub.com',
"first_name": 'first',
"last_name": 'last_name',
"trainee_id": 'studentid',
"program_id": 123
"assignment_id": 456
}
```
Notes:
* trainee_id: student id from LMS (optional)
* program_id: You Got This Provided integer
* assignment_id: Unique assignment id for csepub assignments (needed to update grade/progress)
JSON Response:
```json
{
"isSuccessful": true,
"message": '',
"url": ''
}
```
-----------------------------------------
Post Module Quiz Progress:
API Endpoint on CSePub System:
POST Request To Update Grade
`/assignments/456?api_key=xxx`
```json
{
"email": 'jess@csepub.com',
"program_id": 123,
"grade": 0.66
}
```
JSON Response:
```json
{
"success": true
}
```
HTTP Response:
`200` or `401`
Notes:
* assignment id is passed in url
* grade will be passed a progress decimal: 0.33, 0.66, 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment