Canvas OneStop REST API
A simple API to integrate Canvas, Stripe, and more.
BASE API URI: api.canvasadmin.educative.tech
Canvas LMS Endpoints
Creates a new user on canvas and a new sub-account and adds that user to the sub account as admin
Endpoint: /api/canvas/provision-account
Auth headers required
Expected Params:
{
"user": {
"user": string,
"shortname": string,
"email": string,
"password": string,
"sis_user_id": string
},
"account": "account": {
"name": string,
"sis_account_id": string
},
}
Example Response:
{
"status": "success",
"user": {
"user": string,
"shortname": string,
"email": string,
"password": string,
"sis_user_id": string
},
"account":{
"name": string,
"sis_account_id": string
},
code: 200
}
Copies the new canvas user data onto the local DB
Endpoint: /api/canvas/register-canvas-user
Auth headers required
Expected Params:
{
"user": string,
"email": string,
"user_sis_id": string
}
Example Response:
{
"message": "User logged to db",
code: 200
}
Copies the new canvas account data onto the local DB
Endpoint: /api/canvas/register-canvas-account
Auth headers required
Expected Params:
{
"email": string,
"data": {
"account": string
"accountSiS": string
}
}
Example Response:
{
"message": "Account logged to db",
code: 200
}
Check to see if there is an existing canvas account on local db
Endpoint: /api/canvas/get-canvas-account
Auth headers required
Expected Params:
{
"AccountName"
}
Example Response:
{
"status": "exists" / "ok",
"message": "Account already exists" / "No user found",
code: 200
}
Check to see if there is an existing canvas user on local db
Endpoint: /api/canvas/get-canvas-user
Auth headers required
Expected Params:
{
"userEmail"
}
Example Response:
{
"status": "exists" / "ok",
"message": "Account already exists" / "No user found",
code: 200
}
Gets all canvas users made by the registered Edtech User on the local db
Endpoint: /api/canvas/get-all-canvas-users
Auth headers required
Expected Params:
{
None
}
Example Response:
{
"result": [
"user": {
"user": string,
"shortname": string,
"email": string,
"password": string,
"sis_user_id": string
},
]
code: 200
}
Checks against the Canvas Learn db if a user exists
Endpoint: /api/canvas/query-canvas-users?search_term=
Auth headers required
Expected Params:
{
None
Will take a url param search term.
}
Example Response:
{
"status": "Not Found",
"message": "No matching user found",
code: 404
}
Checks against the Canvas Learn db if a account name exists
Endpoint: /api/canvas/check_subaccount-name?name=
Auth headers required
Expected Params:
{
None
Will take name URL param
}
Example Response:
{
"status": "exists",
"subaccount": canvasAccount object
code: 200
}
Gets all canvas accounts made by the current Edtech User form the local db
Endpoint: /api/canvas/get-all-canvas-accounts
Auth headers required
Expected Params:
{
None
}
Example Response:
{
"result":[
"account": {
"id": 2,
"ed_tech_user_id": 3
"canvas_user_id": 4
"account_name": OneStopTest
"account_sis_id": oneStop-21Aiuh
}
]
code: 200
}